[Include] pEscapemenu (New 'Dialog' Style) *19/Oct/2011*
#1

Peace,

today I've decided, to publish a new Open Source Project. I sincerely apologize for my imperfect English. This Include allows you some functions for an new Dialog Style (Escape Menu). Its not perfect the same like the Escape Menu - cause of: I cant have the Chance to query the Escape Key for false response like KEY_ESCAPE - I don't can use the texture fronten2:back8 as sprite - I don't have enough mood, to calculate the hud:arrow Texture position, for every single letter because every Letter have an else X-Size, so comes this feature next time. Watch the Video, if you don't understand me.

Needed Function's:
pawn Код:
Needed Function's:
OnEscapeMenuInit(); //Use this in OnGameModeInit or OnFilterScriptInit
OnEscapeMenuExit(); //Use this in OnGameModeExit or OnFilterScriptExit
OnEscapeMenuKeyStateChange(playerid,newkeys); //Use this in OnPlayerKeyStateChange
OnEscapeMenuUpdate(playerid); //Use this in OnPlayerUpdate
OnEscapeMenuConnect(playerid); //Use this in OnPlayerDisconnect
OnEscapeMenuDisonnect(playerid); //Use this in OnPlayerDisconnect
Function's:
pawn Код:
ShowPlayerEscapeMenu(playerid,Title[],Option1[],Option2[],Option3[],Option4[],Option5[],Option6[],Option7[]);//If you want only use 6 or less Options use as empty Option "" - nothing else! The script convert the empty field to "_" & set variables.
HidePlayerEscapeMenu(playerid);
SetPlayerEscapeMenuOptionText(playerid,OptionID,NewText[]);//Is something same like "AddPlayerEscapeMenuOption" if this Option is Invalid.
RemovePlayerEscapeMenuOption(playerid,OptionID)
If-Queries:
pawn Код:
EscapeMenuOpen(playerid)//If the player see the Menu, it returns true - else it returns false
IsValidEscapeMenuOption(playerid,OptionID)//If the option exist, it returns true - else it returns false
Public's:
pawn Код:
OnPlayerEscapeMenuRowChange(playerid,NewRowID)
OnPlayerEscapeMenuResponse(playerid,SelectedRow)//The Menu dont hide by himself, so you have to use "HidePlayerEscapeMenu(playerid);" in this public - if you want to hide the Escapemenu after pressing the ENTER Key.
Video:
[ame]http://www.youtube.com/watch?v=-hBqThYYiTY[/ame]
pawn Код:
http://www.youtube.com/watch?v=-hBqThYYiTY
Downloads:
http://solidfiles.com/d/43278/ (Includes Include, Example Filterscript, Picture & Readme - Recommended)
http://pastebin.com/tA1dzk3P

Changelog:
pawn Код:
• v1.0 (19.10.2011)
-» Initial release
Rules:
Nother Mirrors: allowed (Desired)
Editing Script: allowed
Removing Credits: allowed
Publish it: forbidden (Only on request)
Sell it: forbidden

Greetz!
Reply
#2

O.O Nice
Reply
#3

@xX60CentXx: Thanks.
Reply
#4

Looks great. Unique idea, I like it.
Reply
#5

@Kingunit: Thanks.
Reply
#6

Your ideas are awesome.
Idea: You can use the ******'s method to hook callbacks without asking to put in the script.
Reply
#7

@Shelby: Thanks. I had been thinking about it - eventually I add this in the next update.
Reply
#8

Very nice ! I like all your scripts.
+1 Reputation.
Reply
#9

you always have unique and good ideas

Keep up man

Also can you sand me this mod for ped?
Reply
#10

Amazing.
Reply
#11

@usrb1n & Drakon: Thanks.

@System64: Thanks & you get it via PM.
Reply
#12

GOOD ***** JOB, you are epic.
Reply
#13

You're Insane, thats amazing
Reply
#14

Well dude i am speachless when it comes to talk about your releases. You are GODLIKE. Thank you very much
Reply
#15

Oeh sexy! Great job, sow this is just like normal dialogs but in a menu?
Reply
#16

@Naruto_Emilio: No, I'am Pablo[/Irony]. Thanks!

@Ricop522 & tour15: Thanks.

@justsomeguy: Watch the Video, it explain everything.
Reply
#17

Another +rep for you i like your ideas :P Good job
Reply
#18

This Script is good, but have you test that script with other players?
I saw the code and it looks like it will only work for one Person.

Example:
Player#1 and Player#2 see the Menu...
Player#1 change from Row 2 to 3 ... (So the text from Row 3 will change to a brighter blue, like in singleplayer).
But there are only 7 Textdraws for 2 Player. Also Player#2 will see Row 3 marked, althrough he didn't change the row.

There are only 7 Textdraws for 2 Player, but it should be 14 Textdraws for 2 Players and 21 Textdraws for 3 Players... Your amount of Textdraws never change.
Reply
#19

@Nanory what do you mean show the menu for other players? It seems useless. It's better to use the function when the player calls it.
Reply
#20

Quote:
Originally Posted by Pablo Borsellino
Посмотреть сообщение
pawn Код:
Needed Function's:
OnEscapeMenuInit(); //Use this in OnGameModeInit or OnFilterScriptInit
OnEscapeMenuExit(); //Use this in OnGameModeExit or OnFilterScriptExit
OnEscapeMenuKeyStateChange(playerid,newkeys); //Use this in OnPlayerKeyStateChange
OnEscapeMenuUpdate(playerid); //Use this in OnPlayerUpdate
OnEscapeMenuConnect(playerid); //Use this in OnPlayerDisconnect
OnEscapeMenuDisonnect(playerid); //Use this in OnPlayerDisconnect
Have you not heard about hooking?
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)