About Store Forum Documentation Contact



Post Reply 
menu problems :/
Author Message
craksy Offline
Member

Post: #1
menu problems :/
ok i am making a menu, and i am having a bit of trouble :/

i want an in game menu, to be toggled on/off when ESC key is pressed, but i dont really know how to do that...
i noticed in the character tutorial that when you toggled the "ready" animation on/off, there was a "^" before ready...
does that "^" thingy, mean toggle? :oops:

may post more questoins as i proceed..
i also want to make a main menu later, but i am a little confused about the state thingy :/
12-23-2008 01:18 PM
Find all posts by this user Quote this message in a reply
lucifer1101 Offline
Member

Post: #2
Re: menu problems :/
try using a variable as 0 = off and 1 = on
12-23-2008 01:37 PM
Find all posts by this user Quote this message in a reply
craksy Offline
Member

Post: #3
Re: menu problems :/
or a bool? pfft
but i was hoping there was some kinda automatic toggle function
12-23-2008 01:39 PM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #4
Re: menu problems :/
there are, just check out Gui Object header file
you've got methods like 'hide' 'show' its simple
12-23-2008 01:40 PM
Find all posts by this user Quote this message in a reply
craksy Offline
Member

Post: #5
Re: menu problems :/
oh... actually looked for a function like that, but i just typed "gui_objs." and checked the list of suggestions...
but will i have to do it for all of my objects?
like: start.hide
options.hide
help.hide
and so on? or are there an easier way to do it?
12-23-2008 01:51 PM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #6
Re: menu problems :/
you just need to hide the root/parent
12-23-2008 02:03 PM
Find all posts by this user Quote this message in a reply
craksy Offline
Member

Post: #7
Re: menu problems :/
so that will be the window, (in most cases) right?

edit:
nvm -.-' i should really look before i ask...
now i have this code in my main function:
Code:
if(Kb.bp(KB_M)){
      if(start->parent->hidden){
          start->parent->show();
      }
      else{
          start->parent->hide();
      }
}

i just picked a object from my gui_objs, and took its parent...
it works fine, but was this what you meant?
is this the way its "supposed" to be done?
12-23-2008 02:04 PM
Find all posts by this user Quote this message in a reply
craksy Offline
Member

Post: #8
Re: menu problems :/
naah never mind.. it works and thats most important for now
now i just have a new question: if i have an options button for example, and want a new window to pup up when you click it, will i have to create a new gui object in gui editor, or can i have multiple windows in the same gui?
if so: how do i seperate the windows from each other so it wont display the options window when i open the menu window?
12-23-2008 03:29 PM
Find all posts by this user Quote this message in a reply
craksy Offline
Member

Post: #9
Re: menu problems :/
i am sorry to bump this thread, but i am kinda stuck untill i figure this out :/
could someone help me please?
12-24-2008 02:33 PM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #10
Re: menu problems :/
yes you can mix objects from gui editor and those manually created
you can use multiple windows
you can optionally set their levels (to one always be on top of the others Window::level)
or optionally hide other windows when only one wants to be visible
12-24-2008 03:01 PM
Find all posts by this user Quote this message in a reply
Post Reply