关键节点
This commit is contained in:
@@ -0,0 +1,47 @@
|
||||
#pragma once
|
||||
|
||||
#include <XCEditor/Fields/UIEditorEditableFieldCore.h>
|
||||
#include <XCEditor/Fields/UIEditorVector2Field.h>
|
||||
|
||||
#include <array>
|
||||
#include <vector>
|
||||
|
||||
namespace XCEngine::UI::Editor {
|
||||
|
||||
struct UIEditorVector2FieldInteractionState {
|
||||
UIEditorEditableFieldSession session = {};
|
||||
Widgets::UIEditorVector2FieldState vector2FieldState = {};
|
||||
};
|
||||
|
||||
struct UIEditorVector2FieldInteractionResult {
|
||||
bool consumed = false;
|
||||
bool focusChanged = false;
|
||||
bool valueChanged = false;
|
||||
bool stepApplied = false;
|
||||
bool selectionChanged = false;
|
||||
bool editStarted = false;
|
||||
bool editCommitted = false;
|
||||
bool editCommitRejected = false;
|
||||
bool editCanceled = false;
|
||||
Widgets::UIEditorVector2FieldHitTarget hitTarget = {};
|
||||
std::size_t selectedComponentIndex = Widgets::UIEditorVector2FieldInvalidComponentIndex;
|
||||
std::size_t changedComponentIndex = Widgets::UIEditorVector2FieldInvalidComponentIndex;
|
||||
std::array<double, 2u> valuesBefore = { 0.0, 0.0 };
|
||||
std::array<double, 2u> valuesAfter = { 0.0, 0.0 };
|
||||
double stepDelta = 0.0;
|
||||
std::string committedText = {};
|
||||
};
|
||||
|
||||
struct UIEditorVector2FieldInteractionFrame {
|
||||
Widgets::UIEditorVector2FieldLayout layout = {};
|
||||
UIEditorVector2FieldInteractionResult result = {};
|
||||
};
|
||||
|
||||
UIEditorVector2FieldInteractionFrame UpdateUIEditorVector2FieldInteraction(
|
||||
UIEditorVector2FieldInteractionState& state,
|
||||
Widgets::UIEditorVector2FieldSpec& spec,
|
||||
const ::XCEngine::UI::UIRect& bounds,
|
||||
const std::vector<::XCEngine::UI::UIInputEvent>& inputEvents,
|
||||
const Widgets::UIEditorVector2FieldMetrics& metrics = {});
|
||||
|
||||
} // namespace XCEngine::UI::Editor
|
||||
Reference in New Issue
Block a user