Skip to content

Commit 45b3c18

Browse files
committed
Thanks brady
1 parent b95c16d commit 45b3c18

20 files changed

Lines changed: 217 additions & 239 deletions

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
cmake_minimum_required(VERSION 3.20)
22
project(akairo VERSION 0.1.0 LANGUAGES CXX)
33

4-
set(CMAKE_CXX_STANDARD 20)
4+
set(CMAKE_CXX_STANDARD 23)
55
set(CMAKE_CXX_STANDARD_REQUIRED ON)
66

77
# Find actual OpenGL library

src/Core/Graphics/Interface.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ namespace akairo::Graphics {
4747
/*
4848
auto rect = renderers[name]->CreateElement<Shapes::Rectangle>(
4949
"base rectangle", Components::Position(0.5f, {}));
50-
rect->Draw();
50+
rect->draw();
5151
*/
5252
}
5353
case Renderer::FrameworkType::D2D: break;//renderers[name] = new OpenGL(backend);

src/Core/Graphics/OpenGL.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,10 @@ namespace akairo::Graphics
4545
{
4646
if (!element->parent.lock())
4747
{
48-
element->Update(Vec2(static_cast<float>(Width), static_cast<float>(Height)));
48+
element->update(Vec2(static_cast<float>(Width), static_cast<float>(Height)));
4949
} else
5050
{
51-
element->Update();
51+
element->update();
5252

5353
}
5454
}

src/Core/Renderer/ImGui.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ namespace akairo::Renderer
4545
extra();
4646
for (const auto& element : elements | std::views::values)
4747
{
48-
if (element->_visible) element->Draw();
48+
if (element->_visible) element->draw();
4949
}
5050

5151
::ImGui::EndFrame();

src/UI/Components/Position/Position.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,21 +23,21 @@ akairo::Components::Position::Position()
2323
}
2424

2525

26-
void akairo::Components::Position::Bind(BoundingRect ParentRect)
26+
void akairo::Components::Position::bind(BoundingRect ParentRect)
2727
{
2828
this->Parent = ParentRect;
29-
Update();
29+
update();
3030
}
3131

32-
void akairo::Components::Position::Update()
32+
void akairo::Components::Position::update()
3333
{
3434
Vec2 Constraint = Vec2(constraints.x, constraints.y)/100.f;
3535
relativePosition = Constraint * (Parent.BottomRight - Parent.TopLeft);
3636

3737
position = Parent.TopLeft + relativePosition;
3838
}
3939

40-
void akairo::Components::Position::Update(Vec2 Position)
40+
void akairo::Components::Position::update(Vec2 Position)
4141
{
4242
constraints = Position;
4343

src/UI/Components/Position/Position.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ class Position
1717

1818
explicit Position(Vec2 Position, BoundingRect ParentRect = {});
1919
Position();
20-
void Bind(BoundingRect ParentRect);
21-
void Update();
22-
void Update(Vec2 Position);
20+
void bind(BoundingRect ParentRect);
21+
void update();
22+
void update(Vec2 Position);
2323
};
2424
}

src/UI/Components/Rounding/Rounding.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ namespace akairo::Components
4848
this->constraints.w = r.w;
4949
}
5050

51-
void Rounding::Update(int scaler) {
51+
void Rounding::update(int scaler) {
5252
this->scaler = scaler;
5353
this->rounding.x = this->constraints.x / 100.f * scaler;
5454
this->rounding.y = this->constraints.y / 100.f * scaler;

src/UI/Components/Rounding/Rounding.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,6 @@ namespace akairo::Components
1515
Rounding(float r, int scaler);
1616
Rounding(Vec4 r, int scaler);
1717

18-
void Update(int scaler);
18+
void update(int scaler);
1919
};
2020
}

src/UI/Components/Size/Size.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,13 @@ namespace akairo::Components
3131
}
3232

3333

34-
void Size::Bind(const BoundingRect& Bounds)
34+
void Size::bind(const BoundingRect& Bounds)
3535
{
3636
this->Bounds = Bounds;
37-
Update();
37+
update();
3838
}
3939

40-
void Size::Update()
40+
void Size::update()
4141
{
4242
Vec2 Constraint = Vec2(this->constraints.x, this->constraints.y)/100.f;
4343

@@ -51,7 +51,7 @@ namespace akairo::Components
5151
}
5252
}
5353

54-
void Size::Update(Vec2 Size)
54+
void Size::update(Vec2 Size)
5555
{
5656
constraints = Size;
5757
Vec2 Constraint = Vec2(this->constraints.x, this->constraints.y)/100.f;

src/UI/Components/Size/Size.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ namespace akairo::Components {
1313

1414
Size(Vec2 Size, BoundingRect ParentRect, bool WidthDependsOnHeight = true);
1515
Size();
16-
void Bind(const BoundingRect& Bounds);
17-
void Update();
18-
void Update(Vec2 Size);
16+
void bind(const BoundingRect& Bounds);
17+
void update();
18+
void update(Vec2 Size);
1919
};
2020
}

0 commit comments

Comments
 (0)