Update packages.
This commit is contained in:
@@ -38,7 +38,7 @@ set_target_properties(JUI PROPERTIES LINKER_LANGUAGE CXX)
|
||||
|
||||
CPMAddPackage(
|
||||
NAME mcolor
|
||||
URL https://git.redacted.cc/maxine/mcolor/archive/Prerelease-7.4.zip
|
||||
URL https://git.redacted.cc/maxine/mcolor/archive/Release-1.zip
|
||||
)
|
||||
|
||||
|
||||
@@ -49,7 +49,7 @@ CPMAddPackage(
|
||||
|
||||
CPMAddPackage(
|
||||
NAME jlog
|
||||
URL https://git.redacted.cc/josh/jlog/archive/Prerelease-18.zip
|
||||
URL https://git.redacted.cc/josh/jlog/archive/Prerelease-19.zip
|
||||
)
|
||||
|
||||
CPMAddPackage(
|
||||
@@ -59,7 +59,7 @@ CPMAddPackage(
|
||||
|
||||
CPMAddPackage(
|
||||
NAME ReWindow
|
||||
URL https://git.redacted.cc/Redacted/ReWindow/archive/Prerelease-33.zip
|
||||
URL https://git.redacted.cc/Redacted/ReWindow/archive/Prerelease-34.zip
|
||||
)
|
||||
|
||||
CPMAddPackage(
|
||||
|
12
include/JUI/Base/CanvasBase.hpp
Normal file
12
include/JUI/Base/CanvasBase.hpp
Normal file
@@ -0,0 +1,12 @@
|
||||
#pragma region
|
||||
|
||||
|
||||
namespace JUI {
|
||||
/// The CanvasBase class is an object that handles managing and drawing a RenderTarget reference.
|
||||
/// This class is similar to ImageBase in that it contains and renders a texture-type object,
|
||||
/// But differs in that this one is intended to be used for interactive drawing.
|
||||
class CanvasBase {
|
||||
|
||||
|
||||
};
|
||||
}
|
@@ -8,7 +8,6 @@
|
||||
#include "../Style/TextStyler.hpp"
|
||||
#include <JUI/Widgets/Slider.hpp>
|
||||
|
||||
|
||||
namespace JUI {
|
||||
|
||||
std::string rgb2hex(int r, int g, int b, bool with_head)
|
||||
|
52
include/JUI/Widgets/FileDialog.hpp
Normal file
52
include/JUI/Widgets/FileDialog.hpp
Normal file
@@ -0,0 +1,52 @@
|
||||
/// Josh's User Interface Library
|
||||
/// A C++20 Library for creating, styling, and rendering of a UI/UX widgets.
|
||||
/// Developed and Maintained by Josh O'Leary @ Redacted Software.
|
||||
/// Special Thanks to William Tomasine II and Maxine Hayes.
|
||||
/// (c) 2024 Redacted Software
|
||||
/// This work is dedicated to the public domain.
|
||||
|
||||
/// @file FileDialog.hpp
|
||||
/// @desc A dialog window that shows a selection of files on disk, and a form for naming, used for file loading and saving.
|
||||
/// @edit 2024-5-29
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <JUI/Widgets/Window.hpp>
|
||||
#include <JUI/Widgets/UtilityBar.hpp>
|
||||
#include <JUI/Widgets/ScrollingRect.hpp>
|
||||
|
||||
namespace JUI
|
||||
{
|
||||
|
||||
class FileListing : public JUI::Widget { };
|
||||
|
||||
class FileDialogWindow : public JUI::Window
|
||||
{
|
||||
public:
|
||||
Event<> UserCompleted;
|
||||
Event<> UserConfirmed;
|
||||
Event<> UserCancelled;
|
||||
FileDialogWindow() : Window() {
|
||||
auto* toolbar = new JUI::UtilityBar(this->Content());
|
||||
|
||||
auto* file_listing = new JUI::ScrollingRect(this->Content());
|
||||
file_listing->Size({100_percent, 100_percent-20_px});
|
||||
|
||||
}
|
||||
FileDialogWindow(const std::filesystem::path& root) : FileDialogWindow() {}
|
||||
explicit FileDialogWindow(Widget* parent, const std::filesystem::path& root) : FileDialogWindow(root)
|
||||
{
|
||||
Parent(parent);
|
||||
}
|
||||
|
||||
|
||||
protected:
|
||||
private:
|
||||
};
|
||||
|
||||
|
||||
class OpenFileDialogWindow : public JUI::Window { };
|
||||
class SaveFileDialogWindow : public JUI::Window { };
|
||||
class SelectFolderDialog : public JUI::Window { };
|
||||
|
||||
}
|
@@ -9,11 +9,7 @@ namespace JUI {
|
||||
Color4 color;
|
||||
};
|
||||
|
||||
class Graph : public JUI::ImageRect {
|
||||
public:
|
||||
protected:
|
||||
private:
|
||||
};
|
||||
|
||||
|
||||
class FpsGraph : public JUI::ImageRect
|
||||
{
|
||||
|
9
include/JUI/Widgets/Graph.hpp
Normal file
9
include/JUI/Widgets/Graph.hpp
Normal file
@@ -0,0 +1,9 @@
|
||||
#pragma once
|
||||
#include "Rect.hpp"
|
||||
#include "ImageRect.hpp"
|
||||
|
||||
class Graph : public JUI::ImageRect {
|
||||
public:
|
||||
protected:
|
||||
private:
|
||||
};
|
14
main.cpp
14
main.cpp
@@ -149,13 +149,11 @@ JUI::UtilityBar* CreateUtilityBar(JUI::Widget* root) {
|
||||
// TODO: Make it so that when you mouse over another option in the *parent* menu, it closes any open submenus.
|
||||
auto* demos = topbar->AddSubmenu("Demos");
|
||||
{
|
||||
demos->AddButton("9-Slice Widget Demo",
|
||||
[&] mutable { nineslice_demo_window->Toggle(); });
|
||||
demos->AddButton("9-Slice Widget Demo", [&] { nineslice_demo_window->Toggle(); });
|
||||
|
||||
demos->AddButton("Scroll Widget Demo", [&] mutable {});
|
||||
demos->AddButton("Scroll Widget Demo", [&] {});
|
||||
|
||||
demos->AddButton("Command Line",
|
||||
[&] mutable{ console->Toggle();});
|
||||
demos->AddButton("Command Line", [&]{ console->Toggle();});
|
||||
|
||||
auto* test_sub = demos->AddSubmenu("Fruit"); {
|
||||
test_sub->AddButton("Apples");
|
||||
@@ -173,16 +171,16 @@ JUI::UtilityBar* CreateUtilityBar(JUI::Widget* root) {
|
||||
|
||||
auto* edit = topbar->AddButton("Edit");
|
||||
auto* view = topbar->AddSubmenu("View"); {
|
||||
view->AddButton("Increase UI Scale 5%", [&]mutable {
|
||||
view->AddButton("Increase UI Scale 5%", [&] {
|
||||
ui_scale += 0.05f;
|
||||
});
|
||||
view->AddButton("Decrease UI Scale 5%", [&] mutable{
|
||||
view->AddButton("Decrease UI Scale 5%", [&] {
|
||||
ui_scale -= 0.05f;
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
auto* help = topbar->AddButton("About", [&] mutable {
|
||||
auto* help = topbar->AddButton("About", [&] {
|
||||
|
||||
});
|
||||
|
||||
|
Reference in New Issue
Block a user