Merge remote-tracking branch 'origin/master'

This commit is contained in:
2025-02-24 14:33:56 -05:00
6 changed files with 9 additions and 7 deletions

View File

@@ -58,7 +58,7 @@ CPMAddPackage(
CPMAddPackage(
NAME JGL
URL https://git.redacted.cc/josh/JGL/archive/Prerelease-51.zip
URL https://git.redacted.cc/josh/JGL/archive/Prerelease-52.zip
)
target_include_directories(JUI PUBLIC ${Event_SOURCE_DIR}/include)

View File

@@ -58,7 +58,7 @@ protected:
protected:
// I don't know why this function even exists, or why it was public. It lets you circumvent
// the whole purpose of storing the state things are in :/ - Redacted.
void Draw(const Vector2& abs_pos, const Vector2& abs_size, const std::string& content, uint size, const Color4& color);
void Draw(const Vector2& abs_pos, const Vector2& abs_size, const std::string& content, unsigned int size, const Color4& color);
/// Renders the aligned text string within a bounding-box specified by abs_pos (top-left corner), and abs_size.
/// @see Widget::Draw(), Text::Draw().

View File

@@ -42,7 +42,7 @@ void TextBase::AlignCenterVertically() {
void TextBase::SetWordWrap(bool wrap) { word_wrap = wrap; }
void TextBase::Draw(const Vector2& abs_pos, const Vector2& abs_size, const std::string& content, uint size, const Color4& color) {
void TextBase::Draw(const Vector2& abs_pos, const Vector2& abs_size, const std::string& content, unsigned int size, const Color4& color) {
// Calculate how much to origin the text based on alignment.
float align_x = abs_pos.x;
float align_y = abs_pos.y;

View File

@@ -587,6 +587,7 @@ Tween* Widget::TweenMarginBottom(const JUI::UDim& goal, JUI::TweenInfo info) {
return t;
}
/*
Tween *Widget::TweenAnchorPoint(const Vector2 &goal, TweenInfo info) {
Vector2 start = this->AnchorPoint();
TweenTickFunc updateTillGoalReached = [this, start, goal] (float elapsed, float progress) mutable {
@@ -594,3 +595,4 @@ Tween *Widget::TweenAnchorPoint(const Vector2 &goal, TweenInfo info) {
AnchorPoint(start);
};
}
*/

View File

@@ -69,11 +69,11 @@ ScrollingRect::~ScrollingRect() { delete canvas; }
ScrollingRect::ScrollingRect() : canvas(new RenderTarget(default_initialize_canvas_size)) {
Name("ScrollingRect");
bool success = canvas->SetMSAAEnabled(JGL::MSAA_SAMPLE_RATE::MSAA_8X);
//bool success = canvas->SetMSAAEnabled(JGL::SampleRate::X8);
}
ScrollingRect::ScrollingRect(Widget *parent) : Rect(parent), canvas(new RenderTarget(default_initialize_canvas_size)) {
bool success = canvas->SetMSAAEnabled(JGL::MSAA_SAMPLE_RATE::MSAA_8X);
//bool success = canvas->SetMSAAEnabled(JGL::MSAA_SAMPLE_RATE::MSAA_8X);
}
JGL::RenderTarget *ScrollingRect::GetCanvas() { return canvas; }

View File

@@ -51,10 +51,10 @@ namespace JUI {
// TODO: auto* list = new HorizontalListLayout(Topbar);
// TODO: exit_btn
auto* exb_tex = new Texture({titlebar_height, titlebar_height });
auto* exb_tex = new Texture( Vector2i(titlebar_height, titlebar_height));
auto* exb_rt = new RenderTarget(exb_tex);
if (exb_rt->SetMSAAEnabled(JGL::MSAA_SAMPLE_RATE::MSAA_8X)) {/* using msaa to make the circle nicer. */}
if (exb_rt->SetMSAAEnabled(JGL::SampleRate::X8)) {/* using msaa to make the circle nicer. */}
std::array<Color4, 2> exb_circle_colors {
Colors::White,//Color4(168, 28, 28, 255),
Colors::White//Color4(212, 25, 25, 255)