Skip to content

Commit 858409e

Browse files
committed
Convert UISystem indentation to spaces
1 parent 0617362 commit 858409e

1 file changed

Lines changed: 60 additions & 60 deletions

File tree

engine/core/subsystem/UISystem.h

Lines changed: 60 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -22,88 +22,88 @@
2222

2323
namespace Supernova{
2424

25-
class SUPERNOVA_API UISystem : public SubSystem {
25+
class SUPERNOVA_API UISystem : public SubSystem {
2626

2727
private:
2828

29-
std::string eventId;
30-
Entity lastUIFromPointer;
31-
Entity lastPanelFromPointer;
32-
Vector2 lastPointerPos;
33-
Vector2 panelSizeAcc; // to add accumulation from float to int
29+
std::string eventId;
30+
Entity lastUIFromPointer;
31+
Entity lastPanelFromPointer;
32+
Vector2 lastPointerPos;
33+
Vector2 panelSizeAcc; // to add accumulation from float to int
3434

35-
void createOrUpdateUiComponent(double dt, UILayoutComponent& layout, Entity entity, Signature signature);
36-
void getPanelEdges(const PanelComponent& panel, const UILayoutComponent& layout, const Transform& transform, const UILayoutComponent& headerlayout, Rect& edgeRight, Rect& edgeRightBottom, Rect& edgeBottom, Rect& edgeLeftBottom, Rect& edgeLeft);
37-
Rect fitOnPanel(Rect uiRect, Entity parentPanel);
38-
void calculateUIAABB(UIComponent& ui);
35+
void createOrUpdateUiComponent(double dt, UILayoutComponent& layout, Entity entity, Signature signature);
36+
void getPanelEdges(const PanelComponent& panel, const UILayoutComponent& layout, const Transform& transform, const UILayoutComponent& headerlayout, Rect& edgeRight, Rect& edgeRightBottom, Rect& edgeBottom, Rect& edgeLeftBottom, Rect& edgeLeft);
37+
Rect fitOnPanel(Rect uiRect, Entity parentPanel);
38+
void calculateUIAABB(UIComponent& ui);
3939

40-
//Image
41-
bool createImagePatches(ImageComponent& img, UIComponent& ui, UILayoutComponent& layout);
40+
//Image
41+
bool createImagePatches(ImageComponent& img, UIComponent& ui, UILayoutComponent& layout);
4242

43-
// Text
44-
bool loadFontAtlas(TextComponent& text, UIComponent& ui, UILayoutComponent& layout);
45-
void createText(TextComponent& text, UIComponent& ui, UILayoutComponent& layout);
43+
// Text
44+
bool loadFontAtlas(TextComponent& text, UIComponent& ui, UILayoutComponent& layout);
45+
void createText(TextComponent& text, UIComponent& ui, UILayoutComponent& layout);
4646

47-
//Button
48-
void updateButton(Entity entity, ButtonComponent& button, ImageComponent& img, UIComponent& ui, UILayoutComponent& layout);
47+
//Button
48+
void updateButton(Entity entity, ButtonComponent& button, ImageComponent& img, UIComponent& ui, UILayoutComponent& layout);
4949

50-
//Panel
51-
void updatePanel(Entity entity, PanelComponent& panel, ImageComponent& img, UIComponent& ui, UILayoutComponent& layout);
50+
//Panel
51+
void updatePanel(Entity entity, PanelComponent& panel, ImageComponent& img, UIComponent& ui, UILayoutComponent& layout);
5252

53-
//Scrollbar
54-
void updateScrollbar(Entity entity, ScrollbarComponent& scrollbar, ImageComponent& img, UIComponent& ui, UILayoutComponent& layout);
53+
//Scrollbar
54+
void updateScrollbar(Entity entity, ScrollbarComponent& scrollbar, ImageComponent& img, UIComponent& ui, UILayoutComponent& layout);
5555

56-
//TextEdit
57-
void updateTextEdit(Entity entity, TextEditComponent& textedit, ImageComponent& img, UIComponent& ui, UILayoutComponent& layout);
58-
void blinkCursorTextEdit(double dt, TextEditComponent& textedit, UIComponent& ui);
56+
//TextEdit
57+
void updateTextEdit(Entity entity, TextEditComponent& textedit, ImageComponent& img, UIComponent& ui, UILayoutComponent& layout);
58+
void blinkCursorTextEdit(double dt, TextEditComponent& textedit, UIComponent& ui);
5959

60-
//UI Polygon
61-
void createUIPolygon(PolygonComponent& polygon, UIComponent& ui, UILayoutComponent& layout);
60+
//UI Polygon
61+
void createUIPolygon(PolygonComponent& polygon, UIComponent& ui, UILayoutComponent& layout);
6262

63-
bool isCoordInside(float x, float y, Transform& transform, UILayoutComponent& layout);
64-
bool isCoordInside(float x, float y, Transform& transform, UILayoutComponent& layout, Vector2 center);
63+
bool isCoordInside(float x, float y, Transform& transform, UILayoutComponent& layout);
64+
bool isCoordInside(float x, float y, Transform& transform, UILayoutComponent& layout, Vector2 center);
6565

66-
void applyAnchorPreset(UILayoutComponent& layout);
67-
void changeFlipY(UIComponent& ui, CameraComponent& camera);
66+
void applyAnchorPreset(UILayoutComponent& layout);
67+
void changeFlipY(UIComponent& ui, CameraComponent& camera);
6868

69-
void destroyText(TextComponent& text);
70-
void destroyButton(ButtonComponent& button);
71-
void destroyPanel(PanelComponent& panel);
72-
void destroyScrollbar(ScrollbarComponent& scrollbar);
73-
void destroyTextEdit(TextEditComponent& textedit);
69+
void destroyText(TextComponent& text);
70+
void destroyButton(ButtonComponent& button);
71+
void destroyPanel(PanelComponent& panel);
72+
void destroyScrollbar(ScrollbarComponent& scrollbar);
73+
void destroyTextEdit(TextEditComponent& textedit);
7474

75-
public:
76-
UISystem(Scene* scene);
77-
virtual ~UISystem();
75+
public:
76+
UISystem(Scene* scene);
77+
virtual ~UISystem();
7878

79-
bool isTextEditFocused();
79+
bool isTextEditFocused();
8080

81-
Vector2 getTextMinSize(TextComponent& text);
81+
Vector2 getTextMinSize(TextComponent& text);
8282

83-
bool eventOnCharInput(wchar_t codepoint);
84-
bool eventOnPointerDown(float x, float y);
85-
bool eventOnPointerUp(float x, float y);
86-
bool eventOnPointerMove(float x, float y);
83+
bool eventOnCharInput(wchar_t codepoint);
84+
bool eventOnPointerDown(float x, float y);
85+
bool eventOnPointerUp(float x, float y);
86+
bool eventOnPointerMove(float x, float y);
8787

88-
// basic UIs
89-
bool createOrUpdatePolygon(PolygonComponent& polygon, UIComponent& ui, UILayoutComponent& layout);
90-
bool createOrUpdateImage(ImageComponent& img, UIComponent& ui, UILayoutComponent& layout);
91-
bool createOrUpdateText(TextComponent& text, UIComponent& ui, UILayoutComponent& layout);
88+
// basic UIs
89+
bool createOrUpdatePolygon(PolygonComponent& polygon, UIComponent& ui, UILayoutComponent& layout);
90+
bool createOrUpdateImage(ImageComponent& img, UIComponent& ui, UILayoutComponent& layout);
91+
bool createOrUpdateText(TextComponent& text, UIComponent& ui, UILayoutComponent& layout);
9292

93-
// advanced UIs
94-
void createButtonObjects(Entity entity, ButtonComponent& button);
95-
void createPanelObjects(Entity entity, PanelComponent& panel);
96-
void createScrollbarObjects(Entity entity, ScrollbarComponent& scrollbar);
97-
void createTextEditObjects(Entity entity, TextEditComponent& textedit);
93+
// advanced UIs
94+
void createButtonObjects(Entity entity, ButtonComponent& button);
95+
void createPanelObjects(Entity entity, PanelComponent& panel);
96+
void createScrollbarObjects(Entity entity, ScrollbarComponent& scrollbar);
97+
void createTextEditObjects(Entity entity, TextEditComponent& textedit);
9898

99-
void load() override;
100-
void draw() override;
101-
void destroy() override;
102-
void update(double dt) override;
99+
void load() override;
100+
void draw() override;
101+
void destroy() override;
102+
void update(double dt) override;
103103

104-
void onComponentAdded(Entity entity, ComponentId componentId) override;
105-
void onComponentRemoved(Entity entity, ComponentId componentId) override;
106-
};
104+
void onComponentAdded(Entity entity, ComponentId componentId) override;
105+
void onComponentRemoved(Entity entity, ComponentId componentId) override;
106+
};
107107

108108
}
109109

0 commit comments

Comments
 (0)