mirror of
https://github.com/edubart/otclient.git
synced 2025-10-19 05:53:26 +02:00
refactoring paths and includes
This commit is contained in:
@@ -25,8 +25,7 @@
|
||||
#ifndef ANCHORLAYOUT_H
|
||||
#define ANCHORLAYOUT_H
|
||||
|
||||
#include "../prerequisites.h"
|
||||
#include "../rect.h"
|
||||
#include "prerequisites.h"
|
||||
#include "uiconstants.h"
|
||||
|
||||
enum EAnchorType {
|
||||
|
@@ -25,7 +25,7 @@
|
||||
#ifndef UI_H
|
||||
#define UI_H
|
||||
|
||||
#include "../prerequisites.h"
|
||||
#include "prerequisites.h"
|
||||
|
||||
#include "uiconstants.h"
|
||||
#include "uielement.h"
|
||||
|
@@ -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();
|
||||
}
|
||||
|
@@ -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;
|
||||
|
||||
|
@@ -25,7 +25,7 @@
|
||||
#ifndef UIBUTTONSKIN_H
|
||||
#define UIBUTTONSKIN_H
|
||||
|
||||
#include "../prerequisites.h"
|
||||
#include "prerequisites.h"
|
||||
#include "uiconstants.h"
|
||||
#include "uielementskin.h"
|
||||
|
||||
|
@@ -23,7 +23,7 @@
|
||||
|
||||
|
||||
#include "uicontainer.h"
|
||||
#include "../resources.h"
|
||||
#include "core/resources.h"
|
||||
#include "uibutton.h"
|
||||
#include "uipanel.h"
|
||||
#include "uilabel.h"
|
||||
|
@@ -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
|
||||
{
|
||||
|
@@ -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"
|
||||
|
||||
|
@@ -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)
|
||||
|
@@ -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;
|
||||
|
||||
|
@@ -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),
|
||||
|
@@ -25,7 +25,7 @@
|
||||
#ifndef UILABEL_H
|
||||
#define UILABEL_H
|
||||
|
||||
#include "../prerequisites.h"
|
||||
#include "prerequisites.h"
|
||||
#include "uielement.h"
|
||||
|
||||
class Font;
|
||||
|
@@ -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
|
||||
{
|
||||
|
@@ -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"
|
||||
|
@@ -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;
|
||||
|
||||
|
@@ -23,7 +23,7 @@
|
||||
|
||||
|
||||
#include "uitextedit.h"
|
||||
#include "../fonts.h"
|
||||
#include "graphics/fonts.h"
|
||||
|
||||
UITextEdit::UITextEdit(Font* font) :
|
||||
UIElement(UI::TextEdit),
|
||||
|
@@ -25,7 +25,7 @@
|
||||
#ifndef UITEXTEDIT_H
|
||||
#define UITEXTEDIT_H
|
||||
|
||||
#include "../prerequisites.h"
|
||||
#include "prerequisites.h"
|
||||
#include "uielement.h"
|
||||
|
||||
class Font;
|
||||
|
@@ -25,7 +25,7 @@
|
||||
#ifndef UITEXTEDITSKIN_H
|
||||
#define UITEXTEDITSKIN_H
|
||||
|
||||
#include "../prerequisites.h"
|
||||
#include "prerequisites.h"
|
||||
#include "uiconstants.h"
|
||||
#include "uielementskin.h"
|
||||
|
||||
|
@@ -25,7 +25,7 @@
|
||||
#ifndef UIWINDOW_H
|
||||
#define UIWINDOW_H
|
||||
|
||||
#include "../prerequisites.h"
|
||||
#include "prerequisites.h"
|
||||
#include "uicontainer.h"
|
||||
|
||||
class UIWindow : public UIContainer
|
||||
|
@@ -23,7 +23,7 @@
|
||||
|
||||
#include "uiwindowskin.h"
|
||||
#include "uiwindow.h"
|
||||
#include "../fonts.h"
|
||||
#include "graphics/fonts.h"
|
||||
|
||||
void UIWindowSkin::draw(UIElement* element)
|
||||
{
|
||||
|
@@ -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
|
||||
{
|
||||
|
Reference in New Issue
Block a user