Files
mortal-maze-the-game/ui/hud/player_health_hud.tscn

132 lines
3.3 KiB
Plaintext

[gd_scene load_steps=8 format=3]
[ext_resource type="Script" path="res://ui/hud/player_health_hud.gd" id="1_hud"]
[ext_resource type="Script" path="res://ui/editor_ui_visibility.gd" id="editor_ui_visibility"]
[ext_resource type="Script" path="res://ui/hud/thrash_meter.gd" id="meter"]
[ext_resource type="Theme" path="res://ui/hud/thrash_hud_theme.tres" id="theme"]
[ext_resource type="Texture2D" path="res://assets/ashen/ui/hud_frame.png" id="frame"]
[sub_resource type="Shader" id="PortraitMask"]
code = "shader_type canvas_item;
render_mode unshaded;
varying vec2 portrait_uv;
void vertex() {
portrait_uv = VERTEX / vec2(78.0,78.0);
}
void fragment() {
vec2 p = portrait_uv * 2.0 - 1.0;
if (dot(p,p) > 1.0) discard;
vec4 source = texture(TEXTURE, UV);
COLOR = vec4(mix(vec3(0.045,0.036,0.039), source.rgb, source.a), 1.0);
}
"
[sub_resource type="ShaderMaterial" id="PortraitMaterial"]
shader = SubResource("PortraitMask")
[node name="PlayerHealthHUD" type="CanvasLayer"]
layer = 90
script = ExtResource("1_hud")
[node name="EditorVisibility" type="Node" parent="."]
script = ExtResource("editor_ui_visibility")
[node name="HUD" type="Control" parent="."]
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
mouse_filter = 2
theme = ExtResource("theme")
[node name="Emblem" type="TextureRect" parent="HUD"]
material = SubResource("PortraitMaterial")
layout_mode = 0
offset_left = 43.0
offset_top = 44.0
offset_right = 121.0
offset_bottom = 122.0
mouse_filter = 2
texture_filter = 1
expand_mode = 1
stretch_mode = 0
[node name="HealthBar" type="ProgressBar" parent="HUD"]
layout_mode = 0
offset_left = 137.0
offset_top = 68.0
offset_right = 409.0
offset_bottom = 88.0
mouse_filter = 2
max_value = 30.0
value = 30.0
show_percentage = false
script = ExtResource("meter")
fill_color = Color(0.62, 0.09, 0.16, 1)
segment_count = 12
[node name="HealthLabel" type="Label" parent="HUD/HealthBar"]
layout_mode = 0
offset_left = 162.0
offset_top = -32.0
offset_right = 266.0
offset_bottom = -10.0
mouse_filter = 2
theme_override_font_sizes/font_size = 16
text = "30 / 30"
horizontal_alignment = 2
vertical_alignment = 1
[node name="Frame" type="TextureRect" parent="HUD"]
layout_mode = 0
offset_left = 18.0
offset_top = 16.0
offset_right = 450.0
offset_bottom = 160.0
mouse_filter = 2
texture_filter = 1
texture = ExtResource("frame")
expand_mode = 1
[node name="Title" type="Label" parent="HUD"]
layout_mode = 0
offset_left = 139.0
offset_top = 36.0
offset_right = 221.0
offset_bottom = 54.0
mouse_filter = 2
theme_override_font_sizes/font_size = 16
text = "VIDA"
horizontal_alignment = 1
vertical_alignment = 1
[node name="WarningLabel" type="Label" parent="HUD"]
visible = false
layout_mode = 0
offset_left = 249.0
offset_top = 38.0
offset_right = 313.0
offset_bottom = 54.0
mouse_filter = 2
theme_override_colors/font_color = Color(0.98, 0.44, 0.36, 1)
theme_override_font_sizes/font_size = 8
text = "PELIGRO"
horizontal_alignment = 1
vertical_alignment = 1
[node name="EffectsLabel" type="Label" parent="HUD"]
visible = false
layout_mode = 0
offset_left = 34.0
offset_top = 169.0
offset_right = 420.0
offset_bottom = 281.0
mouse_filter = 2
theme_override_colors/font_color = Color(0.79, 0.72, 0.57, 1)
theme_override_font_sizes/font_size = 16
text = ""
horizontal_alignment = 0
vertical_alignment = 0