00001 #include "gui_region.hpp" 00002 00003 namespace gui 00004 { 00005 region::region(manager* pManager) : uiobject(pManager) 00006 { 00007 lType_.push_back("Region"); 00008 } 00009 00010 region::~region() 00011 { 00012 } 00013 00014 void region::render() 00015 { 00016 } 00017 00018 void region::create_glue() 00019 { 00020 utils::wptr<lua::state> pLua = pManager_->get_lua(); 00021 pLua->push_string(sName_); 00022 lGlueList_.push_back(pLua->push_new<lua_uiobject>()); 00023 pLua->set_global(sName_); 00024 pLua->pop(); 00025 } 00026 00027 bool region::is_in_region(int iX, int iY) const 00028 { 00029 return ((lBorderList_[BORDER_LEFT] <= iX && iX <= lBorderList_[BORDER_RIGHT] - 1) && 00030 (lBorderList_[BORDER_TOP] <= iY && iY <= lBorderList_[BORDER_BOTTOM] - 1)); 00031 } 00032 }