1) Textures do not load for buttons. I've loaded the textures using CAttributes, and I know the path is correct because it is used to display the image elsewhere (and the path for displaying it elsewhere has been taken directly from the CAttribute instance). For some reason, no matter what the given parameters, they don't load for buttons.
For one image (.jpg) irrlicht returns a message that the textures have been re-sized (106x82 -> 64x64,3), but it says it loaded it. I also created a 64x64 image (.bmp) that I've used to test it.
So far, .bmp and .jpg files have been tested.
I'm loading the textures using:
Code: Select all
tag->setAttribute( name, irrDev->getVideoDriver()->getTexture( word ) );
2) GUI context menus act funny in a way that's hard to pinpoint what the problem is. They load, however, allow me to describe their activity:
Example uses a two-option context menu, the second option being another context menu. The first menu I will call "outer menu" and the second menu I will call "inner menu" for the sake of simplicity. The outer menu is open at all times.
I use the following code to test for highlighting:
Code: Select all
using namespace irr;
class SER : public IEventReceiver
{
// constructor... (nothing in there)
//...
// on event:
bool OnEvent( const SEvent& event )
{
if ( event.EventType == EET_GUI_EVENT )
{
gui::IGUIElement* elem = event.GUIEvent.Caller;
/* The outer menu has been assigned the ID of 20 and the inner menu has been assigned the ID of 15 */
if ( elem->getID() = 20 || elem->getID() == 15 )
{
cout << "\nMenu(" << elem->getID() << ")";
s32 i = ((gui::IGUIContextMenu*)elem)->getSelectedItem();
cout << "\nButton(" << i << ")";
}
}
}
};
When the outer menu is scrolled over, nothing happens. It simply recognizes the outer menu has been scrolled over.
Upon clicking the first option, it highlights.
Scrolling over the second option does nothing. The first is still highlighted.
Clicking on the first option allows me to turn the check mark on and off, if I have it on there.
Clicking and dragging from the first option to the second option highlights the second option and de-highlights the first option. The innter menu is now open.
Output:
Code: Select all
Menu(20)
Button(0)
Output:
Code: Select all
Menu(15)
Button(0)
Clicking on the second option gives the output:
Code: Select all
Menu(20)
Button(1)
Scrolling back up to the first option of the inner menu does nothing.
Clicking the first option of the inner menu at this point does nothing.
Clicking and dragging from the inner menu second option to the inner menu first option does nothing.
Clicking on the second option of the outer menu produces the output:
Code: Select all
Menu(15)
Button(1)
Menu(15)
Button(1)
Menu(20)
Button(1)
Now: the most peculiar activity:
>> In only the OUTER open context menu does the check-mark ever change, and that's only when the option is selected, which has to be done by clicking and dragging the highlighting from one option to the other. Auto-checking is set to true.
>> Furthermore, regardless of the settings on context menus, the inner context menu doesn't close after you select and option. Yet it does when it's part of a bar menu.
>> In the bar menu, clicking on an item in a sub menu will close the sub menu but not change the check mark (to on or off).