From 53fcabf0c52c740b3341b09fc3b5dcdfed82c339 Mon Sep 17 00:00:00 2001 From: Caleb Date: Sat, 7 Jan 2023 22:38:28 -0500 Subject: [PATCH] Added menu settings and defaults for splitdisplay --- .gitmodules | 3 + .../QualityOfLifeMenu.lua | 57 +++++++++++++++++++ HadesSpeedrunningModpack/SettingsHashMenu.lua | 3 +- SplitDisplay | 1 + 4 files changed, 63 insertions(+), 1 deletion(-) create mode 160000 SplitDisplay diff --git a/.gitmodules b/.gitmodules index c95a582..ad95d45 100644 --- a/.gitmodules +++ b/.gitmodules @@ -14,3 +14,6 @@ path = hades-CharonSackControl url = https://github.com/cgullsHadesMods/hades-CharonSackControl.git +[submodule "SplitDisplay"] + path = SplitDisplay + url = https://github.com/cgullsHadesMods/hades-SplitDisplay.git diff --git a/HadesSpeedrunningModpack/QualityOfLifeMenu.lua b/HadesSpeedrunningModpack/QualityOfLifeMenu.lua index 28086b2..3846f2c 100644 --- a/HadesSpeedrunningModpack/QualityOfLifeMenu.lua +++ b/HadesSpeedrunningModpack/QualityOfLifeMenu.lua @@ -285,7 +285,64 @@ function HSMConfigMenu.CreateQolMenu(screen) }) screen.Components["RtaTimerResetButton"].OnPressedFunctionName = "RtaTimer__ResetRtaTimer" itemLocationY = itemLocationY + itemSpacingY + ----------------------------- + -- Victory Screen Split Display Toggle + ----------------------------- + screen.Components["SplitDisplayTextBox"] = CreateScreenComponent({ + Name = "BlankObstacle", + Scale = 1, + X = itemLocationX, + Y = itemLocationY, + Group = "Combat_Menu" }) + CreateTextBox({ + Id = screen.Components["SplitDisplayTextBox"].Id, + Text = "Splits on Victory Screen: ", + Color = Color.BoonPatchCommon, + FontSize = 16, + OffsetX = 0, OffsetY = 0, + Font = "AlegrayaSansSCRegular", + ShadowBlur = 0, ShadowColor = { 0, 0, 0, 1 }, ShadowOffset = { 0, 2 }, + Justification = "Left" + }) + screen.Components["SplitDisplayCheckBox"] = CreateScreenComponent({ + Name = "RadioButton", + Scale = 1, + X = itemLocationX + itemSpacingX, + Y = itemLocationY, + Group = "CombatMenu" + }) + screen.Components["SplitDisplayCheckBox"].Config = "SplitDisplay.config.Enabled" + screen.Components["SplitDisplayCheckBox"].OnPressedFunctionName = "HSMConfigMenu__ToggleGenericConfigCheckBox" + HSMConfigMenu__UpdateGenericConfigCheckbox(screen, screen.Components["SplitDisplayCheckBox"]) + itemLocationY = itemLocationY + itemSpacingY + screen.Components["SplitDisplaySegmentTimeTextBox"] = CreateScreenComponent({ + Name = "BlankObstacle", + Scale = 1, + X = itemLocationX, + Y = itemLocationY, + Group = "Combat_Menu" }) + CreateTextBox({ + Id = screen.Components["SplitDisplaySegmentTimeTextBox"].Id, + Text = " - Segment Length instead of Split Time: ", + Color = Color.BoonPatchCommon, + FontSize = 16, + OffsetX = 0, OffsetY = 0, + Font = "AlegrayaSansSCRegular", + ShadowBlur = 0, ShadowColor = { 0, 0, 0, 1 }, ShadowOffset = { 0, 2 }, + Justification = "Left" + }) + screen.Components["SplitDisplaySegmentTimeCheckBox"] = CreateScreenComponent({ + Name = "RadioButton", + Scale = 1, + X = itemLocationX + itemSpacingX, + Y = itemLocationY, + Group = "CombatMenu" + }) + screen.Components["SplitDisplaySegmentTimeCheckBox"].Config = "SplitDisplay.config.ShowSegments" + screen.Components["SplitDisplaySegmentTimeCheckBox"].OnPressedFunctionName = "HSMConfigMenu__ToggleGenericConfigCheckBox" + HSMConfigMenu__UpdateGenericConfigCheckbox(screen, screen.Components["SplitDisplaySegmentTimeCheckBox"]) + itemLocationY = itemLocationY + itemSpacingY ----------------------------- -- Hell Mode Toggle ----------------------------- diff --git a/HadesSpeedrunningModpack/SettingsHashMenu.lua b/HadesSpeedrunningModpack/SettingsHashMenu.lua index 22a0ddf..6acc8e4 100644 --- a/HadesSpeedrunningModpack/SettingsHashMenu.lua +++ b/HadesSpeedrunningModpack/SettingsHashMenu.lua @@ -48,7 +48,8 @@ HSMConfigMenu.NonRulesetSettings = { {Key = "RtaTimer.config.DisplayTimer", Values = {false, true}, Default = false}, {Key = "RtaTimer.config.MultiWeapon", Values = {false, true}, Default = false}, - + {Key = "SplitDisplay.config.Enabled", Values = {false, true}, Default = false}, + {Key = "SplitDisplay.config.ShowSegments", Values = {false, true}, Default = false}, {Key = "EmoteMod.config.Enabled", Values = {false, true}, Default = false}, } diff --git a/SplitDisplay b/SplitDisplay new file mode 160000 index 0000000..879f4fc --- /dev/null +++ b/SplitDisplay @@ -0,0 +1 @@ +Subproject commit 879f4fc66336de59eb1a2ef2dba5982a0302aaaa