saumwacht-godot/scripts/luneraria/ui/lune_settings.gd
Martin Stickelbroeck 8b17563814 G1: Drei-Lane-Layout mit Höhenfeld, Grotte, Aufmarschbereichen und MOBA-Kamera
Top windet sich über das Hochland, Mid quert die Kluft über die Mittelplattform,
Bottom führt durch das Tiefland über die Deltabrücke; Top und Bottom sind exakt
gleich lang, alles bleibt spiegelsymmetrisch. LuneTerrain liefert ein exakt
gespiegeltes Höhenfeld, auf dem Figuren stehen. Bossgrotte als Terrasse auf der
Achse zwischen Top und Mid, Aufmarschbereiche je Lane, perspektivische Kamera
mit Sprungtasten (F2–F4, B, G, H, O, R, Q/E). Bestandsassets wiederverwendet,
neue Formen als Blockout für G2/G4.

Geprüft: verify_g1 443/443, Regeln 91/91, M2 73/73, verify_m1 38/38,
verify_m2 14/14, Netz 43/43, Loopback 12/12, Balance 40 Partien (Seitentausch
20/20), Legacy 209/463. Vorher/Nachher-Aufnahmen und Messungen in G1-KARTE.md.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-29 00:09:48 +02:00

68 lines
2.9 KiB
GDScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

class_name LuneSettings
extends ColorRect
## Options and controls for Champions of Luneraria; the same Preferences as before.
signal closed
var _volume: HSlider
var _checks: Dictionary = {}
func _ready() -> void:
theme = SaumwachtTheme.shared()
color = Color(.02, .03, .04, .9)
set_anchors_and_offsets_preset(Control.PRESET_FULL_RECT)
mouse_filter = Control.MOUSE_FILTER_STOP
var center := CenterContainer.new()
center.set_anchors_and_offsets_preset(Control.PRESET_FULL_RECT)
add_child(center)
var panel := PanelContainer.new()
panel.theme_type_variation = "MenuPanel"
panel.custom_minimum_size.x = 760
center.add_child(panel)
var column := VBoxContainer.new()
column.add_theme_constant_override("separation", 12)
panel.add_child(column)
var heading := _label("Optionen & Steuerung", "HeadingLabel", column)
heading.horizontal_alignment = HORIZONTAL_ALIGNMENT_CENTER
_label("Ein laufender Kampf pausiert, solange dieses Fenster geöffnet ist.", "MutedLabel", column).horizontal_alignment = HORIZONTAL_ALIGNMENT_CENTER
_label("LAUTSTÄRKE", "SectionLabel", column)
_volume = HSlider.new()
_volume.max_value = 100
_volume.custom_minimum_size.y = 28
column.add_child(_volume)
_volume.value_changed.connect(func(value: float) -> void:
Preferences.volume = value / 100.0
Preferences.commit())
var grid := GridContainer.new()
grid.columns = 2
grid.add_theme_constant_override("h_separation", 28)
column.add_child(grid)
for entry: Array in [["muted", "Ton stumm [M]"], ["fullscreen", "Vollbild [F11]"], ["reduced_motion", "Bewegung reduzieren"]]:
var check := CheckButton.new()
check.text = entry[1]
grid.add_child(check)
var key: String = entry[0]
check.toggled.connect(func(value: bool) -> void:
Preferences.set(key, value)
Preferences.commit())
_checks[key] = check
column.add_child(HSeparator.new())
_label("STEUERUNG", "SectionLabel", column)
_label("Planung: 1–5 Truppe kaufen · Lane-Knöpfe T/M/B teilen ein · Leertaste Bereit\nKampf: Leertaste oder P Pause · Tempo 1×/2×/4× · Kämpfe laufen automatisch\nKamera: WASD / Pfeile / mittlere Maustaste · Mausrad Zoom · Q/E drehen · R zurücksetzen\nSprünge: F2 Top · F3 Mid · F4 Bottom · Tab nächste Lane · B eigene Basis · G Bossgrotte · H Held · O Übersicht\nMinimap anklicken springt dorthin · F1 Optionen · M Ton · F11 Vollbild", "Label", column)
var back := Button.new()
back.text = "ZURÜCK [Esc]"
back.theme_type_variation = "PrimaryButton"
back.pressed.connect(func() -> void: closed.emit())
column.add_child(back)
func _label(text_value: String, variation: String, parent: Node) -> Label:
var label := Label.new()
label.text = text_value
label.theme_type_variation = variation
parent.add_child(label)
return label
func sync() -> void:
_volume.set_value_no_signal(Preferences.volume * 100.0)
for key: String in _checks:
(_checks[key] as CheckButton).set_pressed_no_signal(bool(Preferences.get(key)))