UI: Erklärtexte raus, Kontrast-Fix (Theme-Farben), größere Bibliothek-Kacheln

This commit is contained in:
slyphax 2026-10-25 10:31:37 +01:00
parent 3d083648d8
commit 3094395444
16 changed files with 30 additions and 45 deletions

View file

@ -119,8 +119,8 @@ const KAT_GROUPS := {
}
## Anzeige-Größe der Vorschaubilder im Browser (Karte t_59fc0f21): vorher 40 px,
## jetzt Kacheln mit 96 px (128-px-PNGs werden auf die Anzeige-Größe skaliert).
const THUMB_DISPLAY_PX := 96
## jetzt Kacheln mit 128 px (25.10.: größer, deutlicher) (128-px-PNGs werden auf die Anzeige-Größe skaliert).
const THUMB_DISPLAY_PX := 128
static func object_label(oid: String) -> String:

View file

@ -59,7 +59,6 @@ func panel_title() -> String:
## Klapp-Gruppen-Körper („Alle") + Zuletzt-benutzt-Ansicht.
func build() -> void:
add_child(_header_label("Objekt-Bibliothek"))
add_child(_muted_label("Klick = auswählen, Doppelklick = Werkzeug starten. Ohne GLB wird der Platzhalter gesetzt und die Kachel markiert (Rechte Maustaste = Flug)."))
# Suche (t_59fc0f21): tippen filtert live nach Name/ID — Gruppen mit
# Treffern klappen auf, leere Gruppen verschwinden. Größe ist von
@ -102,7 +101,7 @@ func build() -> void:
var scroll := ScrollContainer.new()
scroll.size_flags_vertical = Control.SIZE_EXPAND_FILL
scroll.custom_minimum_size = UIScale.v2(0, 280)
scroll.custom_minimum_size = UIScale.v2(0, 320)
scroll.horizontal_scroll_mode = ScrollContainer.SCROLL_MODE_DISABLED
add_child(scroll)
library_box = VBoxContainer.new()
@ -270,7 +269,7 @@ func _on_panel_resized() -> void:
func _apply_grid_columns(width: float) -> void:
var cols := clampi(int(width / float(UIScale.px(180))), 1, 12)
var cols := clampi(int(width / float(UIScale.px(200))), 1, 12)
for row in _library_group_rows:
((row["grid"] as GridContainer)).columns = cols
if _recent_grid != null:
@ -471,7 +470,7 @@ func _build_tile(oid: String) -> Button:
btn.toggle_mode = true
btn.button_pressed = false
btn.size_flags_horizontal = Control.SIZE_EXPAND_FILL
btn.custom_minimum_size = UIScale.v2(0, 126)
btn.custom_minimum_size = UIScale.v2(0, 188)
btn.tooltip_text = "%s · %d Polys · %s" % [name_txt, poly, oid]
if missing:
btn.tooltip_text += " · MODELL FEHLT (Platzhalter-Kiste)"
@ -523,7 +522,6 @@ func _build_tile(oid: String) -> Button:
tile.add_child(id_lbl)
var lbl := Label.new()
lbl.text = name_txt
lbl.add_theme_font_size_override("font_size", UIScale.small_font_size())
lbl.horizontal_alignment = HORIZONTAL_ALIGNMENT_CENTER
lbl.clip_text = true
lbl.text_overrun_behavior = TextServer.OVERRUN_TRIM_ELLIPSIS

View file

@ -33,7 +33,6 @@ func build() -> void:
spawn_status.autowrap_mode = TextServer.AUTOWRAP_WORD_SMART
spawn_status.custom_minimum_size = UIScale.v2(0, 44)
add_child(spawn_status)
add_child(_muted_label("Der Check sagt VOR dem Export, was der Server-Loader verlangen wird (mindestens 4 Zonen pro Team, bekannte Objekt-IDs)."))
# --- Spawn-Zonen-Werkzeug: großer Button + Bedien-Panel ---
spawn_edit_btn = Button.new()
@ -82,9 +81,6 @@ func build() -> void:
spawn_delete_btn.pressed.connect(_on_spawn_delete_pressed)
spawn_panel.add_child(spawn_delete_btn)
spawn_panel.add_child(_muted_label(
"Klick setzt eine Zone, Klick+Ziehen verschiebt sie. Jede Zone ist "
+ "EIN Rückgängig-Schritt (Strg+Z). ESC beendet das Spawn-Werkzeug."))
func _spawn_team_button(text: String, group: ButtonGroup, team: int) -> Button:

View file

@ -31,6 +31,11 @@ func panel_title() -> String:
## sich vom angeschlossenen Theme-Baum (main hängt theme auf das Fenster).
func theme_color(cname: String) -> Color:
# Befund 25.10. („Texte kaum lesbar“): Panels werden gebaut, BEVOR sie im
# Baum hängen — get_theme_color liefert dort Schwarz statt der Theme-Farbe.
# Darum direkt aus dem Theme des Hauptfensters lesen.
if main != null and main.theme != null and main.theme.has_color(cname, "Editor"):
return main.theme.get_color(cname, "Editor")
return get_theme_color(cname, "Editor")

View file

@ -86,8 +86,6 @@ func build() -> void:
prop_water.tooltip_text = "Wasser: ganz links = kein Wasser, sonst Höhe der Wasseroberfläche über dem Terrain. Senken unter dieser Höhe füllen sich mit Wasser."
prop_water.set_meta("kein_wasser_value", KEIN_WASSER_WERT)
add_child(prop_water)
var wasser_hinweis := _muted_label("Senken unter der Wasserhöhe füllen sich automatisch. Wasser betreten = knietief, träge (kein Schwimmen).")
add_child(wasser_hinweis)
add_child(_separator())
add_child(_header_label("Terrain"))

View file

@ -31,4 +31,3 @@ func build() -> void:
grid_check.tooltip_text = "Neue und verschobene Objekte rasten auf ein 1-Meter-Raster ein"
grid_check.toggled.connect(func(pressed: bool) -> void: main.call("_on_grid_snap_changed", pressed))
add_child(grid_check)
add_child(_muted_label("Raster-Snap rastet Platzieren und Ziehen auf ganze Meter."))

View file

@ -58,7 +58,6 @@ func build() -> void:
_confirm_delete.cancel_button_text = "Abbrechen"
_confirm_delete.confirmed.connect(_on_delete_confirmed)
add_child(_confirm_delete)
add_child(_muted_label("Rechtsklick: Gruppieren / Auflösen / Umbenennen / Löschen. Objektzeile in eine Gruppe ziehen = aufnehmen, auf „Objekte“ zurückziehen = herauslösen."))
add_child(_separator())

View file

@ -100,7 +100,6 @@ func build() -> void:
sel_ungroup_btn.tooltip_text = "Die Gruppe der Auswahl wieder auflösen (Strg+Umschalt+G) — Objekte bleiben, nur die Bindung löst sich"
sel_ungroup_btn.pressed.connect(func() -> void: main.interaction.ungroup_selection())
group_btns.add_child(sel_ungroup_btn)
add_child(_muted_label("Mehrfachauswahl: Umschalt+Klick oder Rahmen aufziehen. Eine Gruppe wandert und dreht gemeinsam — auch nach Speichern/Laden."))
# --- Gizmo-Einstellungen (Karte t_e0120dc2): Schrittweite der Achsen-
# Züge. Das Mausrad WÄHREND eines Gizmo-Zugs blättert durch die

View file

@ -46,7 +46,6 @@ func build() -> void:
add_child(perspektive_box)
add_child(_separator())
add_child(_muted_label("Gilt im Lauf-Modus („▶ Karte testen“). Standard 1,0 — jede PC-/Maus-Kombination ist anders. Wird automatisch gespeichert."))
func _on_sens_changed(value: float) -> void:

View file

@ -26,7 +26,7 @@ func build() -> void:
tool_label = Label.new()
# U7: Werkzeug-Farbe über Theme (Editor/colors/accent).
tool_label.add_theme_color_override("font_color",
get_theme_color("accent", "Editor"))
theme_color("accent"))
# Karte t_297221b5: Statuszeilen-Labels egalisiert (min-size-Druck bei 1.5×)
tool_label.clip_text = true
tool_label.text_overrun_behavior = TextServer.OVERRUN_TRIM_ELLIPSIS
@ -37,7 +37,7 @@ func build() -> void:
sym_label = Label.new()
# U7: Symmetrie-Farbe über Theme (Editor/colors/accent).
sym_label.add_theme_color_override("font_color",
get_theme_color("accent", "Editor"))
theme_color("accent"))
sym_label.clip_text = true
sym_label.text_overrun_behavior = TextServer.OVERRUN_TRIM_ELLIPSIS
add_child(sym_label)
@ -45,7 +45,7 @@ func build() -> void:
stats_objects = Label.new()
# U7: Nebentext-Farbe über Theme (Editor/colors/field).
stats_objects.add_theme_color_override("font_color",
get_theme_color("field", "Editor"))
theme_color("field"))
stats_objects.clip_text = true
stats_objects.text_overrun_behavior = TextServer.OVERRUN_TRIM_ELLIPSIS
add_child(stats_objects)
@ -54,7 +54,7 @@ func build() -> void:
stats_terrain = Label.new()
# U7: Nebentext-Farbe über Theme (Editor/colors/field).
stats_terrain.add_theme_color_override("font_color",
get_theme_color("field", "Editor"))
theme_color("field"))
stats_terrain.clip_text = true
stats_terrain.text_overrun_behavior = TextServer.OVERRUN_TRIM_ELLIPSIS
add_child(stats_terrain)

View file

@ -38,11 +38,7 @@ func panel_title() -> String:
func build() -> void:
add_child(_header_label("Symmetrie"))
add_child(_muted_label(
"Macht die GANZE Karte mit einem Klick symmetrisch: Objekte, "
+ "Bau-Teile, Spawn-Punkte und Boden (Höhen + Material) werden "
+ "von der Quell-Hälfte auf die andere Seite ERGÄNZT. Es wird "
+ "nichts gelöscht — Widersprüche werden vorher gemeldet."))
add_child(_muted_label("Macht die ganze Karte symmetrisch: ergänzt die andere Seite, löscht nichts."))
mode_label = _field_label(_mode_text())
add_child(mode_label)
@ -75,10 +71,6 @@ func build() -> void:
report_label.custom_minimum_size = UIScale.v2(0, 96)
add_child(report_label)
add_child(_muted_label(
"Der Modus steht oben in der Leiste (Punkt/Achse X/Achse Z). "
+ "Paare, die schon passen, werden mit Spiegel-Kennungen "
+ "verkoppelt — auch bei alten Karten ohne diese Kennungen."))
conflict_dialog = ConfirmationDialog.new()
conflict_dialog.title = "Widersprüche — welche Seite gewinnt?"

View file

@ -39,7 +39,7 @@ func build() -> void:
add_child(_separator())
info_hint = Label.new()
info_hint.autowrap_mode = TextServer.AUTOWRAP_WORD_SMART
info_hint.text = "In der Leiste „🎯 Test-Start“ drücken (oder Taste T), dann in die Karte klicken. Die Höhe kommt automatisch vom Terrain. Der Punkt liegt in einer Nebendatei zur .svmap — die Kartendatei selbst bleibt unverändert."
info_hint.text = "Leiste „🎯 Test-Start“ oder Taste T, dann in die Karte klicken."
add_child(info_hint)
# main holt sich das Modul hier ab (main._refresh_test_start_panel) — die

View file

@ -193,7 +193,7 @@ func build() -> void:
file_label.text = ""
# U7: Farbe über Theme (Editor/colors/title) statt modulate-Wert im Code.
file_label.add_theme_color_override("font_color",
get_theme_color("title", "Editor"))
main.theme.get_color("title", "Editor"))
# Karte t_297221b5: Map-Pfad darf bei großer Stufe egalisiert werden
# (Voller Name im Tooltip, sonst drückt die Zeile die Top-Bar aus dem Fenster).
# Expand: bekommt zusammen mit dem Spacer seinen Anteil, egalisiert mit "…".

View file

@ -141,8 +141,8 @@ func _test_tiles() -> void:
_check(tr.custom_minimum_size.x >= 64, "Thumbnail-Zielgröße ≥ 64 px (ist %d)"
% int(tr.custom_minimum_size.x))
_check(tr.size.x >= 64, "Thumbnail rendert ≥ 64 px breit (ist %.0f)" % tr.size.x)
_check(tr.texture != null and tr.texture.get_width() == 96,
"Textur auf 96 px skaliert")
_check(tr.texture != null and tr.texture.get_width() == 128,
"Textur auf 128 px skaliert")
if lbl != null:
_check(lbl.text == "Wachturm", "deutscher Name unter dem Bild (%s)" % lbl.text)
_check(tile_btn.size.y >= 100, "Kachel hoch genug (%.0f px)" % tile_btn.size.y)

View file

@ -93,7 +93,7 @@ func _test_math() -> void:
_check(v.x == 175 and v.y == 50, "Mittel: v2(140,40) → (175,50)")
UIScale.set_step_index(2)
_check(UIScale.px(40) == 60 and UIScale.font_size() == 24, "Groß: 40 px → 60 px, Schrift 24")
_check(UIScale.px(96) == 144, "Groß: Thumbnail 96 → 144")
_check(UIScale.px(96) == 144, "Groß: Thumbnail 96 → 144 (px-Rechnung)")
func _test_cfg_roundtrip() -> void:
@ -142,10 +142,10 @@ func _test_real_ui_scaling() -> void:
_check(int(main.theme.default_font_size) == 20, "Mittel: Theme-Schrift 20 (sofort wirksam)")
_check(main.undo_btn.custom_minimum_size == Vector2(175, 50), "Mittel: Undo-Knopf 175×50")
_check(main.library_search.custom_minimum_size.y == 45, "Mittel: Suchfeld 36 → 45")
var tile := _find_tile_button(158)
_check(tile != null and tile.custom_minimum_size.y == 158, "Mittel: Bibliotheks-Kachel 126 → 158")
var thumb := _find_thumb_rect(120)
_check(thumb != null and thumb.custom_minimum_size.x == 120, "Mittel: Thumbnail 96 → 120")
var tile := _find_tile_button(235)
_check(tile != null and tile.custom_minimum_size.y == 235, "Mittel: Bibliotheks-Kachel 188 → 235")
var thumb := _find_thumb_rect(160)
_check(thumb != null and thumb.custom_minimum_size.x == 160, "Mittel: Thumbnail 128 → 160")
_check(main.size_menu.get_popup().is_item_checked(1), "Menü-Häkchen wandert auf Mittel (neues Popup)")
# Groß:

View file

@ -222,9 +222,9 @@ default_font_size = 16
Editor/colors/accent = Color(0.55, 0.8, 1, 1)
Editor/colors/status_ok = Color(0.75, 0.95, 0.75, 1)
Editor/colors/status_error = Color(1, 0.6, 0.5, 1)
Editor/colors/muted = Color(1, 1, 1, 0.55)
Editor/colors/field = Color(1, 1, 1, 0.7)
Editor/colors/title = Color(1, 1, 1, 0.6)
Editor/colors/muted = Color(1, 1, 1, 0.74)
Editor/colors/field = Color(1, 1, 1, 0.9)
Editor/colors/title = Color(1, 1, 1, 0.82)
Editor/colors/warning = Color(1, 0.62, 0.3, 1)
Editor/colors/badge_outline = Color(0, 0, 0, 1)
Editor/colors/help_bg = Color(0.09, 0.11, 0.13, 0.97)
@ -246,7 +246,7 @@ TabContainer/styles/tab_hovered = SubResource("tab_hover")
TabContainer/styles/tab_unselected = SubResource("tab_unsel")
TabContainer/styles/tabbar_background = SubResource("tabbar")
TabContainer/colors/font_selected_color = Color(1, 1, 1, 1)
TabContainer/colors/font_unselected_color = Color(1, 1, 1, 0.7)
TabContainer/colors/font_unselected_color = Color(1, 1, 1, 0.88)
Button/styles/normal = SubResource("btn_normal")
Button/styles/hover = SubResource("btn_hover")
Button/styles/pressed = SubResource("btn_pressed")
@ -254,11 +254,11 @@ Button/styles/disabled = SubResource("btn_disabled")
Button/styles/focus = SubResource("btn_focus")
Button/colors/font_hover_color = Color(1, 1, 1, 1)
Button/colors/font_pressed_color = Color(0.8, 0.9, 1, 1)
Button/colors/font_disabled_color = Color(1, 1, 1, 0.35)
Button/colors/font_disabled_color = Color(1, 1, 1, 0.5)
LineEdit/styles/normal = SubResource("line_normal")
LineEdit/styles/focus = SubResource("line_focus")
LineEdit/colors/font_color = Color(1, 1, 1, 1)
LineEdit/colors/font_placeholder_color = Color(1, 1, 1, 0.4)
LineEdit/colors/font_placeholder_color = Color(1, 1, 1, 0.58)
HSplitContainer/styles/grabber_area = SubResource("split_grab")
HSplitContainer/styles/grabber_area_highlight = SubResource("split_grab_hover")
VSplitContainer/styles/grabber_area = SubResource("split_grab")