How do I remove GUI button?
How do I remove GUI button?
I create game interface,How do I remove all button and background after click begin buttom.
Thanks!
Thanks!
-
- Posts: 17
- Joined: Sat Sep 25, 2010 8:54 am
Hello
RaverGames
Code: Select all
if(Button->isPressed()) // if Button is Pressed
{
Button->drop(); // drop Button
}
sorry,I can't understand.Sylence wrote:don't drop() it unless you grab() it before...
the method you are looking for is remove()
Code: Select all
IGUIEnvironment* env = device->getGUIEnvironment();
env->addButton(rect<s32>(10,240,110,240 + 32), 0, GUI_ID_START_BUTTON,L"Start", L"begin");
now , begin interface is useless after I click the button, than load 3d game frames.
sorry, my english is not good
-
- Posts: 26
- Joined: Fri Aug 20, 2010 11:07 am
- Location: Bulgaria
do like
and when you want to remove the button, do
Code: Select all
IGUIEnvironment* env = device->getGUIEnvironment();
IGUIButton* but = env->addButton(rect<s32>(10,240,110,240 + 32), 0, GUI_ID_START_BUTTON,L"Start", L"begin");
Code: Select all
but->remove()
thank you very muchno_response wrote:do like
and when you want to remove the button, doCode: Select all
IGUIEnvironment* env = device->getGUIEnvironment(); IGUIButton* but = env->addButton(rect<s32>(10,240,110,240 + 32), 0, GUI_ID_START_BUTTON,L"Start", L"begin");
Code: Select all
but->remove()
-
- Posts: 13
- Joined: Fri Mar 11, 2011 7:06 am
Please check the examples, especially 05.UserInterface.suresh kumar wrote:can any one tell me how to add button listeners and receiving events
?
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Check thissuresh kumar wrote:can any one tell me how to add button listeners and receiving events
?
http://irrlicht.sourceforge.net/phpBB2/ ... p?p=246120
We're programmers. Programmers are, in their hearts, architects, and the first thing they want to do when they get to a site is to bulldoze the place flat and build something grand. We're not excited by renovation:tinkering,improving,planting flower beds.