From e9a6bdd376edc5f8a9ef956776b983abfa20d22a Mon Sep 17 00:00:00 2001 From: Peter Slattery Date: Sat, 2 Nov 2019 10:47:27 -0700 Subject: [PATCH] Got nodes to update when the node view isn't open --- src/foldhaus_app.cpp | 5 +---- src/foldhaus_interface.cpp | 9 ++------- todo.txt | 13 +++++++------ 3 files changed, 10 insertions(+), 17 deletions(-) diff --git a/src/foldhaus_app.cpp b/src/foldhaus_app.cpp index 0366745..82e633e 100644 --- a/src/foldhaus_app.cpp +++ b/src/foldhaus_app.cpp @@ -548,6 +548,7 @@ UPDATE_AND_RENDER(UpdateAndRender) State->LEDBufferList->Colors, State->LEDBufferList->Count, Context.DeltaTime); + ResetNodesUpdateState(State->NodeList); } ClearTransientNodeColorBuffers(State->NodeList); @@ -723,10 +724,6 @@ UPDATE_AND_RENDER(UpdateAndRender) } } - /////////////////////////////////////// - // Figuring Out Nodes - ////////////////////////////////////// - for (s32 m = 0; m < State->Modes.ActiveModesCount; m++) { operation_mode OperationMode = State->Modes.ActiveModes[m]; diff --git a/src/foldhaus_interface.cpp b/src/foldhaus_interface.cpp index 6eb81bc..7d44a40 100644 --- a/src/foldhaus_interface.cpp +++ b/src/foldhaus_interface.cpp @@ -285,7 +285,8 @@ FOLDHAUS_INPUT_COMMAND_PROC(EndNodeFieldTextEdit) } input_command NodeFieldTextEditCommands [] = { - { KeyCode_Enter, KeyCode_Invalid, Command_Began, EndNodeFieldTextEdit}, + { KeyCode_Enter, KeyCode_Invalid, Command_Began, EndNodeFieldTextEdit }, + { KeyCode_MouseLeftButton, KeyCode_Invalid, Command_Began, EndNodeFieldTextEdit }, DEFAULT_TEXT_ENTRY_INPUT_COMMANDS_ARRAY_ENTRY, }; @@ -474,12 +475,6 @@ FOLDHAUS_INPUT_COMMAND_PROC(NodeViewBeginMouseSelectInteraction) OPERATION_RENDER_PROC(RenderNodeView) { node_view_operation_state* OpState = (node_view_operation_state*)Operation.OpStateMemory; - - // TODO(Peter): Not sure we want to be doing Node Functionality updates in a mode. This should happen every - // frame regardless of whether or not we're viewing the nodes. - // TODO(Peter): Make sure that RenderNodeList isn't also updating them!! - ResetNodesUpdateState(State->NodeList); - RenderNodeList(State->NodeList, State->NodeRenderSettings, RenderBuffer); } diff --git a/todo.txt b/todo.txt index a19bd46..f1decd7 100644 --- a/todo.txt +++ b/todo.txt @@ -16,11 +16,7 @@ update functions UI Improvements - highlight node field under active edit - -Name -- Splash screen (like blender) (thisll be fun) -- - Image importer (stb image? or find a png > bmp converter for the image you have) -- - Display on startup +- print node field names on hover or on the node Application - More efficient HSV <-> RGB @@ -78,4 +74,9 @@ Optimization - patterns are asking to be multithreaded - probably want to convert as much color functions to use u32 Packed Colors - - Probably want to think about this more. What about supporting different color depths -- for different output devices? \ No newline at end of file +- for different output devices? + +Name +- Splash screen (like blender) (thisll be fun) +- - Image importer (stb image? or find a png > bmp converter for the image you have) +- - Display on startup