About Store Forum Documentation Contact



Post Reply 
Processing of events GUI
Author Message
Babulesnik Offline
Member

Post: #1
Processing of events GUI
At click of a mouse does not react. Why?

if( game_menu.getButton("game_kosti").mode=(BUTTON_IMMEDIATE) )game_list.show();else game_list.hide();
01-29-2011 08:32 PM
Find all posts by this user Quote this message in a reply
BlackHornet Offline
Member

Post: #2
RE: Processing of events GUI
in the if use == instead

Urbanity Online: http://www.facebook.com/pages/Urbanity-Online/162454237136358
Join the Esenthel IRC Channel @ Freenode: http://webchat.freenode.net/?channels=##Esenthel
01-29-2011 09:02 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Babulesnik Offline
Member

Post: #3
RE: Processing of events GUI
(01-29-2011 09:02 PM)BlackHornet Wrote:  in the if use == instead

Thenks,but no work with "==" .
01-29-2011 11:15 PM
Find all posts by this user Quote this message in a reply
llynx Offline
Member

Post: #4
RE: Processing of events GUI
Struct code

Code:
static void game_kosti (GameMenuClass &gm)
{
//check if visible
//if false
    game_list.show();
//if true
    game_list.hide();
}

Create code

Code:
getButton("game_kosti").func(game_kosti,T);

Something like that
01-30-2011 12:50 AM
Find all posts by this user Quote this message in a reply
Babulesnik Offline
Member

Post: #5
RE: Processing of events GUI
(01-30-2011 12:50 AM)llynx Wrote:  Struct code

Code:
static void game_kosti (GameMenuClass &gm)
{
//check if visible
//if false
    game_list.show();
//if true
    game_list.hide();
}

Create code

Code:
getButton("game_kosti").func(game_kosti,T);

Something like that

Thank you very much, but occur an error, I do not know what to write here - static void game_kosti ( ? )

Code:

static void game_kosti (GameMenuClass &gm)
{
if (game_list.show()==false)game_list.show();
if (game_list.hide()==false)game_list.hide();
}

game_menu.getButton("game_kosti").func(game_kosti,T);
01-30-2011 01:37 PM
Find all posts by this user Quote this message in a reply
Barthap Offline
Member

Post: #6
RE: Processing of events GUI
Shouldn't it be game_list.visible() in your if's? Methods .show() and .hide() don't return bool value. (the same with Ms.show(), .hide(), Ms.visible() and .hidden()).
01-30-2011 03:03 PM
Find all posts by this user Quote this message in a reply
Babulesnik Offline
Member

Post: #7
RE: Processing of events GUI
(01-30-2011 03:03 PM)Barthap Wrote:  Shouldn't it be game_list.visible() in your if's? Methods .show() and .hide() don't return bool value. (the same with Ms.show(), .hide(), Ms.visible() and .hidden()).

Problem not in it.

static void game_kosti (GameMenuClass &gm)
{
//if (game_list.show()==false)game_list.show();
//if (game_list.hide()==false)game_list.hide();
}
So too does not work
01-30-2011 04:14 PM
Find all posts by this user Quote this message in a reply
llynx Offline
Member

Post: #8
RE: Processing of events GUI
Please read:

Code:
Tutorials\Source\Advanced\1 - Geometry, Graphics, Gui, Misc, Net, Sound\Gui\02 - Buttons.cpp
01-30-2011 05:30 PM
Find all posts by this user Quote this message in a reply
Babulesnik Offline
Member

Post: #9
RE: Processing of events GUI
(01-30-2011 05:30 PM)llynx Wrote:  Please read:

Code:
Tutorials\Source\Advanced\1 - Geometry, Graphics, Gui, Misc, Net, Sound\Gui\02 - Buttons.cpp

Thanks.
void game_kosti (Ptr)
{
//if (game_list.show()==false)game_list.show();
//if (game_list.hide()==false)game_list.hide();

if(game_list.getWindow("lobbi_list").hidden()==false)game_list.hide();else
game_list.show();
}

game_menu.getButton("game_kosti").func(game_kosti);

Now works smile
(This post was last modified: 01-30-2011 06:27 PM by Babulesnik.)
01-30-2011 06:13 PM
Find all posts by this user Quote this message in a reply
Post Reply