summaryrefslogtreecommitdiff
path: root/editor
diff options
context:
space:
mode:
authorJonathan Bradley <jcb@pikum.xyz>2025-06-11 16:04:48 -0400
committerJonathan Bradley <jcb@pikum.xyz>2025-06-11 16:04:54 -0400
commit0f89d12e747b380b35143815a2c8e87c6ee752d4 (patch)
tree78617e7cb819093aa9c0ad107b5dc79891e8ff55 /editor
parente478bae42cf886a12433331937887de4c4e85ce2 (diff)
pke: serialize PkeInput first-pass
Diffstat (limited to 'editor')
-rw-r--r--editor/editor.cpp31
1 files changed, 16 insertions, 15 deletions
diff --git a/editor/editor.cpp b/editor/editor.cpp
index 959d772..b48a40e 100644
--- a/editor/editor.cpp
+++ b/editor/editor.cpp
@@ -1813,77 +1813,78 @@ void PkeEditor_Teardown() {
}
void PkeEditor_Init() {
- PkeInputSet debugControlsSet;
+ PkeInputSet debugControlsSet{};
debugControlsSet.title = "debug-editor-controls";
debugControlsSet.actionCount = 14;
debugControlsSet.actions = pk_new<PkeInputAction>(debugControlsSet.actionCount);
+ debugControlsSet.flags = PKE_INPUT_ACTION_SET_FLAG_DO_NOT_SERIALIZE;
debugControlsSet.actions[0].name = dbgCtrl_CameraLeft;
- debugControlsSet.actions[0].primaryHash = PkeInputEventMask {
+ debugControlsSet.actions[0].masks[0] = PkeInputEventMask {
.computedHash = PKE_INPUT_HASH_ALL_KEY_EVENTS,
.button = GLFW_KEY_A,
};
debugControlsSet.actions[1].name = dbgCtrl_CameraRight;
- debugControlsSet.actions[1].primaryHash = PkeInputEventMask {
+ debugControlsSet.actions[1].masks[0] = PkeInputEventMask {
.computedHash = PKE_INPUT_HASH_ALL_KEY_EVENTS,
.button = GLFW_KEY_D,
};
debugControlsSet.actions[2].name = dbgCtrl_CameraForward;
- debugControlsSet.actions[2].primaryHash = PkeInputEventMask {
+ debugControlsSet.actions[2].masks[0] = PkeInputEventMask {
.computedHash = PKE_INPUT_HASH_ALL_KEY_EVENTS,
.button = GLFW_KEY_W,
};
debugControlsSet.actions[3].name = dbgCtrl_CameraBack;
- debugControlsSet.actions[3].primaryHash = PkeInputEventMask {
+ debugControlsSet.actions[3].masks[0] = PkeInputEventMask {
.computedHash = PKE_INPUT_HASH_ALL_KEY_EVENTS,
.button = GLFW_KEY_S,
};
debugControlsSet.actions[4].name = dbgCtrl_CameraUp;
- debugControlsSet.actions[4].primaryHash = PkeInputEventMask {
+ debugControlsSet.actions[4].masks[0] = PkeInputEventMask {
.computedHash = PKE_INPUT_HASH_ALL_KEY_EVENTS,
.button = GLFW_KEY_R,
};
debugControlsSet.actions[5].name = dbgCtrl_CameraDown;
- debugControlsSet.actions[5].primaryHash = PkeInputEventMask {
+ debugControlsSet.actions[5].masks[0] = PkeInputEventMask {
.computedHash = PKE_INPUT_HASH_ALL_KEY_EVENTS,
.button = GLFW_KEY_F,
};
debugControlsSet.actions[6].name = dbgCtrl_CameraRotCC;
- debugControlsSet.actions[6].primaryHash = PkeInputEventMask {
+ debugControlsSet.actions[6].masks[0] = PkeInputEventMask {
.computedHash = PKE_INPUT_HASH_ALL_KEY_EVENTS,
.button = GLFW_KEY_Q,
};
debugControlsSet.actions[7].name = dbgCtrl_CameraRotC;
- debugControlsSet.actions[7].primaryHash = PkeInputEventMask {
+ debugControlsSet.actions[7].masks[0] = PkeInputEventMask {
.computedHash = PKE_INPUT_HASH_ALL_KEY_EVENTS,
.button = GLFW_KEY_E,
};
debugControlsSet.actions[8].name = dbgCtrl_CameraRot;
- debugControlsSet.actions[8].primaryHash = PkeInputEventMask {
+ debugControlsSet.actions[8].masks[0] = PkeInputEventMask {
.computedHash = PKE_INPUT_HASH_ALL_CURSOR_POS_EVENTS,
};
debugControlsSet.actions[9].name = dbgCtrl_CameraButtonMask;
- debugControlsSet.actions[9].primaryHash = PkeInputEventMask {
+ debugControlsSet.actions[9].masks[0] = PkeInputEventMask {
.computedHash = PKE_INPUT_HASH_ALL_MOUSE_BUTTON_EVENTS,
.button = GLFW_MOUSE_BUTTON_MIDDLE,
};
debugControlsSet.actions[10].name = dbgCtrl_SelectHovered;
- debugControlsSet.actions[10].primaryHash = PkeInputEventMask {
+ debugControlsSet.actions[10].masks[0] = PkeInputEventMask {
.computedHash = PKE_INPUT_HASH_ALL_MOUSE_BUTTON_EVENTS,
.button = GLFW_MOUSE_BUTTON_LEFT,
};
debugControlsSet.actions[11].name = dbgCtrl_ClearSelection;
- debugControlsSet.actions[11].primaryHash = PkeInputEventMask {
+ debugControlsSet.actions[11].masks[0] = PkeInputEventMask {
.computedHash = PKE_INPUT_HASH_ALL_MOUSE_BUTTON_EVENTS,
.button = GLFW_MOUSE_BUTTON_RIGHT,
};
debugControlsSet.actions[12].name = dbgCtrl_DeleteSelectedItem;
- debugControlsSet.actions[12].primaryHash = PkeInputEventMask {
+ debugControlsSet.actions[12].masks[0] = PkeInputEventMask {
.computedHash = PKE_INPUT_HASH_ALL_KEY_EVENTS,
.button = GLFW_KEY_DELETE,
};
debugControlsSet.actions[13].name = dbgCtrl_ImGui_Toggle;
- debugControlsSet.actions[13].primaryHash = PkeInputEventMask {
+ debugControlsSet.actions[13].masks[0] = PkeInputEventMask {
.computedHash = PKE_INPUT_HASH_ALL_KEY_EVENTS,
.button = GLFW_KEY_F1,
};