refactoring paths and includes

This commit is contained in:
Eduardo Bart
2011-04-10 12:37:15 -03:00
parent 792d661dad
commit 1f78f93096
74 changed files with 130 additions and 162 deletions

View File

@@ -23,8 +23,8 @@
#include "uibutton.h"
#include "../fonts.h"
#include "../font.h"
#include "graphics/fonts.h"
#include "graphics/font.h"
void UIButton::load(const YAML::Node& node)
{
@@ -42,11 +42,11 @@ void UIButton::render()
bool UIButton::onInputEvent(const InputEvent& event)
{
if(event.type == EV_MOUSE_LDOWN &&
getRect().contains(Point(event.mouse.x, event.mouse.y))) {
getRect().contains(event.mousePos)) {
m_state = UI::ButtonDown;
} else if(m_state == UI::ButtonDown && event.type == EV_MOUSE_LUP) {
m_state = UI::ButtonUp;
if(getRect().contains(Point(event.mouse.x, event.mouse.y))) {
if(getRect().contains(event.mousePos)) {
if(m_buttonClickCallback)
m_buttonClickCallback();
}