本文整理汇总了C++中mygui::Button::setTextColour方法的典型用法代码示例。如果您正苦于以下问题:C++ Button::setTextColour方法的具体用法?C++ Button::setTextColour怎么用?C++ Button::setTextColour使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类mygui::Button
的用法示例。
在下文中一共展示了Button::setTextColour方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: addButtons
void GUIManager::addButtons(TiXmlNode* buttons_node, float* values, MyGUI::Window* w)
{
for(TiXmlNode* button_node = buttons_node->FirstChild("button"); button_node; button_node = button_node->NextSibling())
{
std::string name_text = GameManager::textFromChildNode(button_node, "name");
std::string caption_text = GameManager::textFromChildNode(button_node, "caption");
std::string skin_text = GameManager::textFromChildNode(button_node, "skin");
std::string position_text = GameManager::textFromChildNode(button_node, "position");
GameManager::parseFloats(position_text, values);
uint32 left = (uint32) values[0];
uint32 top = (uint32) values[1];
std::string size_text = GameManager::textFromChildNode(button_node, "size");
GameManager::parseFloats(size_text, values);
uint32 width = (uint32) values[0];
uint32 height = (uint32) values[1];
std::string file_name_text = GameManager::textFromChildNode(button_node, "file_name");
std::string script_name_text = GameManager::textFromChildNode(button_node, "script_name");
std::string font_size_text = GameManager::textFromChildNode(button_node, "font");
uint32 font_size = (uint32) GameManager::parseFloat(font_size_text);
MyGUI::Button* b = w->createWidget<MyGUI::Button>(skin_text, left, top, width, height, MyGUI::Align::Default, name_text);
b->setCaption(caption_text);
b->setFontHeight(font_size);
b->setTextColour(MyGUI::Colour(0,0,0));
b->eventMouseButtonPressed += newDelegate(this, &GUIManager::buttonGUIDelegate);
GUIWidgetScript* widget_script = new GUIWidgetScript(b, name_text);
widget_script->setFileName(file_name_text);
widget_script->setScriptName(script_name_text);
all_widgets->tableInsert(widget_script);
}
}