rework ui layouts, now it is more flexible and modular

This commit is contained in:
Eduardo Bart
2011-05-09 17:38:01 -03:00
parent 6d871b305f
commit 51fe97644d
29 changed files with 441 additions and 398 deletions

View File

@@ -29,9 +29,9 @@
void UIButton::onInputEvent(const InputEvent& event)
{
if(event.type == EV_MOUSE_LDOWN && getRect().contains(event.mousePos)) {
m_state = UI::ButtonDown;
} else if(event.type == EV_MOUSE_LUP && m_state == UI::ButtonDown) {
m_state = UI::ButtonUp;
m_state = ButtonDown;
} else if(event.type == EV_MOUSE_LUP && m_state == ButtonDown) {
m_state = ButtonUp;
if(getRect().contains(event.mousePos)) {
g_dispatcher.addTask(boost::bind(&Scriptable::callLuaTableField, shared_from_this(), "onClick"));
}