Implemented reverting back to previous axis when rotate tool is selected and not moving the camera anymore

dev
Shariq Shah 6 years ago
parent bccfb00921
commit 3641a2f448
  1. 4
      src/game/editor.c
  2. 4
      todo.txt

@ -677,6 +677,9 @@ void editor_on_mousebutton_release(const struct Event* event)
editor->draw_entity_wireframe = false; editor->draw_entity_wireframe = false;
} }
} }
if(editor->selected_entity && editor->current_tool == EDITOR_TOOL_ROTATE && editor->previous_axis != EDITOR_AXIS_NONE)
editor_axis_set(editor, editor->previous_axis);
} }
void editor_on_mousebutton_press(const struct Event* event) void editor_on_mousebutton_press(const struct Event* event)
@ -957,6 +960,7 @@ void editor_tool_set(struct Editor* editor, int tool)
editor->draw_entity_wireframe = true; editor->draw_entity_wireframe = true;
else else
editor->draw_entity_wireframe = false; editor->draw_entity_wireframe = false;
editor->previous_axis = editor->current_axis;
editor_tool_reset(editor); editor_tool_reset(editor);
} }

@ -11,6 +11,8 @@ Todo:
- Color palette, picker and dropper - Color palette, picker and dropper
- Key binding and function to snap editor camera to selected entity - Key binding and function to snap editor camera to selected entity
location location
- Implement resetting complete transform or just rotation, translation
or scale for selected entity
- Key binding and function to orient entity to camera orientation - Key binding and function to orient entity to camera orientation
- Mouse warp to opposite side of the window when it reaches bounds - Mouse warp to opposite side of the window when it reaches bounds
- Add other axis combinations like YZ and XY to transform tool - Add other axis combinations like YZ and XY to transform tool
@ -272,4 +274,6 @@ Done:
* Removed all usages of tool_mesh_position * Removed all usages of tool_mesh_position
* Renamed editor modes to editor tools to make the code more * Renamed editor modes to editor tools to make the code more
consistent consistent
* Implemented reverting back to previously selected axis when not
moving the camera any more and rotate tool is selected.

Loading…
Cancel
Save