How to use PushButton and Input Box ?

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

User avatar
ArKada
Not too shy to talk
Not too shy to talk
Posts: 22
Joined: Fri Jan 23, 2009 14:46

How to use PushButton and Input Box ?

Postby ArKada » Mon May 24, 2010 17:07

Hello everyone !
I have only one question. :D

How i can know in my program when a PushButton is push and how i can to get the value of an Input Box ?

And I wonder why when I click repeatedly on a button fast enough, only one click is taken into account every 3-5 click ?

Greetings !

Arkada aka Gouwi

Jamarr
CEGUI MVP
CEGUI MVP
Posts: 812
Joined: Tue Jun 03, 2008 23:59
Location: USA

Re: How to use PushButton and Input Box ?

Postby Jamarr » Mon May 24, 2010 19:35

ArKada wrote:Hello everyone ! I have only one question. :D


But you asked three questions :)

How i can know in my program when a PushButton is push

There are several examples of this already on the forums, and on the wiki. Please spend some time searching for answers before asking your question. The FAQ on the wiki already has an entry for event-subscription.

and how i can to get the value of an Input Box ?

If you take a look at any of the example projects included with CEGUI, or as mentioned above search the wiki and/or forums, you will find that you can query the text-value of an input-box via the Window::getText method. These are issues for which you should be able to derive the answer yourself. By asking such questions, you are asking us to do the work for you; a large majority of the time, when we answer questions, we use the same tools and information that everyone has access too to find the answer. You are just as capable as I to find these answers :wink:

And I wonder why when I click repeatedly on a button fast enough, only one click is taken into account every 3-5 click ?

Please refer to the Forum Guidelines when posting potential bugs. It is important that we know details about the environment you are using; this information is usually included in the CEGUI.log file. Also, it is necessary to provide, at the least, snippets of the code you are using; otherwise it will be difficult to help you diagnose the problem. It sounds like you are injecting inputs correctly, but just in case, you may want to review the Input Tutorial to ensure you have set things up correctly.
If somebody helps you by replying to your thread, upvote him/her as a thanks! Make sure to include your CEGUI.log and everything you tried when posting! And remember that we are not magicians!

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

Re: How to use PushButton and Input Box ?

Postby CrazyEddie » Tue May 25, 2010 10:13

And I wonder why when I click repeatedly on a button fast enough, only one click is taken into account every 3-5 click ?

This may well be because the window/widget is set up to receive 'multi-click' events, such as double-click / triple-click. If you disable this, either in the looknfeel or layouts via the WantsMultiClickEvents property, you should get all the clicks on a button working correctly.

CE.


Return to “Help”

Who is online

Users browsing this forum: No registered users and 5 guests