void GuiCheckBox::setChecked( bool checked ) { Assert( getGuiElement() ); IGuiCheckBox_IPtr cbox = boost::static_pointer_cast<IGUICheckBox>( getGuiElement() ); cbox->setChecked( checked ); }
bool GuiCheckBox::isChecked() { Assert( getGuiElement() ); IGuiCheckBox_IPtr cbox = boost::static_pointer_cast<IGUICheckBox>( getGuiElement() ); return cbox->isChecked(); }
int32_t GuiComboBox::addItem( const std::wstring& text ) { Assert( getGuiElement() ); // save the entry mEntries.push_back(text); // tell it to the irr gui IGuiComboBox_IPtr cbox = boost::static_pointer_cast<IGUIComboBox>( getGuiElement() ); return cbox->addItem( mEntries.back().c_str() ); }
void QuickSelectRingGui::remove(game::WeHandle h){ for (auto it= icons.begin(); it!= icons.end(); ++it){ //print(debug::Ch::Gui, debug::Vb::Trivial, "remove(..): before: guiElement= %x", &it->getGuiElement()); } //int32 i=0; for (auto it= icons.begin(); it!= icons.end(); ++it){ if (it->getGuiElement().getHandle() == h){ //print(debug::Ch::Gui, debug::Vb::Trivial, "erase: %i, size: %i", i, icons.size()); icons.erase(it); //print(debug::Ch::Gui, debug::Vb::Trivial, "size after: %i", icons.size()); break; } //++i; } for (auto it= icons.begin(); it!= icons.end(); ++it){ //print(debug::Ch::Gui, debug::Vb::Trivial, "after(..): before: guiElement= %x", &it->getGuiElement()); } }
bool GuiText::GetWordWrap() { Assert( getGuiElement() ); IGuiText_IPtr text = boost::static_pointer_cast<IGUIStaticText>( getGuiElement() ); return text->isWordWrapEnabled(); }
void GuiText::SetWordWrap( bool wrap ) { Assert( getGuiElement() ); IGuiText_IPtr text = boost::static_pointer_cast<IGUIStaticText>( getGuiElement() ); text->setWordWrap(wrap); }
SColor GuiText::GetColor() { Assert( getGuiElement() ); IGuiText_IPtr text = boost::static_pointer_cast<IGUIStaticText>( getGuiElement() ); return text->getOverrideColor(); }
void GuiText::SetColor( const SColor& color ) { Assert( getGuiElement() ); IGuiText_IPtr text = boost::static_pointer_cast<IGUIStaticText>( getGuiElement() ); text->setOverrideColor(color); }
int32_t GuiComboBox::getSelected() { Assert( getGuiElement() ); return (boost::static_pointer_cast<IGUIComboBox>(getGuiElement()))->getSelected(); }