UI and other changes
This commit is contained in:
parent
87b5c11fcf
commit
215e24e246
79 changed files with 70023 additions and 2201 deletions
|
|
@ -19,7 +19,7 @@ const BINDINGS := [
|
|||
["Aim", []],
|
||||
["Attack (main weapon)", ["fire"]],
|
||||
["Throw a pumpkin bomb (off-hand)", ["offhand"]],
|
||||
["Switch main weapon", ["weapon_1", "weapon_2", "weapon_next"]],
|
||||
["Switch main weapon", ["weapon_1", "weapon_2", "weapon_3", "weapon_4", "weapon_5", "weapon_6", "weapon_next"]],
|
||||
["Fear", ["fear"]],
|
||||
["Patch up (hold)", ["patch"]],
|
||||
["Gather / repair / workbench", ["interact"]],
|
||||
|
|
@ -27,6 +27,7 @@ const BINDINGS := [
|
|||
["Pick a buildable", ["build_1", "build_2", "build_3", "build_4", "build_next"]],
|
||||
["Rotate", ["rotate_left", "rotate_right"]],
|
||||
["Dismantle / leave build mode", ["cancel"]],
|
||||
["Pouch (what you carry, the shed's stock)", ["pouch"]],
|
||||
["Pause", ["pause"]],
|
||||
["Hide tips", ["hide_tips"]],
|
||||
["Microphone on / off (co-op)", ["toggle_mic"]],
|
||||
|
|
@ -87,7 +88,9 @@ func _ready() -> void:
|
|||
_head("Display")
|
||||
_check("fullscreen", "Fullscreen")
|
||||
_check("vsync", "VSync")
|
||||
_slider("pixel_size", "Pixel size", 1.0, GameSettings.MAX_PIXEL_SIZE, 1.0)
|
||||
_slider("resolution_scale", "3D resolution scale", 0.5, 1.0, 0.05)
|
||||
_note("Pixel size 1 turns the pixel look off; the resolution scale is used only then.")
|
||||
_head("Gameplay")
|
||||
_check("show_tips", "Tips on the first day and night")
|
||||
_head("Co-op")
|
||||
|
|
@ -106,7 +109,7 @@ func _ready() -> void:
|
|||
reset.custom_minimum_size = Vector2(280.0, 54.0)
|
||||
reset.pressed.connect(func() -> void:
|
||||
var fresh := GameSettings.new()
|
||||
for key in ["volume", "move_dead_zone", "aim_dead_zone", "fullscreen", "vsync", "resolution_scale", "show_tips"]:
|
||||
for key in ["volume", "move_dead_zone", "aim_dead_zone", "fullscreen", "vsync", "pixel_size", "resolution_scale", "show_tips"]:
|
||||
settings.set(key, fresh.get(key))
|
||||
_load()
|
||||
changed.emit())
|
||||
|
|
@ -196,14 +199,18 @@ func _apply_value(key: String, v: Variant) -> void:
|
|||
if key.begins_with("volume/"):
|
||||
settings.volume[key.trim_prefix("volume/")] = float(v)
|
||||
else:
|
||||
settings.set(key, v)
|
||||
settings.set(key, roundi(v) if key == "pixel_size" else v)
|
||||
if v is float:
|
||||
_show_value(key, v)
|
||||
changed.emit()
|
||||
|
||||
|
||||
func _show_value(key: String, v: float) -> void:
|
||||
if _values.has(key):
|
||||
if not _values.has(key):
|
||||
return
|
||||
if key == "pixel_size":
|
||||
(_values[key] as Label).text = "Off" if roundi(v) <= 1 else "%d×" % roundi(v)
|
||||
else:
|
||||
(_values[key] as Label).text = "%d%%" % roundi(v * 100.0)
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue