[studio] Cleanup
This commit is contained in:
@@ -12,6 +12,7 @@
|
||||
|
||||
#include <turbine/context.hpp>
|
||||
#include <studio/context.hpp>
|
||||
#include <studio/widget.hpp>
|
||||
|
||||
namespace studio::ig {
|
||||
|
||||
@@ -303,7 +304,7 @@ class FilePicker {
|
||||
|
||||
};
|
||||
|
||||
class QuestionPopup {
|
||||
class QuestionPopup: public Widget {
|
||||
private:
|
||||
enum class Stage {
|
||||
Closed,
|
||||
@@ -316,7 +317,7 @@ class QuestionPopup {
|
||||
ox::String m_question;
|
||||
|
||||
public:
|
||||
ox::Signal<ox::Error(ig::PopupResponse)> response;
|
||||
ox::Signal<ox::Error(PopupResponse)> response;
|
||||
|
||||
QuestionPopup(ox::StringParam title, ox::StringParam question) noexcept;
|
||||
|
||||
@@ -327,7 +328,7 @@ class QuestionPopup {
|
||||
[[nodiscard]]
|
||||
bool isOpen() const noexcept;
|
||||
|
||||
void draw(StudioContext &ctx, ImVec2 const &sz = {}) noexcept;
|
||||
void draw(StudioContext &ctx) noexcept;
|
||||
|
||||
};
|
||||
|
||||
|
@@ -12,10 +12,12 @@
|
||||
|
||||
#include <turbine/context.hpp>
|
||||
|
||||
#include "widget.hpp"
|
||||
|
||||
namespace studio {
|
||||
|
||||
|
||||
class Popup {
|
||||
class Popup: public Widget {
|
||||
private:
|
||||
ox::Vec2 m_size;
|
||||
ox::String m_title;
|
||||
@@ -32,8 +34,6 @@ class Popup {
|
||||
[[nodiscard]]
|
||||
virtual bool isOpen() const noexcept = 0;
|
||||
|
||||
virtual void draw(studio::StudioContext &ctx) noexcept = 0;
|
||||
|
||||
protected:
|
||||
constexpr void setSize(ox::Size sz) noexcept {
|
||||
m_size = {static_cast<float>(sz.width), static_cast<float>(sz.height)};
|
||||
|
@@ -15,7 +15,7 @@ namespace studio {
|
||||
class Widget: public ox::SignalHandler {
|
||||
public:
|
||||
~Widget() noexcept override = default;
|
||||
virtual void draw(studio::StudioContext&) noexcept = 0;
|
||||
virtual void draw(StudioContext&) noexcept = 0;
|
||||
};
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user