Created ESCGame class to force game.tscn scene to have empty functions by inheritance.
Also continued some tests about tooltip following mouse. Fixed project settings wrongly set.
This commit is contained in:
10
game/ui/ui_mouse_icons/tooltip/target_tooltip.gd
Normal file
10
game/ui/ui_mouse_icons/tooltip/target_tooltip.gd
Normal file
@@ -0,0 +1,10 @@
|
||||
extends RichTextLabel
|
||||
|
||||
var current_target : String
|
||||
|
||||
func set_target(target : String) -> void:
|
||||
current_target = target
|
||||
update_tooltip_text()
|
||||
|
||||
func update_tooltip_text():
|
||||
bbcode_text = current_target
|
||||
28
game/ui/ui_mouse_icons/tooltip/target_tooltip.tscn
Normal file
28
game/ui/ui_mouse_icons/tooltip/target_tooltip.tscn
Normal file
@@ -0,0 +1,28 @@
|
||||
[gd_scene load_steps=5 format=2]
|
||||
|
||||
[ext_resource path="res://addons/escoria-core/game/assets/fonts/onesize/ONESIZE_.TTF" type="DynamicFontData" id=1]
|
||||
[ext_resource path="res://game/ui/ui_mouse_icons/tooltip/target_tooltip.gd" type="Script" id=2]
|
||||
|
||||
[sub_resource type="DynamicFont" id=1]
|
||||
size = 30
|
||||
font_data = ExtResource( 1 )
|
||||
|
||||
[sub_resource type="DynamicFont" id=2]
|
||||
size = 30
|
||||
font_data = ExtResource( 1 )
|
||||
|
||||
[node name="tooltip" type="RichTextLabel"]
|
||||
anchor_right = 0.7
|
||||
anchor_bottom = 0.06
|
||||
margin_left = 1.49829
|
||||
margin_right = 1.21826
|
||||
margin_bottom = -10.0
|
||||
custom_fonts/mono_font = SubResource( 1 )
|
||||
custom_fonts/normal_font = SubResource( 2 )
|
||||
bbcode_enabled = true
|
||||
bbcode_text = "[center][/center]"
|
||||
scroll_active = false
|
||||
script = ExtResource( 2 )
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
Reference in New Issue
Block a user