本文整理汇总了C++中mygui::ImageBox::setItemName方法的典型用法代码示例。如果您正苦于以下问题:C++ ImageBox::setItemName方法的具体用法?C++ ImageBox::setItemName怎么用?C++ ImageBox::setItemName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类mygui::ImageBox
的用法示例。
在下文中一共展示了ImageBox::setItemName方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: changeMission
void GUIMissionWindow::changeMission( int index,MissionState state,std::string caption)
{
MyGUI::ImageBox* icon;
MyGUI::TextBox* text;
if(caption!="")
{
assignWidget(text,str(boost::format("Mission%1%Caption")%(index+1)));
if(caption!="clear")
{
text->setCaption(caption);
}
else
{
text->setCaption("");
}
}
assignWidget(icon,str(boost::format("Mission%1%Icon")%(index+1)));
switch (state)
{
case MS_New:
{
icon->setItemName("New");
break;
}
case MS_Complete:
{
icon->setItemName("Complete");
break;
}
case MS_Fail:
{
icon->setItemName("Fail");
break;
}
case MS_NULL:
{
icon->setItemName("");
break;
}
}
}
示例2: createScene
void DemoKeeper::createScene()
{
MyGUI::LayoutManager::getInstance().loadLayout("Wallpaper.layout");
const MyGUI::VectorWidgetPtr& root = MyGUI::LayoutManager::getInstance().loadLayout("HelpPanel.layout");
root.at(0)->findWidget("Text")->castType<MyGUI::TextBox>()->setCaption("Sample of picking mask for widget.");
MyGUI::ResourceManager::getInstance().load("Resources.xml");
const MyGUI::IntSize& view = MyGUI::RenderManager::getInstance().getViewSize();
const MyGUI::IntSize size(128, 128);
MyGUI::ImageBox* image = MyGUI::Gui::getInstance().createWidget<MyGUI::ImageBox>("ImageBox", MyGUI::IntCoord((view.width - size.width) / 2, (view.height - size.height) / 2, size.width, size.height), MyGUI::Align::Default, "Main");
image->setItemResource("pic_Crystal_Clear_Butterfly");
image->setItemGroup("States");
image->setItemName("Normal");
image->eventMouseSetFocus += MyGUI::newDelegate(notifyMouseSetFocus);
image->eventMouseLostFocus += MyGUI::newDelegate(notifyMouseLostFocus);
image->setMaskPick("Crystal_Clear_Butterfly_Pick.png");
}
示例3: notifyMouseLostFocus
void notifyMouseLostFocus(MyGUI::Widget* _sender, MyGUI::Widget* _new)
{
MyGUI::ImageBox* image = _sender->castType<MyGUI::ImageBox>();
image->setItemName("Normal");
}
示例4: notifyMouseSetFocus
void notifyMouseSetFocus(MyGUI::Widget* _sender, MyGUI::Widget* _old)
{
MyGUI::ImageBox* image = _sender->castType<MyGUI::ImageBox>();
image->setItemName("Active");
}