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

@@ -25,8 +25,7 @@
#ifndef ANCHORLAYOUT_H
#define ANCHORLAYOUT_H
#include "../prerequisites.h"
#include "../rect.h"
#include "prerequisites.h"
#include "uiconstants.h"
enum EAnchorType {

View File

@@ -25,7 +25,7 @@
#ifndef UI_H
#define UI_H
#include "../prerequisites.h"
#include "prerequisites.h"
#include "uiconstants.h"
#include "uielement.h"

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();
}

View File

@@ -25,9 +25,9 @@
#ifndef UIBUTTON_H
#define UIBUTTON_H
#include "../prerequisites.h"
#include "prerequisites.h"
#include "uielement.h"
#include "../borderedimage.h"
#include "graphics/borderedimage.h"
typedef std::function<void()> Callback;

View File

@@ -25,7 +25,7 @@
#ifndef UIBUTTONSKIN_H
#define UIBUTTONSKIN_H
#include "../prerequisites.h"
#include "prerequisites.h"
#include "uiconstants.h"
#include "uielementskin.h"

View File

@@ -23,7 +23,7 @@
#include "uicontainer.h"
#include "../resources.h"
#include "core/resources.h"
#include "uibutton.h"
#include "uipanel.h"
#include "uilabel.h"

View File

@@ -25,11 +25,8 @@
#ifndef UICONTAINER_H
#define UICONTAINER_H
//TODO: make includes paths, so this will be cleaner
#include "../prerequisites.h"
#include "prerequisites.h"
#include "uielement.h"
#include "../point.h"
#include "../rect.h"
class UIContainer : public UIElement
{

View File

@@ -25,9 +25,8 @@
#ifndef UIELEMENT_H
#define UIELEMENT_H
#include "../prerequisites.h"
#include "../input.h"
#include "../rect.h"
#include "prerequisites.h"
#include "core/input.h"
#include "uiconstants.h"
#include "anchorlayout.h"

View File

@@ -24,8 +24,8 @@
#include "uielementskin.h"
#include "uielement.h"
#include "../borderedimage.h"
#include "../textures.h"
#include "graphics/borderedimage.h"
#include "graphics/textures.h"
#include "uiskins.h"
void UIElementSkin::draw(UIElement *element)

View File

@@ -25,10 +25,9 @@
#ifndef UIELEMENTSKIN_H
#define UIELEMENTSKIN_H
#include "../prerequisites.h"
#include "prerequisites.h"
#include "uiconstants.h"
#include "../image.h"
#include "../rect.h"
#include "graphics/image.h"
class UIElement;

View File

@@ -23,7 +23,7 @@
#include "uilabel.h"
#include "../fonts.h"
#include "graphics/fonts.h"
UILabel::UILabel(const std::string& text, Font* font) :
UIElement(UI::Label),

View File

@@ -25,7 +25,7 @@
#ifndef UILABEL_H
#define UILABEL_H
#include "../prerequisites.h"
#include "prerequisites.h"
#include "uielement.h"
class Font;

View File

@@ -25,9 +25,9 @@
#ifndef UIPANEL_H
#define UIPANEL_H
#include "../prerequisites.h"
#include "prerequisites.h"
#include "uicontainer.h"
#include "../borderedimage.h"
#include "graphics/borderedimage.h"
class UIPanel : public UIContainer
{

View File

@@ -23,8 +23,8 @@
#include "uiskins.h"
#include "../resources.h"
#include "../textures.h"
#include "core/resources.h"
#include "graphics/textures.h"
#include "uielementskin.h"
#include "uibuttonskin.h"
#include "uiwindowskin.h"

View File

@@ -25,9 +25,9 @@
#ifndef UISKIN_H
#define UISKIN_H
#include "../prerequisites.h"
#include "prerequisites.h"
#include "uicontainer.h"
#include "../texture.h"
#include "graphics/texture.h"
class UIElementSkin;

View File

@@ -23,7 +23,7 @@
#include "uitextedit.h"
#include "../fonts.h"
#include "graphics/fonts.h"
UITextEdit::UITextEdit(Font* font) :
UIElement(UI::TextEdit),

View File

@@ -25,7 +25,7 @@
#ifndef UITEXTEDIT_H
#define UITEXTEDIT_H
#include "../prerequisites.h"
#include "prerequisites.h"
#include "uielement.h"
class Font;

View File

@@ -25,7 +25,7 @@
#ifndef UITEXTEDITSKIN_H
#define UITEXTEDITSKIN_H
#include "../prerequisites.h"
#include "prerequisites.h"
#include "uiconstants.h"
#include "uielementskin.h"

View File

@@ -25,7 +25,7 @@
#ifndef UIWINDOW_H
#define UIWINDOW_H
#include "../prerequisites.h"
#include "prerequisites.h"
#include "uicontainer.h"
class UIWindow : public UIContainer

View File

@@ -23,7 +23,7 @@
#include "uiwindowskin.h"
#include "uiwindow.h"
#include "../fonts.h"
#include "graphics/fonts.h"
void UIWindowSkin::draw(UIElement* element)
{

View File

@@ -24,10 +24,10 @@
#ifndef UIWINDOWSKIN_H
#define UIWINDOWSKIN_H
#include "../prerequisites.h"
#include "prerequisites.h"
#include "uiconstants.h"
#include "uielementskin.h"
#include "../font.h"
#include "graphics/font.h"
class UIWindowSkin : public UIElementSkin
{