Refactor XCUI editor module layout
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
#pragma once
|
||||
|
||||
#include <XCEditor/Fields/UIEditorBoolField.h>
|
||||
|
||||
#include <XCEngine/UI/Types.h>
|
||||
|
||||
#include <vector>
|
||||
|
||||
namespace XCEngine::UI::Editor {
|
||||
|
||||
struct UIEditorBoolFieldInteractionState {
|
||||
Widgets::UIEditorBoolFieldState fieldState = {};
|
||||
::XCEngine::UI::UIPoint pointerPosition = {};
|
||||
bool hasPointerPosition = false;
|
||||
};
|
||||
|
||||
struct UIEditorBoolFieldInteractionResult {
|
||||
bool consumed = false;
|
||||
bool valueChanged = false;
|
||||
bool focusedChanged = false;
|
||||
bool newValue = false;
|
||||
Widgets::UIEditorBoolFieldHitTarget hitTarget = {};
|
||||
};
|
||||
|
||||
struct UIEditorBoolFieldInteractionFrame {
|
||||
Widgets::UIEditorBoolFieldLayout layout = {};
|
||||
UIEditorBoolFieldInteractionResult result = {};
|
||||
};
|
||||
|
||||
UIEditorBoolFieldInteractionFrame UpdateUIEditorBoolFieldInteraction(
|
||||
UIEditorBoolFieldInteractionState& state,
|
||||
bool& value,
|
||||
const ::XCEngine::UI::UIRect& bounds,
|
||||
const Widgets::UIEditorBoolFieldSpec& spec,
|
||||
const std::vector<::XCEngine::UI::UIInputEvent>& inputEvents,
|
||||
const Widgets::UIEditorBoolFieldMetrics& metrics = {});
|
||||
|
||||
} // namespace XCEngine::UI::Editor
|
||||
Reference in New Issue
Block a user