summaryrefslogtreecommitdiff
path: root/src/imgui_ui_properties.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/imgui_ui_properties.cpp')
-rw-r--r--src/imgui_ui_properties.cpp27
1 files changed, 26 insertions, 1 deletions
diff --git a/src/imgui_ui_properties.cpp b/src/imgui_ui_properties.cpp
index 6f949c8..83adcf1 100644
--- a/src/imgui_ui_properties.cpp
+++ b/src/imgui_ui_properties.cpp
@@ -434,11 +434,13 @@ ImGui_PropertiesPanel(project_data *File, project_state *State, ui *UI, memory *
if (Layer->IsShapeLayer) {
shape_options *Opt = &Layer->Shape.Opt;
// TODO(fox): Combine with RGBA function?
- char *Names[3] = { "Fill only", "Stroke only", "Fill and stroke" };
+ char *Names[3] = { "Fill and stroke", "Fill only", "Stroke only" };
if (ImGui::BeginListBox("Shape render type")) {
for (int i = 0; i < 3; i++) {
if (ImGui::Selectable(Names[i], (Opt->Visibility == i))) {
Opt->Visibility = i;
+ Memory->PurgeCache = true;
+ State->UpdateFrame = true;
}
}
ImGui::EndListBox();
@@ -449,6 +451,8 @@ ImGui_PropertiesPanel(project_data *File, project_state *State, ui *UI, memory *
for (int i = 0; i < 2; i++) {
if (ImGui::Selectable(Names2[i], (Opt->LineCapType == CapVals[i]))) {
Opt->LineCapType = CapVals[i];
+ Memory->PurgeCache = true;
+ State->UpdateFrame = true;
}
}
ImGui::EndListBox();
@@ -460,15 +464,36 @@ ImGui_PropertiesPanel(project_data *File, project_state *State, ui *UI, memory *
if (ImGui::Selectable(Names3[i], (Opt->LineJoinType == JoinVals[i]))) {
Opt->Visibility = i;
Opt->LineJoinType = JoinVals[i];
+ Memory->PurgeCache = true;
+ State->UpdateFrame = true;
}
}
ImGui::EndListBox();
}
ImGui::ColorEdit4("Fill color", (real32 *)&Opt->FillCol, ImGuiColorEditFlags_Float);
+ if (ImGui::IsItemActive()) {
+ Memory->PurgeCache = true;
+ State->UpdateFrame = true;
+ }
ImGui::ColorEdit4("Stroke color", (real32 *)&Opt->StrokeCol, ImGuiColorEditFlags_Float);
+ if (ImGui::IsItemActive()) {
+ Memory->PurgeCache = true;
+ State->UpdateFrame = true;
+ }
real32 StrokeWidthMin = 0;
real32 StrokeWidthMax = 1024;
ImGui::DragScalar("Stroke width", ImGuiDataType_Float, &Opt->StrokeWidth, 1, &StrokeWidthMin, &StrokeWidthMax, "%.3f");
+ if (ImGui::IsItemActive()) {
+ Memory->PurgeCache = true;
+ State->UpdateFrame = true;
+ }
+ real32 RoundnessMin = 0;
+ real32 RoundnessMax = 1024;
+ ImGui::DragScalar("Roundness", ImGuiDataType_Float, &Opt->Roundness, 1, &RoundnessMin, &RoundnessMax, "%.3f");
+ if (ImGui::IsItemActive()) {
+ Memory->PurgeCache = true;
+ State->UpdateFrame = true;
+ }
// State->UpdateFrame = true;
}
ImGui::End();