Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Help How to create popup and main menu plssss

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting
View previous topic :: View next topic  
Author Message
hack0535
Cheater
Reputation: 2

Joined: 16 Oct 2011
Posts: 28

PostPosted: Sun Jan 22, 2012 11:50 pm    Post subject: Help How to create popup and main menu plssss Reply with quote

help i dont know how to make menu
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 457

Joined: 09 May 2003
Posts: 25262
Location: The netherlands

PostPosted: Mon Jan 23, 2012 12:22 am    Post subject: Reply with quote

The following script creates a form and then adds a menu and a popupmenu to it.


Code:

function popupblaclick(sender)
  showMessage('Popup bla was clicked')
end

function bla2click(sender)
  showMessage('bla2 was clicked')
end

f=createForm()
mmenu=createMainMenu(f)
mmenu_items=menu_getItems(mmenu)

mi=createMenuItem(mmenu)
menuItem_setCaption(mi,'bla')

mi2=createMenuItem(mmenu) --cerate a submenu of bla
menuItem_setCaption(mi2,'bla2')
menuItem_onClick(mi2,bla2click)
menuItem_add(mi, mi2) --add bla2 to bla

menuItem_add(mmenu_items, mi) --add bla and bla->bla2
--this is all that's needed for a main menu

--now the popup menu
pmenu=createPopupMenu(f)
pmenu_items=menu_getItems(pmenu)
mi3=createMenuItem(pmenu)
menuItem_setCaption(mi3,'popup bla')
menuItem_onClick(mi3,popupblaclick)
menuItem_add(pmenu_items, mi3)

control_setPopupMenu(f, pmenu)

_________________
Do not ask me about online cheats. I don't know any and wont help finding them.

Like my help? Join me on Patreon so i can keep helping
Back to top
View user's profile Send private message MSN Messenger
hack0535
Cheater
Reputation: 2

Joined: 16 Oct 2011
Posts: 28

PostPosted: Tue Jan 24, 2012 8:28 pm    Post subject: Reply with quote

Thank you Darkbyte
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites