45 lines
1.2 KiB
C++
45 lines
1.2 KiB
C++
/// 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 UDim2.hpp
|
|
/// @desc Universal Dimensions 2D Class
|
|
/// @edit 2024-07-10
|
|
|
|
#pragma once
|
|
|
|
#include <JUI/Base/Widget.hpp>
|
|
#include <JUI/Base/RectBase.hpp>
|
|
#include <J3ML/Geometry/AABB2D.hpp>
|
|
|
|
namespace JUI {
|
|
|
|
/// The Rect Widget Class.
|
|
/// Renders a rectangle or "box" and also serves as a versatile container for laying out other widgets.
|
|
class Rect : public Widget, public RectBase {
|
|
public: /// Constructors
|
|
/// The default constructor.
|
|
Rect();
|
|
|
|
explicit Rect(Widget* parent);
|
|
|
|
~Rect() override {}
|
|
|
|
|
|
AABB2D GetActualRenderBounds() const override;
|
|
|
|
|
|
public:
|
|
void PreDraw() override;
|
|
void InnerDraw() override;
|
|
void PostDraw() override;
|
|
void Draw() override;
|
|
void Update(float delta) override;
|
|
protected:
|
|
GLint old_scissor_bounds[4];
|
|
bool clip_was_enabled;
|
|
};
|
|
} |