关键节点
This commit is contained in:
@@ -0,0 +1,47 @@
|
||||
#pragma once
|
||||
|
||||
#include <XCEditor/Fields/UIEditorEditableFieldCore.h>
|
||||
#include <XCEditor/Fields/UIEditorVector4Field.h>
|
||||
|
||||
#include <array>
|
||||
#include <vector>
|
||||
|
||||
namespace XCEngine::UI::Editor {
|
||||
|
||||
struct UIEditorVector4FieldInteractionState {
|
||||
UIEditorEditableFieldSession session = {};
|
||||
Widgets::UIEditorVector4FieldState vector4FieldState = {};
|
||||
};
|
||||
|
||||
struct UIEditorVector4FieldInteractionResult {
|
||||
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::UIEditorVector4FieldHitTarget hitTarget = {};
|
||||
std::size_t selectedComponentIndex = Widgets::UIEditorVector4FieldInvalidComponentIndex;
|
||||
std::size_t changedComponentIndex = Widgets::UIEditorVector4FieldInvalidComponentIndex;
|
||||
std::array<double, 4u> valuesBefore = { 0.0, 0.0, 0.0, 0.0 };
|
||||
std::array<double, 4u> valuesAfter = { 0.0, 0.0, 0.0, 0.0 };
|
||||
double stepDelta = 0.0;
|
||||
std::string committedText = {};
|
||||
};
|
||||
|
||||
struct UIEditorVector4FieldInteractionFrame {
|
||||
Widgets::UIEditorVector4FieldLayout layout = {};
|
||||
UIEditorVector4FieldInteractionResult result = {};
|
||||
};
|
||||
|
||||
UIEditorVector4FieldInteractionFrame UpdateUIEditorVector4FieldInteraction(
|
||||
UIEditorVector4FieldInteractionState& state,
|
||||
Widgets::UIEditorVector4FieldSpec& spec,
|
||||
const ::XCEngine::UI::UIRect& bounds,
|
||||
const std::vector<::XCEngine::UI::UIInputEvent>& inputEvents,
|
||||
const Widgets::UIEditorVector4FieldMetrics& metrics = {});
|
||||
|
||||
} // namespace XCEngine::UI::Editor
|
||||
Reference in New Issue
Block a user