本文整理汇总了C++中cegui::WindowManager::createWindow方法的典型用法代码示例。如果您正苦于以下问题:C++ WindowManager::createWindow方法的具体用法?C++ WindowManager::createWindow怎么用?C++ WindowManager::createWindow使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类cegui::WindowManager
的用法示例。
在下文中一共展示了WindowManager::createWindow方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: setupCEGUI
void Application::setupCEGUI()
{
// CEGUI setup
m_renderer = new CEGUI::OgreCEGUIRenderer(m_window, Ogre::RENDER_QUEUE_OVERLAY, false, 3000, m_sceneManager);
m_system = new CEGUI::System(m_renderer);
CEGUI::SchemeManager::getSingleton().loadScheme((CEGUI::utf8*)"TaharezLookSkin.scheme");
m_system->setDefaultMouseCursor((CEGUI::utf8*)"TaharezLook", (CEGUI::utf8*)"MouseArrow");
m_system->setDefaultFont((CEGUI::utf8*)"BlueHighway-12");
CEGUI::WindowManager *win = CEGUI::WindowManager::getSingletonPtr();
CEGUI::Window *sheet = win->createWindow("DefaultGUISheet", "Sheet");
float distanceBorder = 0.01;
float sizeX = 0.2;
float sizeY = 0.05;
float posX = distanceBorder;
float posY = distanceBorder;
debugWindow = win->createWindow("TaharezLook/StaticText", "Widget1");
debugWindow->setPosition(CEGUI::UVector2(CEGUI::UDim(posX, 0), CEGUI::UDim(posY, 0)));
debugWindow->setSize(CEGUI::UVector2(CEGUI::UDim(sizeX, 0), CEGUI::UDim(sizeY, 0)));
debugWindow->setText("Debug Info!");
sheet->addChildWindow(debugWindow);
m_system->setGUISheet(sheet);
}
示例2: createGUIWindow
/**
* Create all widgets and their initial contents.
*
* CEGUI is based on tree structure of Windows. On top of that
* tree is a GUISheet, named "root". Each child has a position and
* a size - both given as values relative to the parent elements area.
* Position is given as the top left corner of a child within the parent area.
* Size is given as the relative portions of the parent area.
*/
void createGUIWindow()
{
CEGUI::System *ceguiSystem= CEGUI::System::getSingletonPtr();
assert(ceguiSystem);
CEGUI::WindowManager *winMgr = CEGUI::WindowManager::getSingletonPtr();
assert(winMgr);
CEGUI::Window *ceguiRoot = winMgr->createWindow("DefaultGUISheet","root");
assert(ceguiRoot);
ceguiSystem->setGUISheet(ceguiRoot); // Top element, fills the display area
CEGUI::UVector2 buttonSize = CEGUI::UVector2(CEGUI::UDim(0.6, 0), CEGUI::UDim(0.1, 0));
setupCEGUIResources();
// Create a button of type "TaharezLook/Button" and name "root/Button"
mButton = winMgr->createWindow(
reinterpret_cast<const CEGUI::utf8*>("TaharezLook/Button"),
reinterpret_cast<const CEGUI::utf8*>("root/Button"));
mButton->setAlpha(0.5f);
mButton->setText("Hello World!");
mButton->setSize(buttonSize);
mButton->setPosition(CEGUI::UVector2(CEGUI::UDim(0.2, 0), CEGUI::UDim(0.6, 0)));
mEditBox = winMgr->createWindow(
reinterpret_cast<const CEGUI::utf8*>("TaharezLook/Editbox"),
reinterpret_cast<const CEGUI::utf8*>("root/EditBox"));
mEditBox->setAlpha(0.5f);
mEditBox->setSize(CEGUI::UVector2(CEGUI::UDim(0.6, 0), CEGUI::UDim(0.1, 0)));
mEditBox->setPosition(CEGUI::UVector2(CEGUI::UDim(0.2, 0), CEGUI::UDim(0.3, 0)));
// Add both created elements to the GUI sheet.
ceguiRoot->addChildWindow(mEditBox);
ceguiRoot->addChildWindow(mButton);
/* Add event subscribers to both elements.
* CEGUI input handling is based on function pointers being subscribed
* to certain events - events of each window type are defined in the
* CEGUI API docs. When the event occurs, all subscriber functions
* are called (in some order?)
*/
// EventTextAccepted occurs when input box has focus, and user presses
// Enter, Return or Tab, and so accepts the input.
mEditBox->subscribeEvent(CEGUI::Editbox::EventTextAccepted,
CEGUI::Event::Subscriber(&inputEntered));
// EventClicked occurs when button is clicked.
mButton->subscribeEvent(CEGUI::PushButton::EventClicked,
CEGUI::Event::Subscriber(&inputEntered));
}
示例3: createMenu
void InGameMenuWindow::createMenu(MenuBase* menu)
{
CEGUI::WindowManager* windowMan = CEGUI::WindowManager::getSingletonPtr();
const ActionVector actions = ActionManager::getSingleton().getInGameGlobalActions();
map<CeGuiString, PopupMenu*> menuGroups;
for (ActionVector::const_iterator actIter = actions.begin(); actIter != actions.end(); actIter++)
{
Action* action = *actIter;
ActionGroup* group = action->getGroup();
if (group != NULL)
{
PopupMenu* menuGrp;
map<CeGuiString, PopupMenu*>::iterator grpIter = menuGroups.find(group->getName());
if (grpIter != menuGroups.end())
{
menuGrp = (*grpIter).second;
}
else
{
MenuItem* grpItem = static_cast<MenuItem*>(windowMan->createWindow("RastullahLook/MenuItem",
getNamePrefix()+"IngameMenu/"+group->getName()));
grpItem->setText(group->getName());
menu->addChildWindow(grpItem);
menuGrp = static_cast<PopupMenu*>(windowMan->createWindow("RastullahLook/PopupMenu",
getNamePrefix()+"IngameMenu/Menu"+group->getName()));
grpItem->addChildWindow(menuGrp);
menuGroups[group->getName()] = menuGrp;
}
MenuItem* item = static_cast<MenuItem*>(windowMan->createWindow("RastullahLook/MenuItem",
getNamePrefix()+"IngameMenu/"+group->getName()+"/"+action->getName()));
item->setText(action->getDescription());
menuGrp->addChildWindow(item);
setAction(item, action);
}
}
}
示例4: CreateText
CEGUI::Window* TestAARHUD::CreateText(const std::string& name, CEGUI::Window* parent, const std::string& text,
float x, float y, float width, float height)
{
CEGUI::WindowManager* wm = CEGUI::WindowManager::getSingletonPtr();
// create base window and set our default attribs
CEGUI::Window* result = wm->createWindow("WindowsLook/StaticText", name);
parent->addChildWindow(result);
result->setText(text);
result->setPosition(CEGUI::UVector2(cegui_absdim(x), cegui_absdim(y)));
result->setSize(CEGUI::UVector2(cegui_absdim(width), cegui_absdim(height)));
result->setProperty("FrameEnabled", "false");
result->setProperty("BackgroundEnabled", "false");
result->setHorizontalAlignment(CEGUI::HA_LEFT);
result->setVerticalAlignment(CEGUI::VA_TOP);
// set default color to white
result->setProperty("TextColours",
CEGUI::PropertyHelper::colourToString(CEGUI::colour(1.0f, 1.0f, 1.0f)));
result->show();
return result;
}
示例5: createGUI
void BasicWindow::createGUI(void) {
mRenderer = &CEGUI::OgreRenderer::bootstrapSystem();
CEGUI::Imageset::setDefaultResourceGroup("Imagesets");
CEGUI::Font::setDefaultResourceGroup("Fonts");
CEGUI::Scheme::setDefaultResourceGroup("Schemes");
CEGUI::WidgetLookManager::setDefaultResourceGroup("LookNFeel");
CEGUI::WindowManager::setDefaultResourceGroup("Layouts");
CEGUI::SchemeManager::getSingleton().create("TaharezLook.scheme");
CEGUI::System::getSingleton().setDefaultMouseCursor("TaharezLook", "MouseArrow");
CEGUI::WindowManager* winMgr = CEGUI::WindowManager::getSingletonPtr();
CEGUI::System* guiSystem = CEGUI::System::getSingletonPtr();
CEGUI::Window* rootWindow = winMgr->createWindow("DefaultWindow", "root");
guiSystem->setGUISheet(rootWindow);
/* not using the gui quite yet:
try {
rootWindow->addChildWindow(CEGUI::WindowManager::getSingleton().loadWindowLayout("Console.layout"));
rootWindow->addChildWindow(CEGUI::WindowManager::getSingleton().loadWindowLayout("RightPanel.layout"));
} catch (CEGUI::Exception& e) {
OGRE_EXCEPT(Ogre::Exception::ERR_INTERNAL_ERROR, std::string(e.getMessage().c_str()), "Error parsing gui layout");
}
*/
/*
// "Quit" button:
CEGUI::WindowManager& winMgr = CEGUI::WindowManager::getSingleton();
CEGUI::Window* sheet = winMgr.createWindow("DefaultWindow", "CEGUIDemo/Sheet");
CEGUI::Window* quit = winMgr.createWindow("TaharezLook/Button", "CEGUIDemo/QuitButton");
quit->setText("Quit");
quit->setSize(CEGUI::UVector2(CEGUI::UDim(0.15f, 0), CEGUI::UDim(0.05f, 0)));
quit->subscribeEvent(CEGUI::PushButton::EventClicked, CEGUI::Event::Subscriber(&BasicWindow::quit, this));
sheet->addChildWindow(quit);
CEGUI::System::getSingleton().setGUISheet(sheet);
*/
}
示例6: Application
//.........这里部分代码省略.........
if (!kbd) return ReportError("Failed to locate Keyboard Driver!");
loader = csQueryRegistry<iLoader> (GetObjectRegistry());
if (!loader) return ReportError("Failed to locate Loader!");
vfs = csQueryRegistry<iVFS> (GetObjectRegistry());
if (!vfs) return ReportError("Failed to locate VFS!");
confman = csQueryRegistry<iConfigManager> (GetObjectRegistry());
if (!confman) return ReportError("Failed to locate Config Manager!");
cegui = csQueryRegistry<iCEGUI> (GetObjectRegistry());
if (!cegui) return ReportError("Failed to locate CEGUI plugin");
// Initialize the CEGUI wrapper
cegui->Initialize ();
// Let the CEGUI plugin take care of the rendering by itself
cegui->SetAutoRender (true);
// Set the logging level
cegui->GetLoggerPtr ()->setLoggingLevel(CEGUI::Informative);
vfs->ChDir ("/cegui/");
// Load the 'ice' skin (which uses the Falagard skinning system)
cegui->GetSchemeManagerPtr ()->create("ice.scheme");
cegui->GetSystemPtr ()->setDefaultMouseCursor("ice", "MouseArrow");
// Setup the fonts
cegui->GetFontManagerPtr ()->createFreeTypeFont
(FONT_NORMAL, 10, true, "/fonts/ttf/DejaVuSerif.ttf");
cegui->GetFontManagerPtr ()->createFreeTypeFont
(FONT_NORMAL_ITALIC, 10, true, "/fonts/ttf/DejaVuSerif-Italic.ttf");
cegui->GetFontManagerPtr ()->createFreeTypeFont
(FONT_TITLE, 15, true, "/fonts/ttf/DejaVuSerif-Bold.ttf");
cegui->GetFontManagerPtr ()->createFreeTypeFont
(FONT_TITLE_ITALIC, 15, true, "/fonts/ttf/DejaVuSerif-BoldItalic.ttf");
CEGUI::WindowManager* winMgr = cegui->GetWindowManagerPtr ();
// Load the CEGUI layout and set it as the root layout
vfs->ChDir ("/data/startme/");
cegui->GetSchemeManagerPtr ()->create ("crystal.scheme");
cegui->GetSystemPtr ()->setGUISheet(winMgr->loadWindowLayout ("startme.layout"));
// We need a View to the virtual world.
view.AttachNew (new csView (engine, g3d));
LoadConfig ();
CEGUI::Window* logo = winMgr->getWindow("Logo");
logo->subscribeEvent(CEGUI::Window::EventMouseClick,
CEGUI::Event::Subscriber(&StartMe::OnLogoClicked, this));
///TODO: Using 'EventMouseEntersArea' is more correct but is only available
/// in 0.7.2+
logo->subscribeEvent(CEGUI::Window::EventMouseEnters,
CEGUI::Event::Subscriber(&StartMe::OnEnterLogo, this));
logo->subscribeEvent(CEGUI::Window::EventMouseLeaves,
CEGUI::Event::Subscriber(&StartMe::OnLeaveLogo, this));
vfs->ChDir ("/lib/startme");
CEGUI::Window* root = winMgr->getWindow("root");
for (size_t i = 0 ; i < demos.GetSize () ; i++)
{
demos[i].window = winMgr->createWindow("crystal/Icon");
demos[i].window->setSize(CEGUI::UVector2(CEGUI::UDim(0.0f, 128.0f), CEGUI::UDim(0.0f, 128.0f)));
demos[i].window->setPosition(CEGUI::UVector2(CEGUI::UDim(0.0f, 0.0f), CEGUI::UDim(0.0f, 0.0f)));
demos[i].window->setVisible(false);
CEGUI::ImagesetManager* imsetmgr = cegui->GetImagesetManagerPtr();
if (!imsetmgr->isDefined(demos[i].image))
imsetmgr->createFromImageFile(demos[i].image, demos[i].image);
std::string img = "set:"+std::string(demos[i].image)+" image:full_image";
demos[i].window->setProperty("Image", img);
root->addChildWindow(demos[i].window);
demos[i].window->subscribeEvent(CEGUI::Window::EventMouseClick,
CEGUI::Event::Subscriber(&StartMe::OnClick, this));
}
// Initialize the starting position of the demo wheel to a random value
csRandomFloatGen frandomGenerator;
position = frandomGenerator.Get (demos.GetSize () - 1);
// Let the engine prepare everything
engine->Prepare ();
printer.AttachNew (new FramePrinter (object_reg));
// This calls the default runloop. This will basically just keep
// broadcasting process events to keep the application going on.
Run();
return true;
}
示例7: setupCEGUI
void OgreWiiApp::setupCEGUI()
{
//mWindow = mRoot->getAutoCreatedWindow();
mRenderer = new CEGUI::OgreCEGUIRenderer(mWindow, Ogre::RENDER_QUEUE_OVERLAY, false, 3000, mSceneMgr);
mSystem = new CEGUI::System(mRenderer);
CEGUI::SchemeManager::getSingleton().loadScheme((CEGUI::utf8*)"TaharezLookSkin.scheme");
mSystem->setDefaultMouseCursor((CEGUI::utf8*)"TaharezLook", (CEGUI::utf8*)"MouseArrow");
mSystem->setDefaultFont((CEGUI::utf8*)"BlueHighway-12");
CEGUI::WindowManager *winMgr = CEGUI::WindowManager::getSingletonPtr();
CEGUI::Window *sheet = winMgr->createWindow("DefaultGUISheet", "Vp/Sheet");
CEGUI::UVector2 buttonSize(CEGUI::UDim(0.15, 0), CEGUI::UDim(0.05, 0));
CEGUI::UVector2 checkboxSize(CEGUI::UDim(0.15, 0), CEGUI::UDim(0.05, 0));
CEGUI::UVector2 comboboxSize(CEGUI::UDim(0.15, 0), CEGUI::UDim(0.15, 0));
CEGUI::UVector2 infoboxSize(CEGUI::UDim(0.5, 0.0), CEGUI::UDim(0.1, 0.0));
CEGUI::UVector2 controlboxSize(CEGUI::UDim(0.5, 0.0), CEGUI::UDim(0.5, 0.0));
CEGUI::UVector2 scrollSize(CEGUI::UDim(0.15, 0), CEGUI::UDim(0.025, 0));
float dy = 0.06f;
float y = 0.01f;
CEGUI::Window *win = winMgr->createWindow("TaharezLook/Editbox", "Vp/OscAddress");
win->setText(mAddress);
win->setPosition( CEGUI::UVector2( CEGUI::UDim( 0.01f, 0 ), CEGUI::UDim( y, 0 ) ) );
win->setSize(buttonSize);
sheet->addChildWindow(win);
y+=dy;
win = winMgr->createWindow("TaharezLook/Editbox", "Vp/OscPort");
win->setText(StringConverter::toString(mPort));
win->setPosition( CEGUI::UVector2( CEGUI::UDim( 0.01f, 0 ), CEGUI::UDim( y, 0 ) ) );
win->setSize(buttonSize);
sheet->addChildWindow(win);
y+=dy;
win = winMgr->createWindow("TaharezLook/Button", "Vp/Reconnect");
win->setText("Reconnect");
win->setPosition( CEGUI::UVector2( CEGUI::UDim( 0.01f, 0 ), CEGUI::UDim( y, 0 ) ) );
win->setSize(buttonSize);
sheet->addChildWindow(win);
y+=dy;
win = winMgr->createWindow("TaharezLook/Checkbox", "Vp/FirstPersonView");
win->setPosition( CEGUI::UVector2( CEGUI::UDim( 0.01f, 0 ), CEGUI::UDim( y, 0 ) ) );
win->setText("First Person View");
win->setSize(checkboxSize);
sheet->addChildWindow(win);
y+=dy;
win = winMgr->createWindow("TaharezLook/HorizontalScrollbar", "Vp/Scrollbar1");
win->setText("Scrollbar1");
win->setPosition( CEGUI::UVector2( CEGUI::UDim( 0.01f, 0 ), CEGUI::UDim( y, 0 ) ) );
win->setSize(scrollSize);
sheet->addChildWindow(win);
y+=dy;
win = winMgr->createWindow("TaharezLook/HorizontalScrollbar", "Vp/Scrollbar2");
win->setText("Scrollbar1");
win->setPosition( CEGUI::UVector2( CEGUI::UDim( 0.01f, 0 ), CEGUI::UDim( y, 0 ) ) );
win->setSize(scrollSize);
sheet->addChildWindow(win);
y+=dy;
win = winMgr->createWindow("TaharezLook/HorizontalScrollbar", "Vp/Scrollbar3");
win->setText("Scrollbar1");
win->setPosition( CEGUI::UVector2( CEGUI::UDim( 0.01f, 0 ), CEGUI::UDim( y, 0 ) ) );
win->setSize(scrollSize);
sheet->addChildWindow(win);
// Snapshot button
y+=dy;
win = winMgr->createWindow("TaharezLook/Button", "Vp/SnapButton");
win->setText("Shapshot");
win->setPosition( CEGUI::UVector2( CEGUI::UDim( 0.01f, 0 ), CEGUI::UDim( y, 0 ) ) );
win->setSize(buttonSize);
sheet->addChildWindow(win);
// Quit button
y+=dy;
win = winMgr->createWindow("TaharezLook/Button", "Vp/QuitButton");
win->setText("Quit");
win->setPosition( CEGUI::UVector2( CEGUI::UDim( 0.01f, 0 ), CEGUI::UDim( y, 0 ) ) );
win->setSize(buttonSize);
sheet->addChildWindow(win);
// Info txt box
win = winMgr->createWindow("TaharezLook/StaticText", "Vp/TextBoxInfo");
win->setPosition( CEGUI::UVector2( CEGUI::UDim( 0.01f, 0 ), CEGUI::UDim( 0.85f, 0 ) ) );
win->setSize(infoboxSize);
sheet->addChildWindow(win);
// Info txt box
win = winMgr->createWindow("TaharezLook/StaticText", "Vp/TextBoxAR");
win->setPosition( CEGUI::UVector2( CEGUI::UDim( 0.6f, 0 ), CEGUI::UDim( 0.85f, 0 ) ) );
win->setSize(infoboxSize);
win->setVisible(true);
sheet->addChildWindow(win);
// Controls txt box
//.........这里部分代码省略.........
示例8: SetupGUI
void TestAARHUD::SetupGUI(dtCore::DeltaWin& win,
dtCore::Keyboard& keyboard,
dtCore::Mouse& mouse)
{
char clin[HUDCONTROLMAXTEXTSIZE]; // general buffer to print
float curYPos;
float helpTextWidth = 400;
float taskTextWidth = 300;
try
{
// Initialize CEGUI
mGUI = new dtGUI::CEUIDrawable(&win, &keyboard, &mouse);
std::string scheme = "gui/schemes/WindowsLook.scheme";
std::string path = dtCore::FindFileInPathList(scheme);
if (path.empty())
{
throw dtUtil::Exception(ARRHUDException::INIT_ERROR,
"Failed to find the scheme file.", __FILE__, __LINE__);
}
std::string dir = path.substr(0, path.length() - (scheme.length() - 3));
dtUtil::FileUtils::GetInstance().PushDirectory(dir);
CEGUI::SchemeManager::getSingleton().loadScheme(path);
dtUtil::FileUtils::GetInstance().PopDirectory();
CEGUI::WindowManager* wm = CEGUI::WindowManager::getSingletonPtr();
CEGUI::System::getSingleton().setDefaultFont("DejaVuSans-10");
CEGUI::System::getSingleton().getDefaultFont()->setProperty("PointSize", "14");
mMainWindow = wm->createWindow("DefaultGUISheet", "root");
CEGUI::System::getSingleton().setGUISheet(mMainWindow);
// MEDIUM FIELDS - on in Medium or max
mHUDOverlay = wm->createWindow("WindowsLook/StaticImage", "medium_overlay");
mMainWindow->addChildWindow(mHUDOverlay);
mHUDOverlay->setPosition(CEGUI::UVector2(cegui_reldim(0.0f),cegui_reldim(0.0f)));
mHUDOverlay->setSize(CEGUI::UVector2(cegui_reldim(1.0f), cegui_reldim(1.0f)));
mHUDOverlay->setProperty("FrameEnabled", "false");
mHUDOverlay->setProperty("BackgroundEnabled", "false");
// Main State - idle/playback/record
mStateText = CreateText("State Text", mHUDOverlay, "", 10.0f, 20.0f, 120.0f, mTextHeight + 5);
mStateText->setProperty("TextColours", "tl:FFFF1919 tr:FFFF1919 bl:FFFF1919 br:FFFF1919");
//mStateText->setFont("DejaVuSans-10");
// Core sim info
mSimTimeText = CreateText("Sim Time", mHUDOverlay, "Sim Time",
0.0f, 0.0f, mRightTextXOffset - 2, mTextHeight);
mSpeedFactorText = CreateText("Speed Factor", mHUDOverlay, "Speed",
0.0f, 0.0f, mRightTextXOffset - 2, mTextHeight);
// Detailed record/playback info
mRecordDurationText = CreateText(std::string("Duration"), mHUDOverlay, std::string("Duration"),
0, 0, mRightTextXOffset - 2, mTextHeight);
mNumMessagesText = CreateText(std::string("Num Msgs"), mHUDOverlay, std::string("Num Msgs"),
0, 0, mRightTextXOffset - 2, mTextHeight);
mNumTagsText = CreateText(std::string("Num Tags"), mHUDOverlay, std::string("Num Tags"),
0, 0, mRightTextXOffset - 2, mTextHeight);
mLastTagText = CreateText(std::string("Last Tag"), mHUDOverlay, std::string("LastTag:"),
0, 0, mRightTextXOffset - 2, mTextHeight);
mNumFramesText = CreateText(std::string("Num Frames"), mHUDOverlay, std::string("Num Frames"),
0, 0, mRightTextXOffset - 2, mTextHeight);
mLastFrameText = CreateText(std::string("Last Frame"), mHUDOverlay, std::string("Last Frame"),
0, 0, mRightTextXOffset - 2, mTextHeight);
mCurLogText = CreateText(std::string("Cur Log"), mHUDOverlay, std::string("Cur Log"),
0, 0, mRightTextXOffset - 2, mTextHeight);
mCurMapText = CreateText(std::string("Cur Map"), mHUDOverlay, std::string("Cur Map"),
0, 0, mRightTextXOffset - 2, mTextHeight);
// Core Tips at top of screen (HUD Toggle and Help)
mFirstTipText = CreateText(std::string("First Tip"), mHUDOverlay, std::string("(F2 for MED HUD)"),
0, mTextYTopOffset, 160, mTextHeight + 2);
mFirstTipText->setHorizontalAlignment(CEGUI::HA_CENTRE);
mSecondTipText = CreateText(std::string("Second Tip"), mHUDOverlay, std::string(" (F1 for Help)"),
0, mTextYTopOffset + mTextHeight + 3, 160, mTextHeight + 2);
mSecondTipText->setHorizontalAlignment(CEGUI::HA_CENTRE);
// TASK FIELDS
// task header
curYPos = 70;
mTasksHeaderText = CreateText(std::string("Task Header"), mHUDOverlay, std::string("Tasks:"),
4, curYPos, taskTextWidth - 2, mTextHeight + 2);
//mTasksHeaderText->setFont("DejaVuSans-10");
curYPos += 2;
// 11 placeholders for tasks
for (int i = 0; i < 11; i++)
{
snprintf(clin, HUDCONTROLMAXTEXTSIZE, "Task %i", i);
curYPos += mTextHeight + 2;
mTaskTextList.push_back(CreateText(std::string(clin), mHUDOverlay, std::string(clin),
12, curYPos, taskTextWidth - 2, mTextHeight + 2));
}
// HELP FIELDS
//.........这里部分代码省略.........