nebula Entry: 2 03/11/2004 11:57 PM
| Added several new features to the editor and started working on a native popup system to use inside it.
The popupmenu is currently working and its color can be adjusted. The draw... functions can be used to change the apearance of the popupmenu's.
There are currently 30 functions to control the popups and its contents with.
Initiating a popup is very easy. Include the code after you remove the demonstration part and your set.
Example : [code] ; Setup popup and sublevels ; menu, location, Text ,returnvalue insertpopupitem(0,0,"Load",1) insertpopupitem(0,1,"Save",2) ; Add a line ; menu 0, location 2, return value(temp) insertpopupline(0,2,3) ; Insert line insertpopupitem(0,3,"Cut",4) insertpopupitem(0,4,"Copy",5) insertpopupitem(0,5,"Paste",6) insertpopupitem(0,6,"Sub",7) insertpopupitem(1,0,"Yeah",8) insertpopupitem(1,1,"this",9) insertpopupitem(1,2,"is a",10) insertpopupitem(1,3,"submenu",11) ; Submenu ; menu 0, item 4 links to menu 1 linkitemtosubmenu(0,4,1) insertpopupitem(2,0,"Yeah",12) insertpopupitem(2,1,"this",13) insertpopupitem(2,2,"is a",14) insertpopupitem(2,3,"submenu",15) linkitemtosubmenu(0,6,2) ; menu 0 item 6 gets linked to open menu 2 [/code]
The code below inside a b+ loop handles the popup and all its submenu's. Currently 1 level deep (code is structured to handle unlimited submenu's)
[code] Case $202 ;- Mouse up If EventData() = 2 Then q = popupwindow(num,MouseX(),MouseY(),win) If q>0 Then RuntimeError q End If [/code]
;Native Popup system ; ;Todo : ; ; Display key Shotcuts ; Modularize popup control structure ; Put popup collision in timer ; Large menu scrolling (scrollbar?) ; Auto adjust popup layout to size (screen) ; Blanked out text (inactive / disable / enable) ; More user level control function ; More sub menu levels ; Update popup output handling to contents ; Better interactive control ; Inline images and user controls ; Easy user level color control ; ;Todo maybe : ; ; Menu resizing animation ; Skins and oval/round popup menus ; Sound effects ; Fullscreen version ; Menu mode ; Inline animations ; Load data from Ini file
|