Button clicked evet

For help with general CEGUI usage:
- Questions about the usage of CEGUI and its features, if not explained in the documentation.
- Problems with the CMAKE configuration or problems occuring during the build process/compilation.
- Errors or unexpected behaviour.

Moderators: CEGUI MVP, CEGUI Team

pista75
Not too shy to talk
Not too shy to talk
Posts: 22
Joined: Sun May 15, 2011 10:41

Button clicked evet

Postby pista75 » Tue May 31, 2011 13:27

Hi.
My problem is that I loaded button from XML,but i can't treat in my c++ code.
What I can that treat clilck event?
Help me please,

User avatar
Kulik
CEGUI Team
Posts: 1382
Joined: Mon Jul 26, 2010 18:47
Location: Czech Republic
Contact:

Re: Button clicked evet

Postby Kulik » Tue May 31, 2011 13:56

Read documentation please...

Don't take this personally but if everyone asked these questions this forum would be overrun! SEARCH FIRST! And read the guidelines. One more thread like this and you are banned. Have a nice day :?

EDIT: For everyone thinking Kulik is too cruel, please see list of pista75's posts.
EDIT2: Downvoting admins sure is a good idea. :lol:

pista75
Not too shy to talk
Not too shy to talk
Posts: 22
Joined: Sun May 15, 2011 10:41

Re: Button clicked evet

Postby pista75 » Tue May 31, 2011 15:35

Function if you want to run just 1 click.
Why a new class of such **it?

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Re: Button clicked evet

Postby CrazyEddie » Tue May 31, 2011 15:50

There's no easy way to sugar coat this response, so I will not bother trying...

First, it's obvious that English in not your first language, but then it is not the first language of many on this forum, so I don't think that should be an excuse... However, it is definitely causing a lot of frustration, certainly to us, and no doubt to you, too.

Ok, here it comes :) Basically, in most of your posts we are unable to understand what you mean. We can't give meaningful answers because your posts lack clear questions, and also lack contextual information. I am a native English speaker, and this:
Function if you want to run just 1 click.
Why a new class of such **it?

is gibberish; it's meaningless nonsense. I have no idea how to answer this post, because it lacks any structure or form - it might as well be random words strung together.

My advice, for all your future posts, is to take some time to formulate your ideas clearly and post as much information as you can - as per the guidelines - we will try to help you if you make it easy for us. If you continue to make helping you difficult, we will not bother to try - you will be ignored.

I hope this makes the situation clear; it's not a personal attack, you're not the only one here with this problem.

CE.
Last edited by CrazyEddie on Tue May 31, 2011 15:52, edited 1 time in total.
Reason: Wrote some nonsense of my own ;)

pista75
Not too shy to talk
Not too shy to talk
Posts: 22
Joined: Sun May 15, 2011 10:41

Re: Button clicked evet

Postby pista75 » Tue May 31, 2011 15:56

ok.
My code:

Code: Select all

 WindowManager& wmgr = WindowManager::getSingleton();
wmgr.getWindow("TextDemo/Sub")->subscribeEvent(CEGUI::PushButton::EventClicked,CEGUI::Event::Subscriber(&kkk::add,this));


Errors:

Code: Select all

Error   7   error C2355: 'this' : can only be referenced inside non-static member functions
Error   8   error C2661: 'CEGUI::SubscriberSlot::SubscriberSlot' : no overloaded function takes 2 arguments
11   IntelliSense: 'this' may only be used inside a nonstatic member function
9   IntelliSense: no instance of constructor "CEGUI::SubscriberSlot::SubscriberSlot" matches the argument list
10   IntelliSense: function "kkk::add" (declared at line 72) is inaccessible


Sorry the last post...

User avatar
Kulik
CEGUI Team
Posts: 1382
Joined: Mon Jul 26, 2010 18:47
Location: Czech Republic
Contact:

Re: Button clicked evet

Postby Kulik » Tue May 31, 2011 16:01

OK this is definitely an improvement over the last post so kudos, keep it up.
The errors tell me that you are using this inside a static function or a free function. Please show how kkk::aaa is declared. Make sure you match the right function signature: bool mySlotFunction(const EventArgs& args)

PS: I don't need version info for this particular post but we require logs for all support requests for a reason, even if you think the log is useless, you should post it.

belkacem
Quite a regular
Quite a regular
Posts: 83
Joined: Fri Jan 07, 2011 13:55

Re: Button clicked evet

Postby belkacem » Tue May 31, 2011 19:53

i don't know what is your problem exactly but
i think you should read this

http://cegui.org.uk/api_reference/classCEGUI_1_1Event.html#a0ef19f1fda5ea2eb9dac93d7f6bb6537


Return to “Help”

Who is online

Users browsing this forum: No registered users and 8 guests