update
This commit is contained in:
@@ -32,7 +32,8 @@ func build(x: float, y: float, w: float, h: float) -> void:
|
||||
traits_box = VBoxContainer.new()
|
||||
info_box = VBoxContainer.new()
|
||||
log_box = VBoxContainer.new()
|
||||
for b in [traits_box, info_box, log_box]:
|
||||
# Die gewählte Einheit zuerst: dort sitzt der Aufwerten-Knopf, der muss ohne Scrollen erreichbar sein.
|
||||
for b in [info_box, traits_box, log_box]:
|
||||
b.add_theme_constant_override("separation", 3)
|
||||
b.size_flags_horizontal = Control.SIZE_EXPAND_FILL
|
||||
col.add_child(b)
|
||||
@@ -76,11 +77,17 @@ func _refresh_traits(game: Game) -> void:
|
||||
dot.color = col if tier > 0 else col.darkened(0.55)
|
||||
dot.custom_minimum_size = Vector2(12, 12)
|
||||
row.add_child(dot)
|
||||
var tr: Dictionary = Data.ELEMENT_TRAITS[e]
|
||||
var txt := " %s %d" % [Data.ELEMENT_NAMES[e], c]
|
||||
if tier > 0:
|
||||
txt += " - " + Data.ELEMENT_TRAITS[e]["desc"][tier - 1]
|
||||
txt += " - " + tr["desc"][tier - 1]
|
||||
else:
|
||||
txt += " (ab 2 aktiv)"
|
||||
# Ausblick: was die nächste Stufe bringt.
|
||||
if tier < tr["steps"].size():
|
||||
txt += "\n nächste Stufe bei %d: %s" % [tr["steps"][tier], tr["desc"][tier]]
|
||||
else:
|
||||
txt += "\n höchste Stufe"
|
||||
var el := UiKit.label(txt, 13, Color(0.9, 0.9, 0.95) if tier > 0 else Color(0.55, 0.55, 0.6))
|
||||
el.autowrap_mode = TextServer.AUTOWRAP_WORD_SMART
|
||||
el.custom_minimum_size = Vector2(_text_w - 20.0, 0)
|
||||
@@ -114,6 +121,7 @@ func _refresh_info(game: Game, a: Avatar, hex: Vector2i) -> void:
|
||||
info_box.add_child(_wrapped("Leben %d Angriff %d Rüstung %d%%\nTempo %.2f Reichweite %d%s"
|
||||
% [int(s["hp"]), int(s["atk"]), int(s["armor"] * 100.0), s["aspd"], s["range"], crit], 12,
|
||||
Color(0.9, 0.9, 0.95)))
|
||||
info_box.add_child(_wrapped(a.counter_text(), 12, Color(1.0, 0.75, 0.9)))
|
||||
info_box.add_child(_wrapped(a.ability_text(), 12, Color(0.8, 0.85, 1.0)))
|
||||
if hex.x < 0:
|
||||
info_box.add_child(_wrapped("Zum Aufwerten aufs Feld ziehen.", 12, Color(0.85, 0.85, 0.9)))
|
||||
|
||||
Reference in New Issue
Block a user