mirror of
https://github.com/Dadido3/noita-mapcap.git
synced 2024-11-18 17:17:31 +00:00
Add mod setting to hide UI
This commit is contained in:
parent
62142101fc
commit
014cba54af
@ -99,7 +99,7 @@ function Check:Regular(interval)
|
||||
end
|
||||
|
||||
-- Request a restart if the user has changed specific mod settings.
|
||||
local restartModSettings = {"disable-background", "disable-physics", "disable-postfx"}
|
||||
local restartModSettings = {"disable-background", "disable-ui", "disable-physics", "disable-postfx"}
|
||||
for i, v in ipairs(restartModSettings) do
|
||||
local settingID = "noita-mapcap." .. v
|
||||
if ModSettingGetNextValue(settingID) ~= ModSettingGet(settingID) then
|
||||
|
@ -231,6 +231,17 @@ function Modification.RequiredChanges()
|
||||
memory["mTrailerMode"] = 1 -- Is necessary for chunks to correctly load when DEBUG_PAUSE_GRID_UPDATE is enabled.
|
||||
end
|
||||
|
||||
-- Disables or hides most of the UI.
|
||||
-- The game is still somewhat playable this way.
|
||||
if ModSettingGet("noita-mapcap.disable-ui") then
|
||||
magic["INVENTORY_GUI_ALWAYS_VISIBLE"] = "0"
|
||||
magic["UI_BARS2_OFFSET_X"] = "100"
|
||||
else
|
||||
-- Reset to default.
|
||||
magic["INVENTORY_GUI_ALWAYS_VISIBLE"] = "1"
|
||||
magic["UI_BARS2_OFFSET_X"] = "-40"
|
||||
end
|
||||
|
||||
return config, magic, memory, patches
|
||||
end
|
||||
|
||||
|
@ -277,6 +277,13 @@ modSettings = {
|
||||
value_default = DebugAPI.IsDevBuild(), -- Defaults to true in dev build, false in regular Noita.
|
||||
scope = MOD_SETTING_SCOPE_RUNTIME_RESTART,
|
||||
},
|
||||
{
|
||||
id = "disable-ui",
|
||||
ui_name = " Disable UI",
|
||||
ui_description = "Hides and disables some of the UI.",
|
||||
value_default = false,
|
||||
scope = MOD_SETTING_SCOPE_RUNTIME_RESTART,
|
||||
},
|
||||
{
|
||||
id = "disable-physics",
|
||||
ui_name = " Disable pixel and entity physics",
|
||||
|
Loading…
Reference in New Issue
Block a user