Пример #1
0
	void MenuState::HandleChatMessage(std::string text)
	{
		CEGUI::Listbox *chatBox = static_cast<CEGUI::Listbox*>(wmgr->getWindow("LIGHTCYCLEMENU/Lobby/ListBox"));
		CEGUI::ListboxTextItem *newItem = 0;
		newItem = new CEGUI::ListboxTextItem(text, CEGUI::HTF_WORDWRAP_LEFT_ALIGNED);
		chatBox->addItem(newItem);
		chatBox->ensureItemIsVisible(newItem);
	}
Пример #2
0
void DeveloperConsole::outputConsoleText(const CEGUI::String& text, CEGUI::Colour color) {
    CEGUI::Listbox* listbox = static_cast<CEGUI::Listbox*>(mConsoleWindow->getChild("History"));
    
    CEGUI::ListboxTextItem* item = new CEGUI::ListboxTextItem(text);
    item->setTextColours(color);
    listbox->addItem(item);
    listbox->ensureItemIsVisible(item);
}