Quick question. I am trying to make a button with a differnt texture for differnt button states: Hover, Pressed, Up, etc...
So first I made a sprite bank
Code: Select all
IGUISpriteBank *ButtonSprites = guienv->addEmptySpriteBank("ButtonSprite");
Then I loaded two textures
Code: Select all
ButtonSprites->addTexture(driver->getTexture("../Media/GUI/SpellButtons/Button_Normal_Hover.png"));
ButtonSprites->addTexture(driver->getTexture("../Media/GUI/SpellButtons/Button_Click_Render.png"));
Then I tried to set the two textures to differnt button states
Code: Select all
Button->setSpriteBank(ButtonSprites);
Button->setSprite(EGBS_BUTTON_MOUSE_OVER ,0);
Button->setSprite(EGBS_BUTTON_DOWN,1);
My code all works it compiles just fine, the console reports the textures loading, and I know that the buttons are positioned correctly because I can still click on them, but none of the textures show up. Sorry if this seems like a "solve my problems" thread but I can not find anything in the API to hint at what I am doing wrong.