本文整理汇总了C++中ListboxTextItem类的典型用法代码示例。如果您正苦于以下问题:C++ ListboxTextItem类的具体用法?C++ ListboxTextItem怎么用?C++ ListboxTextItem使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了ListboxTextItem类的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ListboxTextItem
bool Zonsole::handleTextChanged(const EventArgs &e)
{
IConsole::handleTextChanged(inputWnd->getText().c_str());
if (m_matches.size())
{
if (!autoCompleteWnd->isVisible())
autoCompleteWnd->show();
autoCompleteWnd->resetList();
for (CmdMatchIter i = m_matches.begin(); i != m_matches.end(); i++)
{
ListboxTextItem *item = new ListboxTextItem(*i);
item->setSelectionBrushImage("TaharezLook", "ListboxSelectionBrush");
autoCompleteWnd->addItem(item);
}
// auto highlight the first item in the list, if it exists
if (autoCompleteWnd->getItemCount() > 0)
{
autoCompleteWnd->getListboxItemFromIndex(0)->setSelected(true);
}
}
else
{
if (autoCompleteWnd->isVisible())
autoCompleteWnd->hide();
}
return true;
}
示例2: sdl_update_roadbook
static void
sdl_update_roadbook(struct navigation *nav)
{
using namespace CEGUI;
extern Window* myRoot;
struct navigation_list *list;
list=navigation_list_new(nav);
// First, update the 'Navigation Tip' on the main window
try {
struct attr attr;
item_attr_get(navigation_list_get_item(list), attr_navigation_speech, &attr);
WindowManager::getSingleton().getWindow("Navit/Routing/Tips")->setText(attr.u.str);
}
catch (CEGUI::Exception& e)
{
fprintf(stderr,"CEGUI Exception occured: \n%s\n", e.getMessage().c_str());
printf("Missing control!...\n");
}
// Then, update the whole roadbook
try {
/* Currently we use the 'Navit' text to display the roadbook, until Mineque design a button for that
if(! WindowManager::getSingleton().getWindow("OSD/RoadbookButton")->isVisible()){
WindowManager::getSingleton().getWindow("OSD/RoadbookButton")->show();
}
*/
MultiColumnList* mcl = static_cast<MultiColumnList*>(WindowManager::getSingleton().getWindow("Roadbook"));
mcl->resetList();
item *item;
struct attr attr;
list=navigation_list_new(nav);
while ((item=navigation_list_get_item(list))) {
// printf("SDL : %s\n", str);
mcl->addRow();
item_attr_get(item, attr_navigation_short, &attr);
ListboxTextItem* itemListbox = new ListboxTextItem(attr.u.str);
itemListbox->setSelectionBrushImage("TaharezLook", "MultiListSelectionBrush");
mcl->setItem(itemListbox, 0, mcl->getRowCount()-1);
}
navigation_list_destroy(list);
}
catch (CEGUI::Exception& e)
{
fprintf(stderr,"CEGUI Exception occured: \n%s\n", e.getMessage().c_str());
printf("Missing control!...\n");
}
}
示例3: CeGuiString
void Console::appendTextRow(const CeGuiString& text, const colour color)
{
const float MIN_SPACE_POS = 0.5;
CeGuiString textLeft = CeGuiString(text);
CEGUI::Font* font = const_cast<CEGUI::Font*>(mDisplay->getFont());
unsigned int width = mDisplay->getPixelSize().d_width * 0.95f;
while (textLeft.length() > 0)
{
CeGuiString textLine;
if (font->getTextExtent(textLeft) > width)
{
unsigned int numLastChar = font->getCharAtPixel(textLeft, width);
unsigned int numSpace = textLeft.find_last_of(" \t\n", numLastChar);
if (numSpace == CeGuiString::npos || numSpace < MIN_SPACE_POS*numLastChar)
{
textLine = textLeft.substr(0, numLastChar);
textLeft = textLeft.substr(numLastChar);
}
else
{
textLine = textLeft.substr(0, numSpace);
textLeft = textLeft.substr(numSpace+1);
}
}
else
{
textLine = textLeft;
textLeft = "";
}
ListboxTextItem* item = new ListboxTextItem(textLine);
item->setTextColours(color);
mDisplay->addItem(item);
mDisplay->ensureItemIsVisible(item); // scroll to bottom;
}
//ListboxWrappedTextItem* item = new ListboxWrappedTextItem(text);
//item->setTextColours(color);
//item->setTextFormatting(CEGUI::WordWrapLeftAligned);
//mDisplay->addItem(item);
//mDisplay->ensureItemIsVisible(item); // scroll to bottom;*/
}
示例4: atoi
bool Demo6Sample::handleSetItem(const CEGUI::EventArgs& e)
{
using namespace CEGUI;
// get access to the widgets that contain details about the item to be modified
MultiColumnList* mcl = static_cast<MultiColumnList*>(WindowManager::getSingleton().getWindow("Demo6/MainList"));
Editbox* idbox = static_cast<Editbox*>(WindowManager::getSingleton().getWindow("Demo6/ControlPanel/ColumnPanel/SetItemIDBox"));
Editbox* rowbox = static_cast<Editbox*>(WindowManager::getSingleton().getWindow("Demo6/ControlPanel/ColumnPanel/SetItemRowBox"));
Editbox* textbox = static_cast<Editbox*>(WindowManager::getSingleton().getWindow("Demo6/ControlPanel/ColumnPanel/SetItemTextBox"));
// get ID of column to be affected
CEGUI::uint id = atoi(idbox->getText().c_str());
// get index of row to be affected
CEGUI::uint row = atoi(rowbox->getText().c_str());
// get new text for item
String text = textbox->getText();
// reset input boxes
idbox->setText("");
rowbox->setText("");
textbox->setText("");
// create a new ListboxTextItem using the new text string
ListboxTextItem* item = new ListboxTextItem(text);
// set the selection brush to be used for this item.
item->setSelectionBrushImage(&ImagesetManager::getSingleton().getImageset("TaharezLook")->getImage("MultiListSelectionBrush"));
// attempt to set the new item in place
try
{
mcl->setItem(item, id, row);
}
// something went wrong, so cleanup the ListboxTextItem.
catch (InvalidRequestException)
{
delete item;
}
// event was handled.
return true;
}
示例5: ListboxTextItem
void JournalWindow::addQuest(Quest* quest, int level)
{
static CeGuiString INDENT = " ";
if (quest->getState() == Quest::UNKNOWN)
return;
CeGuiString questName = "";
for (int idx = 0; idx < level; idx++)
questName.append(INDENT);
questName.append(quest->getName());
ListboxTextItem* item = new ListboxTextItem(questName, 0, quest);
item->setSelectionBrushImage(
mQuestSelectionImageset,
mQuestSelectionBrush);
mQuests->addItem(item);
QuestVector quests = quest->getSubquests();
for (QuestVector::iterator it = quests.begin(); it != quests.end(); it++)
{
addQuest(*it, level+1);
}
}
示例6: handle_destination_change
void handle_destination_change(){
using namespace CEGUI;
struct search_param *search=&search_param;
struct search_list_result *res;
MultiColumnList* mcl = static_cast<MultiColumnList*>(WindowManager::getSingleton().getWindow("AdressSearch/Listbox"));
if (SDL_dest.current_search==SRCH_COUNTRY)
{
Editbox* country_edit = static_cast<Editbox*>(WindowManager::getSingleton().getWindow("AdressSearch/CountryEditbox"));
String content=country_edit->getText();
mcl->resetList();
dbg(0,"Starting a country search : %s\n",content.c_str());
search->attr.type=attr_country_all;
// FIXME the following codeblock could be shared between country, town and street search
search->attr.u.str=(char *)content.c_str();
search_list_search(search->sl, &search->attr, 1);
while((res=search_list_get_result(search->sl))) {
ListboxTextItem* itemListbox = new ListboxTextItem((CEGUI::utf8*)(res->country->name));
itemListbox->setSelectionBrushImage("TaharezLook", "MultiListSelectionBrush");
mcl->addRow(itemListbox,0);
}
} else if (SDL_dest.current_search==SRCH_TOWN)
{
Editbox* town_edit = static_cast<Editbox*>(WindowManager::getSingleton().getWindow("AdressSearch/TownEditbox"));
String content=town_edit->getText();
mcl->resetList();
if(strlen(content.c_str())<4){
} else {
dbg(0,"town searching for %s\n",content.c_str());
search->attr.type=attr_town_name;
search->attr.u.str=(char *)content.c_str();
search_list_search(search->sl, &search->attr, 1);
while((res=search_list_get_result(search->sl))) {
ListboxTextItem* itemListbox = new ListboxTextItem((CEGUI::utf8*)(res->town->name));
itemListbox->setSelectionBrushImage("TaharezLook", "MultiListSelectionBrush");
mcl->addRow(itemListbox,0);
char x [256];
sprintf(x,"%li",res->c->x);
ListboxTextItem* xitem = new ListboxTextItem(x);
char y [256];
sprintf(y,"%li",res->c->y);
ListboxTextItem* yitem = new ListboxTextItem(y);
try
{
mcl->setItem(xitem, 3, mcl->getRowCount()-1);
mcl->setItem(yitem, 4, mcl->getRowCount()-1);
}
// something went wrong, so cleanup the ListboxTextItem.
catch (InvalidRequestException)
{
// delete item;
}
}
}
} else if (SDL_dest.current_search==SRCH_STREET)
{
Editbox* street_edit = static_cast<Editbox*>(WindowManager::getSingleton().getWindow("AdressSearch/StreetEditbox"));
String content=street_edit->getText();
if(strlen(content.c_str())<1){
} else {
// dbg(1,"street searching for %s\n",content.c_str());
search->attr.type=attr_street_name;
search->attr.u.str=(char *)content.c_str();
mcl->resetList();
search_list_search(search->sl, &search->attr, 1);
while((res=search_list_get_result(search->sl))) {
ListboxTextItem* itemListbox = new ListboxTextItem((CEGUI::utf8*)(res->street->name));
itemListbox->setSelectionBrushImage("TaharezLook", "MultiListSelectionBrush");
mcl->addRow(itemListbox,0);
//.........这里部分代码省略.........
示例7: MyCEGUILogger
/*!
* Setup the CEGUI-based user interface. This needs an OGRE::SceneManager.
*
* \return true on success, false otherwise
*/
bool Gui::initialize() {
using namespace CEGUI;
if (!mInputHandler) {
//std::cerr << dc_funcinfo << "ERROR: NULL input handler" << std::endl;
return false;
}
// add resource path for GUI-scheme and layout
mOgreRoot->addResourceLocation("../resources/cegui-skin", "FileSystem");
mOgreRoot->addResourceLocation("../resources", "FileSystem");
// AB: do NOT delete the object: CEGUI does so in CEGUI::System::~System()
new MyCEGUILogger();
mGuiRenderer = new OgreCEGUIRenderer(mRenderWindow);
mGuiSystem = new System(mGuiRenderer);
// load GUI scheme
try {
SchemeManager::getSingleton().loadScheme((utf8*)"DCollideSkin.scheme");
} catch (CEGUI::Exception e) {
//std::cout << dc_funcinfo << "CEGUI exception when loading scheme: " << e.getMessage() << std::endl;
return false;
}
// set default cursor and font
mGuiSystem->setDefaultMouseCursor((utf8*)"DCollide", (utf8*)"MouseArrow");
MouseCursor::getSingleton().setImage("DCollide", "MouseMoveCursor");
mGuiSystem->setDefaultFont((utf8*)"Vera");
// Move CEGUI mouse to (0,0)
CEGUI::Point mousePos = CEGUI::MouseCursor::getSingleton().getPosition();
CEGUI::System::getSingleton().injectMouseMove(-mousePos.d_x,-mousePos.d_y);
// load and enable GUI sheet
try {
mGuiSheet = WindowManager::getSingleton().loadWindowLayout("testapp.layout");
} catch (CEGUI::Exception e) {
//std::cout << dc_funcinfo << "CEGUI exception when loading window layout: " << e.getMessage() << std::endl;
return false;
}
mGuiSystem->setGUISheet(mGuiSheet);
WindowManager::getSingleton().getWindow((utf8*)"QuitButton")
->subscribeEvent(
PushButton::EventClicked,
Event::Subscriber(&Gui::handleQuit, this));
WindowManager::getSingleton().getWindow((utf8*)"LegendButton")
->subscribeEvent(
PushButton::EventClicked,
Event::Subscriber(&Gui::handleLegend, this));
// fill the combobox with all available scenes
Combobox* sceneBox = CEGUI_CAST("SceneSelectionBox", "DCollide/Combobox", CEGUI::Combobox*);
if (!sceneBox) {
//std::cerr << dc_funcinfo << "cannot find TestApp/SceneSelectionBox" << std::endl;
return false;
}
std::list<std::string> sceneTitles = SceneHandler::getSceneHandler()->getAvailableSceneTitles();
unsigned int index = 0; // we use index in the list as ID for the combobox item
colour white(1.0, 1.0, 1.0, 1.0);
for (std::list<std::string>::iterator it = sceneTitles.begin(); it != sceneTitles.end(); ++it) {
ListboxTextItem* item = new ListboxTextItem((utf8*)(*it).c_str(), index);
// make the current selection in the combobox visible
item->setSelectionColours(white);
item->setTooltipText((*it).c_str());
item->setSelectionBrushImage("DCollide", "ListboxSelectionBrush");
if ((*it) == SceneHandler::getDefaultSceneId()) {
item->setSelected(true);
}
sceneBox->addItem(item);
index++;
}
//sceneBox->setText(SceneManager::getDefaultSceneId().c_str());
sceneBox->subscribeEvent(Combobox::EventListSelectionAccepted,
Event::Subscriber(&Gui::handleSceneChange, this));
mLegendWindow = CEGUI_CAST("LegendWindow", "DCollide/FrameWindow", CEGUI::FrameWindow*);
mLegendWindow->hide();
mLegendWindow->subscribeEvent(CEGUI::FrameWindow::EventCloseClicked,
Event::Subscriber(&Gui::handleLegend, this));
return true;
}
示例8: cegui_reldim
/*************************************************************************
Create the windows and widgets for the demo
*************************************************************************/
void Demo6Sample::createDemoWindows(void)
{
using namespace CEGUI;
ListboxTextItem* itm;
WindowManager& winMgr = WindowManager::getSingleton();
Window* root = winMgr.getWindow("root_wnd");
// create the main list.
MultiColumnList* mcl = static_cast<MultiColumnList*>(winMgr.createWindow("TaharezLook/MultiColumnList", "Demo6/MainList"));
root->addChildWindow(mcl);
mcl->setPosition(UVector2(cegui_reldim(0.01f), cegui_reldim( 0.1f)));
mcl->setSize(UVector2(cegui_reldim(0.5f), cegui_reldim( 0.8f)));
// create frame window for control panel
FrameWindow* fwnd = static_cast<FrameWindow*>(winMgr.createWindow("TaharezLook/FrameWindow", "Demo6/ControlPanel"));
root->addChildWindow(fwnd);
fwnd->setPosition(UVector2(cegui_reldim(0.53f), cegui_reldim( 0.03f)));
fwnd->setMaxSize(UVector2(cegui_reldim(1.0f), cegui_reldim( 1.0f)));
fwnd->setSize(UVector2(cegui_reldim(0.44f), cegui_reldim( 0.94f)));
fwnd->setText("Demo 6 - Control Panel");
// create combo-box.
Combobox* cbbo = static_cast<Combobox*>(winMgr.createWindow("TaharezLook/Combobox", "Demo6/ControlPanel/SelModeBox"));
fwnd->addChildWindow(cbbo);
cbbo->setPosition(UVector2(cegui_reldim(0.04f), cegui_reldim( 0.06f)));
cbbo->setSize(UVector2(cegui_reldim(0.66f), cegui_reldim( 0.33f)));
//cbbo->setSortingEnabled(true);
// populate combobox with possible selection modes
const CEGUI::Image* sel_img = &ImagesetManager::getSingleton().getImageset("TaharezLook")->getImage("MultiListSelectionBrush");
itm = new ListboxTextItem("Full Row (Single)", 0);
itm->setSelectionBrushImage(sel_img);
cbbo->addItem(itm);
itm = new ListboxTextItem("Full Row (Multiple)", 1);
itm->setSelectionBrushImage(sel_img);
cbbo->addItem(itm);
itm = new ListboxTextItem("Full Column (Single)", 2);
itm->setSelectionBrushImage(sel_img);
cbbo->addItem(itm);
itm = new ListboxTextItem("Full Column (Multiple)", 3);
itm->setSelectionBrushImage(sel_img);
cbbo->addItem(itm);
itm = new ListboxTextItem("Single Cell (Single)", 4);
itm->setSelectionBrushImage(sel_img);
cbbo->addItem(itm);
itm = new ListboxTextItem("Single Cell (Multiple)", 5);
itm->setSelectionBrushImage(sel_img);
cbbo->addItem(itm);
itm = new ListboxTextItem("Nominated Column (Single)", 6);
itm->setSelectionBrushImage(sel_img);
cbbo->addItem(itm);
itm = new ListboxTextItem("Nominated Column (Multiple)", 7);
itm->setSelectionBrushImage(sel_img);
cbbo->addItem(itm);
ListboxTextItem* pStore = itm;
itm = new ListboxTextItem("Nominated Row (Single)", 8);
itm->setSelectionBrushImage(sel_img);
cbbo->addItem(itm);
itm = new ListboxTextItem("Nominated Row (Multiple)", 9);
itm->setSelectionBrushImage(sel_img);
cbbo->addItem(itm);
cbbo->setReadOnly(true);
// Now change the text to test the sorting
pStore->setText("Abracadabra");
//cbbo->setSortingEnabled(false);
cbbo->setSortingEnabled(true);
//cbbo->handleUpdatedListItemData();
// column control section
Window* st = winMgr.createWindow("TaharezLook/StaticText", "Demo6/ControlPanel/ColumnPanel");
fwnd->addChildWindow(st);
st->setPosition(UVector2(cegui_reldim(0.02f), cegui_reldim( 0.12f)));
st->setSize(UVector2(cegui_reldim(0.96f), cegui_reldim( 0.25f)));
st->setText("Column Control");
st->setProperty("VertFormatting", "TopAligned");
Window* label = winMgr.createWindow("TaharezLook/StaticText", "Demo6/ControlPanel/Label1");
st->addChildWindow(label);
label->setProperty("FrameEnabled", "false");
label->setProperty("BackgroundEnabled", "false");
label->setPosition(UVector2(cegui_reldim(0.02f), cegui_reldim( 0.2f)));
label->setSize(UVector2(cegui_reldim(0.2f), cegui_reldim( 0.12f)));
label->setText("ID Code:");
label = winMgr.createWindow("TaharezLook/StaticText", "Demo6/ControlPanel/Label2");
st->addChildWindow(label);
label->setProperty("FrameEnabled", "false");
label->setProperty("BackgroundEnabled", "false");
label->setPosition(UVector2(cegui_reldim(0.23f), cegui_reldim( 0.2f)));
label->setSize(UVector2(cegui_reldim(0.2f), cegui_reldim( 0.12f)));
label->setText("Width:");
label = winMgr.createWindow("TaharezLook/StaticText", "Demo6/ControlPanel/Label3");
st->addChildWindow(label);
label->setProperty("FrameEnabled", "false");
label->setProperty("BackgroundEnabled", "false");
//.........这里部分代码省略.........
示例9: cegui_reldim
vis_settings_panel_impl::vis_settings_panel_impl( const app::zones_t &zones, const app::settings_t& s )
{
GUIContext& context = System::getSingleton().getDefaultGUIContext();
CEGUI::Window* root = context.getRootWindow();
WindowManager& winMgr = WindowManager::getSingleton();
FrameWindow* mainWindow = static_cast<FrameWindow*>(
CEGUI::WindowManager::getSingleton().createWindow("TaharezLook/FrameWindow", "MainWindow") );
mainWindow->setPosition(UVector2(cegui_reldim(0.01f), cegui_reldim(0.5f)));
//demoWindow->setSize(USize(cegui_reldim(0.3f), cegui_reldim(0.3f)));
mainWindow->setMinSize(USize(cegui_reldim(0.1f), cegui_reldim(0.1f)));
mainWindow->setText( "Choose Zone" );
auto fn_exit = [=](const CEGUI::EventArgs& args)->bool
{
CEGUI::GUIContext& context = CEGUI::System::getSingleton().getDefaultGUIContext();
CEGUI::Window* root = context.getRootWindow();
root->getChild("MainWindow")->setVisible(false);
return true;
};
mainWindow->subscribeEvent( CEGUI::FrameWindow::EventCloseClicked,Event::Subscriber(fn_exit));
#if 0
PushButton* btnExit = static_cast<PushButton*>(
WindowManager::getSingleton().createWindow("TaharezLook/Button", btn_exit_name) );
root->addChild(btnExit);
btnExit->setPosition(UVector2(cegui_reldim(0.95f), cegui_reldim(0.95f)));
btnExit->setSize( USize(cegui_reldim(0.04f), cegui_reldim(0.02f)) );
btnExit->setText( "Exit" );
btnExit->subscribeEvent(PushButton::EventClicked,
Event::Subscriber([=](const CEGUI::EventArgs& args)->bool
{
exit_app_signal_();
return true;
})
);
#endif
Combobox* cbbo = static_cast<Combobox*>( CEGUI::WindowManager::getSingleton().createWindow("TaharezLook/Combobox", combo_name));
cbbo->setPosition(UVector2(cegui_reldim(0.15f), cegui_reldim( 0.1f)));
//cbbo->setSize(USize(cegui_reldim(0.66f), cegui_reldim( 0.33f)));
mainWindow->addChild(cbbo);
root->addChild( mainWindow );
mainWindow->setVisible(false);
ListboxTextItem* itm;
CEGUI::Win32StringTranscoder stc;
const CEGUI::Image* sel_img = &ImageManager::getSingleton().get("TaharezLook/MultiListSelectionBrush");
for (auto it = zones.begin(); it!=zones.end();++it)
{
itm = new ListboxTextItem(stc.stringFromStdWString(it->second), it->first);
itm->setSelectionBrushImage(sel_img);
cbbo->addItem(itm);
}
cbbo->subscribeEvent(Combobox::EventListSelectionAccepted,
Event::Subscriber([=](const CEGUI::EventArgs& args)->bool
{
Combobox* combo = static_cast<Combobox*>(static_cast<const WindowEventArgs&>(args).window->getRootWindow()->getChild("MainWindow/" + combo_name));
ListboxItem* item = combo->findItemWithText(combo->getText(), 0);
if (item)
{
zone_changed_signal_( item->getID());
}
return true;
})
);
cbbo->setReadOnly(true);
cbbo->setSortingEnabled(false);
//cbbo->handleUpdatedListItemData();
CEGUI::ToggleButton* checkbox = static_cast<ToggleButton*>( CEGUI::WindowManager::getSingleton().createWindow("TaharezLook/Checkbox", tb_name));
checkbox->setSelected(true);
checkbox->setText( "Lights" );
mainWindow->addChild(checkbox);
auto settingsWindow = winMgr.loadLayoutFromFile("vis_settings.layout");
root->addChild(settingsWindow);
subscribeEvent(setting_dlg + "/Settings/chkLights", ToggleButton::EventSelectStateChanged,
Event::Subscriber([=](const CEGUI::EventArgs& args)->bool
{
bool wrap = isCheckboxSelected(setting_dlg + "/Settings/chkLights");
set_lights_signal_(wrap);
//.........这里部分代码省略.........
示例10: sdl_update_roadbook
static void
sdl_update_roadbook(struct navigation *nav)
{
using namespace CEGUI;
struct map *map;
struct map_rect *mr;
if (! nav)
return;
map=navigation_get_map(nav);
if (! map)
return;
mr=map_rect_new(map, NULL);
if (! mr)
return;
// First, ensure the navigation tip is visible. quick workaround for when resuming a destination
WindowManager::getSingleton().getWindow("Navit/Routing/Tips")->show();
// update the 'Navigation Tip' on the main window
try {
struct attr attr;
item_attr_get(map_rect_get_item(mr), attr_navigation_speech, &attr);
map_rect_destroy(mr);
mr=map_rect_new(map, NULL);
WindowManager::getSingleton().getWindow("Navit/Routing/Tips")->setText((CEGUI::utf8*)(attr.u.str));
}
catch (CEGUI::Exception& e)
{
fprintf(stderr,"CEGUI Exception occured: \n%s\n", e.getMessage().c_str());
printf("Missing control!...\n");
}
// Then, update the whole roadbook
try {
/* Currently we use the 'Navit' text to display the roadbook, until Mineque design a button for that
if(! WindowManager::getSingleton().getWindow("OSD/RoadbookButton")->isVisible()){
WindowManager::getSingleton().getWindow("OSD/RoadbookButton")->show();
}
*/
MultiColumnList* mcl = static_cast<MultiColumnList*>(WindowManager::getSingleton().getWindow("Roadbook"));
mcl->resetList();
item *item;
struct attr attr;
while ((item=map_rect_get_item(mr))) {
mcl->addRow();
item_attr_get(item, attr_navigation_short, &attr);
ListboxTextItem* itemListbox = new ListboxTextItem(attr.u.str);
itemListbox->setSelectionBrushImage("TaharezLook", "MultiListSelectionBrush");
mcl->setItem(itemListbox, 0, mcl->getRowCount()-1);
}
map_rect_destroy(mr);
}
catch (CEGUI::Exception& e)
{
dbg(0,"CEGUI Exception occured: \n%s\n", e.getMessage().c_str());
dbg(0,"Missing control!\n");
}
}