Migrate to latest dependency releases, and fixed breaking changes.

This commit is contained in:
2024-09-08 23:11:30 -04:00
parent 411f06aad0
commit fb5831caae
11 changed files with 20 additions and 21 deletions

View File

@@ -33,12 +33,12 @@ set_target_properties(JUI PROPERTIES LINKER_LANGUAGE CXX)
CPMAddPackage(
NAME Event
URL https://git.redacted.cc/josh/Event/archive/Release-6.zip
URL https://git.redacted.cc/josh/Event/archive/Release-10.zip
)
CPMAddPackage(
NAME J3ML
URL https://git.redacted.cc/josh/j3ml/archive/Release-3.0.zip
URL https://git.redacted.cc/josh/j3ml/archive/Release-3.1.zip
)
CPMAddPackage(
@@ -48,12 +48,12 @@ CPMAddPackage(
CPMAddPackage(
NAME ReWindow
URL https://git.redacted.cc/Redacted/ReWindow/archive/Prerelease-12.zip
URL https://git.redacted.cc/Redacted/ReWindow/archive/Prerelease-13.zip
)
CPMAddPackage(
NAME JGL
URL https://git.redacted.cc/josh/JGL/archive/Prerelease-31.zip
URL https://git.redacted.cc/josh/JGL/archive/Prerelease-32.zip
)
target_include_directories(JUI PUBLIC ${Event_SOURCE_DIR}/include)

View File

@@ -13,7 +13,7 @@
#include <Color4.hpp>
#include <J3ML/LinearAlgebra/Vector2.hpp>
#include "JGL/Texture.h"
#include <JGL/types/Texture.h>
using J3ML::LinearAlgebra::Vector2;

View File

@@ -13,6 +13,7 @@
#include <J3ML/LinearAlgebra.hpp>
#include <Event.h>
#include <EventConnection.h>
#include <Color4.hpp>
namespace JUI

View File

@@ -2,7 +2,7 @@
#include <J3ML/LinearAlgebra.hpp>
#include <Color4.hpp>
#include <JGL/Font.h>
#include <JGL/types/Font.h>
using J3ML::LinearAlgebra::Vector2;

View File

@@ -11,7 +11,8 @@
#pragma once
#include "Event.h"
#include <Event.h>
#include <EventConnection.h>
#include <string>
#include <vector>
#include "J3ML/LinearAlgebra.hpp"

View File

@@ -20,7 +20,7 @@
#include <JUI/Widgets/TextRect.hpp>
#include <JUI/Widgets/Image.hpp>
#include <rewindow/types/window.h>
#include <jlog/jlog.hpp>
#include <jlog/Logger.hpp>
JGL::Font FreeSans;
JUI::Scene* scene;
@@ -31,7 +31,6 @@ JUI::Scene* CreateScene() {
Scene *root = new Scene();
auto* JUI = new TextRect(root);
JUI->SetFont(FreeSans);
JUI->SetTextSize(48);
@@ -235,7 +234,7 @@ public:
int main()
{
using namespace ReWindow;
LOGLEVEL(jlog::severity::none)
// TODO: Find out new jlog api for silencing specific loggers.
auto* window = new JUIDevelopmentTestWindow("Test Window", 800, 600);
window->setRenderer(RenderingAPI::OPENGL);
@@ -247,7 +246,6 @@ int main()
JGL::Update({800, 600});
FreeSans = JGL::Font("assets/fonts/FreeSans.ttf");
sample_texture = new JGL::Texture("assets/ld.png");
scene = CreateScene();

View File

@@ -7,7 +7,8 @@ namespace JUI
{
void ImageBase::Draw(const Vector2 &pos, const Vector2 &size) {
J2D::Begin();
J2D::DrawSprite(*texture, pos, origin, scale, image_color);
// TODO: Support image rotation in the widget.
J2D::DrawSprite(*texture, pos, 0, origin, scale, image_color);
J2D::End();
}

View File

@@ -1,5 +1,5 @@
#include "JUI/Base/Widget.hpp"
#include "jlog/jlog.hpp"
#include <jlog/Logger.hpp>
namespace JUI {
@@ -326,10 +326,8 @@ namespace JUI {
return newChild;
}
void Widget::SetAnchorPoint(const Vector2& point) {
anchor_point = point;
}
}

View File

@@ -1,6 +1,6 @@
#include "JGL/JGL.h"
#include <JUI/Widgets/Button.hpp>
#include <jlog/jlog.hpp>
#include <jlog/Logger.hpp>
namespace JUI
{

View File

@@ -1,6 +1,6 @@
#include "JGL/JGL.h"
#include "JUI/Widgets/Rect.hpp"
#include "jlog/jlog.hpp"
#include <jlog/Logger.hpp>
namespace JUI {
Rect::Rect(): Widget(), RectBase() {}

View File

@@ -1,5 +1,5 @@
#include "JUI/Widgets/Window.hpp"
#include "jlog/jlog.hpp"
#include <jlog/Logger.hpp>
#include <cstdlib>
@@ -89,8 +89,8 @@ namespace JUI
this->SetVisible(false);
};
DEBUG(std::format("{} {} {} {}", Topbar->Size().X.Pixels, Topbar->Size().Y.Pixels, Topbar->Size().X.Scale,
Topbar->Size().Y.Scale))
jlog::Debug(std::format("{} {} {} {}", Topbar->Size().X.Pixels, Topbar->Size().Y.Pixels, Topbar->Size().X.Scale,
Topbar->Size().Y.Scale));
//min_size = exit_btn->GetSize() + Topbar->GetSize() + TitleLabel->Size();
//= Topbar->GetSize();//+ exit_btn->Size();
// TODO: fs_btn
@@ -160,7 +160,7 @@ namespace JUI
void Window::Update(float delta) {
if (dragging) {
DEBUG(std::format("mpos {} {}", last_known_mouse_pos.x, last_known_mouse_pos.y));
jlog::Debug(std::format("mpos {} {}", last_known_mouse_pos.x, last_known_mouse_pos.y));
Vector2 mpos = last_known_mouse_pos - initial_drag_offset;
this->SetPosition(UDim2{(int)mpos.x, (int)mpos.y, 0,0});
}