Added ImageRect::FitImageToBounds
This commit is contained in:
@@ -9,15 +9,12 @@
|
||||
/// @desc A widget that contains and renders an image provided by JGL, within a rectangular frame.
|
||||
/// @edit 2024-08-05
|
||||
|
||||
|
||||
#pragma once
|
||||
|
||||
|
||||
#include <JUI/Widgets/Rect.hpp>
|
||||
#include <JUI/Base/ImageBase.hpp>
|
||||
|
||||
namespace JUI
|
||||
{
|
||||
namespace JUI {
|
||||
class ImageRect: public Rect, public ImageBase {
|
||||
public:
|
||||
ImageRect();
|
||||
@@ -25,5 +22,10 @@ namespace JUI
|
||||
void Update(float delta) override;
|
||||
|
||||
void Draw() override;
|
||||
|
||||
bool FitImageToBounds() const { return fit_image_to_bounds;}
|
||||
void FitImageToBounds(bool value) { fit_image_to_bounds = value;}
|
||||
protected:
|
||||
bool fit_image_to_bounds;
|
||||
};
|
||||
}
|
@@ -8,6 +8,8 @@ JUI::ImageRect::ImageRect(JUI::Widget *parent) : ImageRect() {
|
||||
|
||||
void JUI::ImageRect::Update(float delta) {
|
||||
Rect::Update(delta);
|
||||
|
||||
|
||||
}
|
||||
|
||||
void JUI::ImageRect::Draw() {
|
||||
|
Reference in New Issue
Block a user