00001 #include "gui_checkbutton.hpp" 00002 00003 #include <xml_document.hpp> 00004 #include "gui_texture.hpp" 00005 00006 namespace gui 00007 { 00008 void check_button::parse_block(xml::block* pBlock) 00009 { 00010 button::parse_block(pBlock); 00011 00012 xml::block* pSpecialBlock; 00013 pSpecialBlock = pBlock->get_block("CheckedTexture"); 00014 if (pSpecialBlock) 00015 { 00016 texture* pTexture = create_checked_texture_(); 00017 pTexture->parse_block(pSpecialBlock); 00018 if (pSpecialBlock->is_provided("layer")) 00019 pTexture->set_draw_layer(pSpecialBlock->get_attribute("layer")); 00020 } 00021 00022 pSpecialBlock = pBlock->get_block("DisabledCheckedTexture"); 00023 if (pSpecialBlock) 00024 { 00025 texture* pTexture = create_disabled_checked_texture_(); 00026 pTexture->parse_block(pSpecialBlock); 00027 if (pSpecialBlock->is_provided("layer")) 00028 pTexture->set_draw_layer(pSpecialBlock->get_attribute("layer")); 00029 } 00030 } 00031 }