Skip to content

Commit

Permalink
Move settings under file and use inputFloat for rotation increments (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
katalash authored Dec 28, 2022
1 parent 37925cc commit abb5139
Showing 1 changed file with 13 additions and 12 deletions.
25 changes: 13 additions & 12 deletions StudioCore/MapStudioNew.cs
Original file line number Diff line number Diff line change
Expand Up @@ -791,6 +791,12 @@ private void Update(float deltaseconds)
_paramEditor.SaveAll();
_textEditor.SaveAll();
}

if (ImGui.MenuItem("Editor Settings"))
{
settingsMenuOpen = true;
}

if (Resource.FlverResource.CaptureMaterialLayouts && ImGui.MenuItem("Dump Flver Layouts (Debug)", ""))
{
DumpFlverLayouts();
Expand All @@ -814,11 +820,6 @@ private void Update(float deltaseconds)
_textEditor.DrawEditorMenu();
}

if (ImGui.MenuItem("Settings"))
{
settingsMenuOpen = true;
}

if (ImGui.BeginMenu("Help"))
{
if (ImGui.BeginMenu("About"))
Expand All @@ -833,11 +834,11 @@ private void Update(float deltaseconds)
"Thefifthmatt\n" +
"Shadowth117\n" +
"Nordgaren\n" +
"ivi\n\n" +
"ivi\n" +
"Vawser\n\n" +
"Special Thanks:\n" +
"TKGP\n" +
"Meowmaritus\n" +
"Vawser\n" +
"Radai\n" +
"Moonlight Ruin\n" +
"Evan (HalfGrownHollow)");
Expand Down Expand Up @@ -1383,15 +1384,15 @@ public void SettingsGUI()
float arbitrary_rotation_y = CFG.Current.Map_ArbitraryRotation_Y_Shift;
float camera_radius_offset = CFG.Current.Map_MoveSelectionToCamera_Radius;

if (ImGui.SliderFloat("Arbitrary Rotation: X", ref arbitrary_rotation_x, 1.0f, 180.0f))
if (ImGui.InputFloat("Rotation Increment Degrees: X", ref arbitrary_rotation_x))
{
CFG.Current.Map_ArbitraryRotation_X_Shift = arbitrary_rotation_x;
CFG.Current.Map_ArbitraryRotation_X_Shift = Math.Clamp(arbitrary_rotation_x, -180.0f, 180.0f);
}
if (ImGui.SliderFloat("Arbitrary Rotation: Y", ref arbitrary_rotation_y, 1.0f, 180.0f))
if (ImGui.InputFloat("Rotation Increment Degrees: Y", ref arbitrary_rotation_y))
{
CFG.Current.Map_ArbitraryRotation_Y_Shift = arbitrary_rotation_y;
CFG.Current.Map_ArbitraryRotation_Y_Shift = Math.Clamp(arbitrary_rotation_y, -180.0f, 180.0f);;
}
if (ImGui.SliderFloat("Move Selection to Camera: Offset Distance", ref camera_radius_offset, 0.0f, 50.0f))
if (ImGui.InputFloat("Move Selection to Camera: Offset Distance", ref camera_radius_offset))
{
CFG.Current.Map_MoveSelectionToCamera_Radius = camera_radius_offset;
}
Expand Down

0 comments on commit abb5139

Please sign in to comment.