Fix build stamp visibility, add create world UI, and add Save as New World to editor
checkpoint / checkpoint (push) Successful in 5m54s
checkpoint / checkpoint (push) Successful in 5m54s
This commit is contained in:
+13
-12
@@ -224,21 +224,22 @@ func _show_build_stamp() -> void:
|
||||
add_child(layer)
|
||||
var lbl := Label.new()
|
||||
lbl.text = "build %s" % _build_label()
|
||||
lbl.add_theme_color_override("font_color", Color(1, 1, 0.35, 0.85))
|
||||
lbl.add_theme_color_override("font_outline_color", Color(0, 0, 0, 1))
|
||||
lbl.add_theme_constant_override("outline_size", 4)
|
||||
lbl.add_theme_font_size_override("font_size", 14)
|
||||
# Pinned to the BOTTOM-right so it never blocks top menu or editor toolbars.
|
||||
lbl.set_anchors_preset(Control.PRESET_BOTTOM_WIDE)
|
||||
lbl.horizontal_alignment = HORIZONTAL_ALIGNMENT_RIGHT
|
||||
lbl.vertical_alignment = VERTICAL_ALIGNMENT_BOTTOM
|
||||
lbl.offset_left = 12
|
||||
lbl.offset_right = -16
|
||||
lbl.offset_top = -32
|
||||
lbl.offset_bottom = -8
|
||||
lbl.add_theme_color_override("font_color", Color(1, 1, 0.35, 1.0))
|
||||
lbl.add_theme_color_override("font_outline_color", Color(0, 0, 0, 1.0))
|
||||
lbl.add_theme_constant_override("outline_size", 6)
|
||||
lbl.add_theme_font_size_override("font_size", 18)
|
||||
lbl.mouse_filter = Control.MOUSE_FILTER_IGNORE
|
||||
layer.add_child(lbl)
|
||||
|
||||
var reposition := func() -> void:
|
||||
if is_instance_valid(lbl) and is_inside_tree():
|
||||
var vp := get_viewport().get_visible_rect().size
|
||||
lbl.position = Vector2(20, vp.y - 40)
|
||||
lbl.size = Vector2(vp.x - 40, 32)
|
||||
reposition.call()
|
||||
get_viewport().size_changed.connect(reposition)
|
||||
|
||||
|
||||
|
||||
func _exit_tree() -> void:
|
||||
# Backstop for any exit path that didn't go through _leave_world (e.g. the
|
||||
|
||||
Reference in New Issue
Block a user