getMouseOverWidget()->getInstanceName & getNumberOfLi


18-09-2007 09:22:13

when i rectify my old code which is related to v.0.9.5, i found some questions. so, i hope you can help me. thanks
1. String str = gm->getMouseOverWidget()->getInstanceName()
i found that i pick up a point on the screen not on a widget, the value of str is "DefaultSheet". but in old version the value is "". maybe this is related to your new methods?
QuickGUI::Combox *fileCombox = openWindow->getComboBox(0);
QuickGUI::List *fileList = fileCombox->getDropDownList();
vector<String>::iterator iter = m_FileVector.begin();
size_t vectorCapatity = 0;
vectorCapatity = m_FileVector.size();
for(size_t i = 0; i < vectorCapatity; i++)

i = fileList->getNumberOfListItems();

i found the value of i is 0. why?
3. i can't see the image
QuickGUI::Image* image = SectorSetWindow->createImage(QuickGUI::Rect(x, y, width, height), materialName);
MarkLineImage = SectorSetWindow->getImage(0);


18-09-2007 16:16:35

No Problem. :)

1. I don't remember when, but I created a "Sheet" widget, which is the background. In this way, the mouse cursor is always over a gui widget. The sheet adds some organization by allowing users to create widgets right on the screen, not inside a window or panel. You can create Sheets from GUIManager.

2. Is m_FileVector.size() greater than 1? Also, how are you using "i", when its scope is defined inside the for loop? It shouldn't exist outside. Otherwise this might be a bug, I'd have to try to repro this when I get the chance.

3. What is the value of "materialName"? QuickGUI only supports Textures. Try something like "mytexture.png" and see if it shows up.

The wiki has some good information for you to skim over, would probably be helpful. :wink:


19-09-2007 01:35:28

3. What is the value of "materialName"? QuickGUI only supports Textures. Try something like "mytexture.png" and see if it shows up.

oh, i just find why i can see the image. i didn't give a value to borderwidth.
thank for your reply :D