i create a NStateButton. but, when the cursor on it ,this widget disppared but it can respond its event. my code is:
QuickGUI::NStateButton *frontTexButton = NULL;
QuickGUI::NStateButton* stateButton = window->createNStateButton(QuickGUI::Rect(x, y, width, height));
frontTexButton = window->getNStateButton(0);
why it's disappeared? thanks!
If the texture StaButtonMatName cannot be found in Ogre Resource Manager or on disk, the Widget's quad will render invisible. Make sure you are using valid Texture names. Materials are no longer supported.
Also, if the assumed textures are not valid, they will render invisible also. For example, lets say
StaButtonMatName = "huaner.png"
Then, QuickGUI will try to make use of the following textures:
If they do not exist, they will make the NStateButton invisible. *.over* is applied when mouse is over the button, and *.down* is applied when left mouse button down on button.
If the texture StaButtonMatName cannot be found in Ogre Resource Manager or on disk, the Widget's quad will render invisible. Make sure you are using valid Texture names. Materials are no longer supported
thank you for reply. but, i'am sorry that i don't understand clearly. i'am sure i give a texture name to "StaButtonMatName", e.g.next.png. the rendering is all right. just when i click on StateButton, this widget is invisible; but, the event is responded.
so, the trouble is that this widget is visible at first, but invisible when i click it to respond my event.
When you mouse over, it will try to apply next.over.png
When you mouse button down on it, it will try to apply next.down.png
If you don't have next.down.png, the button will be invisible.