iMenu.inc v1.2| Clickable TextDraw Menus | CS Buy Menu Style -
iAmir - 07.06.2017
iMenu.inc
v1.2
by iAmir
Start and Informations
Clickable TextDraw menu , designed with
iPLEOMAX's TextDraw Editor .
it can be used for shops , inventories , team selections in TDM or anything else,
Thanks for your support.
Video
Click on meh
Screen Shots :
Change log:
Код:
15/10/2017 - v1.2
- Added function iMenu_RemoveItem to remove items
- Added function iMenu_SetDefaultPreview
19/06/2017 - v1.1- Increased item limits per menu up to 16 !
- Added parameters to able change colors of different parts
- Added new parameter 'modelid' to 'iMenuPlayerResponse'
07/06/2017 - v1
Released
Functions and details
PHP код:
stock iMenu_ShowForPlayer(playerid , im_menuid , im_caption[] , framecolor = 128 , headercolor = 128 , bordercolor = -5963521 , captioncolor = -5963521 , buttoncolor = 255 , mainbuttontextcolor = 0xFFFFFFFF , noprevtextcolor = 0xFFFFFFFF)
// It shows the frame and some datils of menu and makes it ready to add items
// playerid - ID of Player
// im_menuid - ID of menu (you can define)
// im_caption - caption of menu , like in screen shots and the video
// framecolor - Info in Tutorials of Colors
// headercolor - Info in Tutorials of Colors
// bordercolor - Info in Tutorials of Colors
// captioncolor - Info in Tutorials of Colors
// buttoncolor - Info in Tutorials of Colors
// mainbuttontextcolor - Info in Tutorials of Colors
// noprevtextcolor - Info in Tutorials of Colors
PHP код:
stock iMenu_AddItem(playerid , im_item_number , im_item_string[] , im_description[] , im_preview_model = -1 , Float:im_rx = 0.0 , Float:im_ry = 0.0 , Float:im_rz = 0.0 , Float:im_zoom = 1.0 , itemtextcolor=0xFFFFFFFF ,desc_col=-5963521, previewbg = 255 , vehcol1=-1 , vehcol2=-1)
// adds items up to 12
// playerid - ID of player
// im_item_number - the number of item which is from 0 to 12
// im_item_string - the text or caption of item
// im_description - description of this item (like in screen shots and the video)
// im_preview_model - ID of object for showing in a box for this item (can be blank not be used then it shows NO PREVIEW )
// Float:im_rx - Rot X if this item uses preview model
// Float:im_ry - Rot Y if this item uses preview model
// Float:im_rz - Rot Z if this item uses preview model
// Float:im_zoom - Zoom if this item uses preview model
// itemtextcolor - Info in Tutorials of Colors
// desc_col - Info in Tutorials of Colors
// previewbg - Info in Tutorials of Colors
// vehcol1 - Info in Tutorials of Colors
// vehcol2 - Info in Tutorials of Colors
PHP код:
stock iMenu_HideForPlayer(playerid)
//Hides menu
// playerid - ID of player
PHP код:
stock iMenu_SetDefaultPreview(playerid , im_preview_model = -1 , Float:im_rx = 0.0 , Float:im_ry = 0.0 , Float:im_rz = 0.0 , Float:im_zoom = 1.0 , previewbg = 255 , vehcol1=-1 , vehcol2=-1)
// to set default preview model before selecting any items
// playerid - ID of player
// im_preview_model - ID of object for showing in the box
// Float:im_rx - Rot X if this item uses preview model
// Float:im_ry - Rot Y if this item uses preview model
// Float:im_rz - Rot Z if this item uses preview model
// Float:im_zoom - Zoom if this item uses preview model
// previewbg - Info in Tutorials of Colors
// vehcol1 - Info in Tutorials of Colors
// vehcol2 - Info in Tutorials of Colors
PHP код:
stock iMenu_RemoveItem(playerid , im_item_number)
// removes a specific item
// playerid - ID of player
// im_item_number - Item Number
Callbacks
[PHP]
PHP код:
public iMenuPlayerSelectItem(playerid , im_item)
// Call when player clicks on an item
// playerid - ID of Player
// im_item - Selected item
PHP код:
public iMenuPlayerResponse(playerid , imenuid , itemid , modelid)
// Call when player clicks on Select while he already selected an item
// playerid - ID of player
// imenuid - ID of menu
// itemid - ID of selected item
// modelid - Model id of preview model object of selected item
Tutorials for colors:
- 1 - headercolor - Color of header
- 2 - captioncolor - Color of caption text
- 3 - itemtextcolor - Color of item text
- 4 - buttoncolor - Color of button background including Select , Cancel , and Item buttons
- 5 - framecolor - Color of main frame
- 6 - previewbg - Color of preview model background
- 7 - bordercolor - Color of main borders of buttons and preview model box
- 8 - desc_col - Color of description text under the preview model box
- 9 - mainbuttontextcolor - Color of Select and Cancel buttons
- 10 - noprevtextcolor - Color of 'NO PREVIEW' text
- 11 - vehcol1 - First color of vehicle (only works if object model is a vehicle)
- 12 - vehcol2 - Second color of vehicle (only works if object model is a vehicle)
Downloads
New
iMenu.inc v1.2 : Pastebin
Old(s)
iMenu.inc v1.1 : Pastebin.com
example : Pastebin.com
iMenu.inc v1 :
Pastebin.com
example :
Pastebin.com
Credits
iPLEOMAX - for his edtior
Me - for scripting this include
Re: iMenu.inc | Clickable TextDraw Menus | CS Buy Menu Style -
iLearner - 07.06.2017
Not bad.
Re: iMenu.inc | Clickable TextDraw Menus | CS Buy Menu Style -
Fairuz - 07.06.2017
Good job,would be nice if you provide how to change the colors.
Re: iMenu.inc | Clickable TextDraw Menus | CS Buy Menu Style -
iAmir - 07.06.2017
Quote:
Originally Posted by iLearner
Not bad.
|
Would be nice if you share any idea that can make it better and more useful cause I'm not actually creative
Quote:
Originally Posted by Dice_
Good job,would be nice if you provide how to change the colors.
|
I'll add this feature for next update and add parameters for changing colors from default to everything you like
Re: iMenu.inc | Clickable TextDraw Menus | CS Buy Menu Style - Astralis - 07.06.2017
Cool textdraws.
Re: iMenu.inc | Clickable TextDraw Menus | CS Buy Menu Style -
SyS - 10.06.2017
Nice
Re: iMenu.inc | Clickable TextDraw Menus | CS Buy Menu Style -
X337 - 10.06.2017
Cool, my suggestion is to add paginations so you will have a higher limit for menu items not only 12.
Re: iMenu.inc | Clickable TextDraw Menus | CS Buy Menu Style -
coool - 10.06.2017
guud
Re: iMenu.inc | Clickable TextDraw Menus | CS Buy Menu Style -
JesusChrysler - 10.06.2017
Great work.
Re: iMenu.inc | Clickable TextDraw Menus | CS Buy Menu Style -
iAmir - 12.06.2017
Quote:
Originally Posted by X337
Cool, my suggestion is to add paginations so you will have a higher limit for menu items not only 12.
|
Yeah , I will add pagination
Quote:
Originally Posted by coool
guud
|
Quote:
Originally Posted by SyS
Nice
|
Quote:
Originally Posted by JesusChrysler
Great work.
|
Thank y'all
Re: iMenu.inc | Clickable TextDraw Menus | CS Buy Menu Style -
Romz - 15.06.2017
Hello! You must add function iMenu_AddItem new arguments to adjust the width and height of the images.
It would also be cool to increase the limit of menu items from 12 to 16 or best of all dynamic value.
Re: iMenu.inc | Clickable TextDraw Menus | CS Buy Menu Style -
iAmir - 18.06.2017
New Update ...
Change log:
Код:
19/06/2017 - v1.1
- Increased item limits per menu up to 16 !
- Added parameters to able change colors of different parts
- Added new parameter 'modelid' to 'iMenuPlayerResponse'
- 1 - headercolor - Color of header
- 2 - captioncolor - Color of caption text
- 3 - itemtextcolor - Color of item text
- 4 - buttoncolor - Color of button background including Select , Cancel , and Item buttons
- 5 - framecolor - Color of main frame
- 6 - previewbg - Color of preview model background
- 7 - bordercolor - Color of main borders of buttons and preview model box
- 8 - desc_col - Color of description text under the preview model box
- 9 - mainbuttontextcolor - Color of Select and Cancel buttons
- 10 - noprevtextcolor - Color of 'NO PREVIEW' text
- 11 - vehcol1 - First color of vehicle (only works if object model is a vehicle)
- 12 - vehcol2 - Second color of vehicle (only works if object model is a vehicle)
Re: iMenu.inc | Clickable TextDraw Menus | CS Buy Menu Style -
Fairuz - 18.06.2017
Nice update mate,i will use this include.
Re: iMenu.inc | Clickable TextDraw Menus | CS Buy Menu Style -
10MIN - 26.06.2017
Good Job with this include.
Re: iMenu.inc | Clickable TextDraw Menus | CS Buy Menu Style -
bugmenotlol - 03.07.2017
I have a Doubt
PHP код:
// im_preview_model - ID of object for showing in a box for this item (can be blank not be used then it shows NO PREVIEW )
skin ids start from 0.....256
weapon ids also 0....256
so what we should add there for the difference in weapon and skin ??
Re: iMenu.inc | Clickable TextDraw Menus | CS Buy Menu Style -
Pottus - 03.07.2017
Take a look at how Texture Studio handles menus I think you will find it interesting.
https://github.com/Pottus/Texture-St...ts/tstudio/gui
https://github.com/Pottus/Texture-St...io/menugui.pwn
https://github.com/Pottus/Texture-St...o/menudata.pwn
I still consider this whole system as incomplete but it would have the ability to handle a system like this just some ideas for you.
Re: iMenu.inc | Clickable TextDraw Menus | CS Buy Menu Style -
bugmenotlol - 03.07.2017
Quote:
Originally Posted by Pottus
|
still dint get answer to my question
Re: iMenu.inc | Clickable TextDraw Menus | CS Buy Menu Style -
Pottus - 03.07.2017
Quote:
Originally Posted by bugmenotlol
still dint get answer to my question
|
I was replying to the thread as there is no quote.
Re: iMenu.inc | Clickable TextDraw Menus | CS Buy Menu Style -
iAmir - 03.07.2017
Quote:
Originally Posted by bugmenotlol
I have a Doubt
PHP код:
// im_preview_model - ID of object for showing in a box for this item (can be blank not be used then it shows NO PREVIEW )
skin ids start from 0.....256
weapon ids also 0....256
so what we should add there for the difference in weapon and skin ??
|
Weapon IDs are different with Weapon Object IDs , and also Skin IDs are between 0 and 311 and weapon IDs are between 0 and 46 , (other IDs are not weapons ! and don't have object IDs)
https://sampwiki.blast.hk/wiki/Skins:All
https://sampwiki.blast.hk/wiki/Weapons
Quote:
Originally Posted by Pottus
|
Thanks ! I will take a look.
And surely I'm gonna make it better in my free times which is less than the needed time to work
Re: iMenu.inc | Clickable TextDraw Menus | CS Buy Menu Style -
XtremeR - 25.07.2017
Good one. +4