diff --git a/Prefabs/NotificationLabel.tscn b/Prefabs/NotificationLabel.tscn index 1ae8b2a38..590d42aff 100644 --- a/Prefabs/NotificationLabel.tscn +++ b/Prefabs/NotificationLabel.tscn @@ -1,20 +1,16 @@ -[gd_scene load_steps=3 format=2] +[gd_scene load_steps=2 format=2] -[ext_resource path="res://Themes & Styles/Godot's Theme/Godot's Theme.tres" type="Theme" id=1] [ext_resource path="res://Scripts/NotificationLabel.gd" type="Script" id=2] - - - - - [node name="NotificationLabel" type="Label"] margin_right = 116.0 margin_bottom = 14.0 -theme = ExtResource( 1 ) custom_colors/font_color_shadow = Color( 0, 0, 0, 1 ) text = "Undo: Notification" script = ExtResource( 2 ) +__meta__ = { +"_edit_use_anchors_": false +} [node name="Tween" type="Tween" parent="."] diff --git a/Scripts/Global.gd b/Scripts/Global.gd index 3d76cb27d..84078e295 100644 --- a/Scripts/Global.gd +++ b/Scripts/Global.gd @@ -386,6 +386,7 @@ func notification_label(text : String) -> void: var notification : Label = load("res://Prefabs/NotificationLabel.tscn").instance() notification.text = tr(text) notification.rect_position = Vector2(240, OS.window_size.y - 150) + notification.theme = control.theme get_tree().get_root().add_child(notification) func undo(_canvases : Array, layer_index : int = -1) -> void: diff --git a/Themes & Styles/Godot's Theme/Godot's Theme.tres b/Themes & Styles/Godot's Theme/Godot's Theme.tres index 7302ff06b..55c3f8d3d 100644 --- a/Themes & Styles/Godot's Theme/Godot's Theme.tres +++ b/Themes & Styles/Godot's Theme/Godot's Theme.tres @@ -1,15 +1,6 @@ -[gd_resource type="Theme" load_steps=3 format=2] - -[ext_resource path="res://Assets/Fonts/Roboto-Regular.ttf" type="DynamicFontData" id=1] - -[sub_resource type="DynamicFont" id=1] -size = 12 -use_mipmaps = true -use_filter = true -font_data = ExtResource( 1 ) +[gd_resource type="Theme" format=2] [resource] -default_font = SubResource( 1 ) Button/colors/font_color = Color( 0.878431, 0.878431, 0.878431, 1 ) Button/colors/font_color_disabled = Color( 0.9, 0.9, 0.9, 0.2 ) Button/colors/font_color_hover = Color( 0.941176, 0.941176, 0.941176, 1 )