39 lines
1.1 KiB
C++
39 lines
1.1 KiB
C++
#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
|