bool cBonusBox::Editor_Gold_Color_Select(const CEGUI::EventArgs& event) { const CEGUI::WindowEventArgs& windowEventArgs = static_cast<const CEGUI::WindowEventArgs&>(event); CEGUI::ListboxItem* item = static_cast<CEGUI::Combobox*>(windowEventArgs.window)->getSelectedItem(); Set_Goldcolor(Get_Color_Id(item->getText().c_str())); return 1; }
void cBonusBox::Load_From_XML(XmlAttributes& attributes) { cBaseBox::Load_From_XML(attributes); // item Set_Bonus_Type(static_cast<SpriteType>(string_to_int(attributes["item"]))); // force best possible item Set_Force_Best_Item(string_to_int(attributes["force_best_item"])); // gold color if (box_type == TYPE_GOLDPIECE) Set_Goldcolor(Get_Color_Id(attributes.fetch("gold_color", Get_Color_Name(m_gold_color)))); }
void cBonusBox :: Init( void ) { m_type = TYPE_BONUS_BOX; m_force_best_item = 0; m_camera_range = 5000; m_can_be_on_ground = 0; Set_Animation_Type( "Bonus" ); m_gold_color = COL_DEFAULT; Set_Goldcolor( COL_YELLOW ); Create_Name(); }
void cBonusBox::Init(void) { m_type = TYPE_BONUS_BOX; m_force_best_item = 0; m_camera_range = 5000; m_can_be_on_ground = 0; Set_Animation_Type("Bonus"); m_gold_color = COL_DEFAULT; Set_Goldcolor(COL_YELLOW); box_type = TYPE_UNDEFINED; m_name = _("Bonusbox Empty"); }
void cBonusBox :: Create_From_Stream( CEGUI::XMLAttributes &attributes ) { cBaseBox::Create_From_Stream( attributes ); // item Set_Bonus_Type( static_cast<SpriteType>(attributes.getValueAsInteger( "item" )) ); // force best possible item Set_Force_Best_Item( attributes.getValueAsBool( "force_best_item" ) ); // gold color if( box_type == TYPE_GOLDPIECE ) { Set_Goldcolor( Get_Color_Id( attributes.getValueAsString( "gold_color", Get_Color_Name( m_gold_color ) ).c_str() ) ); } }