summaryrefslogtreecommitdiff
path: root/src/imgui_ui.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/imgui_ui.cpp')
-rw-r--r--src/imgui_ui.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/imgui_ui.cpp b/src/imgui_ui.cpp
index 380aaf2..bfb79f3 100644
--- a/src/imgui_ui.cpp
+++ b/src/imgui_ui.cpp
@@ -387,6 +387,26 @@ ImGui_ProcessInputs(project_data *File, project_state *State, ui *UI, memory *Me
State->Interact_Modifier = 1;
else
State->Interact_Modifier = 0;
+ } else if (io.KeyShift) {
+ bool32 CommitAction = 0;
+ int h = 0, c = 0, i = 0;
+ while (Block_Loop(Memory, F_Layers, File->Layer_Count, &h, &c, &i)) {
+ block_layer *Layer = (block_layer *)Memory_Block_AddressAtIndex(Memory, F_Layers, i);
+ if (Layer->IsSelected && Layer->IsShapeLayer) {
+ if (!CommitAction) {
+ History_Entry_Commit(Memory, "Swap shape colors");
+ CommitAction = 1;
+ }
+ v4 Temp = Layer->ShapeOpt.FillCol;
+ History_Action_Swap(Memory, F_Layers, sizeof(Layer->ShapeOpt.FillCol), &Layer->ShapeOpt.FillCol);
+ Layer->ShapeOpt.FillCol = Layer->ShapeOpt.StrokeCol;
+ History_Action_Swap(Memory, F_Layers, sizeof(Layer->ShapeOpt.StrokeCol), &Layer->ShapeOpt.StrokeCol);
+ Layer->ShapeOpt.StrokeCol = Temp;
+ }
+ }
+ if (CommitAction) {
+ History_Entry_End(Memory);
+ }
} else {
v4 Temp = UI->Color;
UI->Color = UI->AltColor;