rework l'ui et équilibrage général
This commit is contained in:
@@ -30,10 +30,10 @@ process_mode = 3
|
||||
script = ExtResource("1_1pe2k")
|
||||
default_cursor = ExtResource("2_q4bvb")
|
||||
|
||||
[node name="CanvasLayer" type="CanvasLayer" parent="."]
|
||||
[node name="InspectorCanvasLayer" type="CanvasLayer" parent="."]
|
||||
layer = 128
|
||||
|
||||
[node name="Inspector" type="Control" parent="CanvasLayer"]
|
||||
[node name="Inspector" type="Control" parent="InspectorCanvasLayer"]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 3
|
||||
anchors_preset = 0
|
||||
@@ -41,7 +41,7 @@ offset_right = 40.0
|
||||
offset_bottom = 40.0
|
||||
mouse_filter = 2
|
||||
|
||||
[node name="Container" type="VBoxContainer" parent="CanvasLayer/Inspector"]
|
||||
[node name="Container" type="VBoxContainer" parent="InspectorCanvasLayer/Inspector"]
|
||||
layout_mode = 0
|
||||
offset_left = 28.0
|
||||
offset_right = 134.0
|
||||
@@ -50,25 +50,25 @@ size_flags_horizontal = 0
|
||||
size_flags_vertical = 0
|
||||
mouse_filter = 2
|
||||
|
||||
[node name="Action" type="HBoxContainer" parent="CanvasLayer/Inspector/Container"]
|
||||
[node name="Action" type="HBoxContainer" parent="InspectorCanvasLayer/Inspector/Container"]
|
||||
unique_name_in_owner = true
|
||||
custom_minimum_size = Vector2(0, 20)
|
||||
layout_mode = 2
|
||||
|
||||
[node name="MouseImage" type="TextureRect" parent="CanvasLayer/Inspector/Container/Action"]
|
||||
[node name="MouseImage" type="TextureRect" parent="InspectorCanvasLayer/Inspector/Container/Action"]
|
||||
layout_mode = 2
|
||||
texture = ExtResource("3_pshoq")
|
||||
expand_mode = 2
|
||||
stretch_mode = 5
|
||||
|
||||
[node name="ActionEnergyImage" type="TextureRect" parent="CanvasLayer/Inspector/Container/Action"]
|
||||
[node name="ActionEnergyImage" type="TextureRect" parent="InspectorCanvasLayer/Inspector/Container/Action"]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
texture = ExtResource("4_b4uwv")
|
||||
expand_mode = 2
|
||||
stretch_mode = 5
|
||||
|
||||
[node name="ActionText" type="RichTextLabel" parent="CanvasLayer/Inspector/Container/Action"]
|
||||
[node name="ActionText" type="RichTextLabel" parent="InspectorCanvasLayer/Inspector/Container/Action"]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
bbcode_enabled = true
|
||||
@@ -77,17 +77,17 @@ fit_content = true
|
||||
scroll_active = false
|
||||
autowrap_mode = 0
|
||||
|
||||
[node name="ActionZone" type="Sprite2D" parent="CanvasLayer/Inspector"]
|
||||
[node name="ActionZone" type="Sprite2D" parent="InspectorCanvasLayer/Inspector"]
|
||||
unique_name_in_owner = true
|
||||
z_index = 4096
|
||||
script = ExtResource("5_b4uwv")
|
||||
opacity = 0.4
|
||||
metadata/_custom_type_script = "uid://c60a1bjcuj4hd"
|
||||
|
||||
[node name="CardsCanvasLayer" type="CanvasLayer" parent="."]
|
||||
[node name="CardCanvasLayer" type="CanvasLayer" parent="."]
|
||||
layer = 2
|
||||
|
||||
[node name="CardPosition" type="Control" parent="CardsCanvasLayer"]
|
||||
[node name="CardPosition" type="Control" parent="CardCanvasLayer"]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 3
|
||||
anchors_preset = 8
|
||||
@@ -99,7 +99,7 @@ grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
mouse_filter = 2
|
||||
|
||||
[node name="MarginContainer" type="MarginContainer" parent="CardsCanvasLayer/CardPosition"]
|
||||
[node name="MarginContainer" type="MarginContainer" parent="CardCanvasLayer/CardPosition"]
|
||||
layout_mode = 1
|
||||
anchors_preset = 7
|
||||
anchor_left = 0.5
|
||||
@@ -117,7 +117,7 @@ theme_override_constants/margin_top = 0
|
||||
theme_override_constants/margin_right = 0
|
||||
theme_override_constants/margin_bottom = 0
|
||||
|
||||
[node name="CardVisualiser" parent="CardsCanvasLayer/CardPosition/MarginContainer" instance=ExtResource("6_7j4mj")]
|
||||
[node name="CardVisualiser" parent="CardCanvasLayer/CardPosition/MarginContainer" instance=ExtResource("6_7j4mj")]
|
||||
unique_name_in_owner = true
|
||||
modulate = Color(1, 1, 1, 0.5003133)
|
||||
material = SubResource("ShaderMaterial_6eft6")
|
||||
|
||||
@@ -133,7 +133,7 @@ func update_inspector():
|
||||
%ActionEnergyImage.visible = current_inspect.interaction_cost(player) != 0
|
||||
elif current_selected_item and current_selected_item.use_text() != "":
|
||||
%Action.visible = true
|
||||
%ActionText.text = current_selected_item.use_text() + (" (no energy left)" if not have_energy_to_use_item else "")
|
||||
%ActionText.text = current_selected_item.use_text() + (tr("NO_ENERGY_LEFT") if not have_energy_to_use_item else "")
|
||||
if can_use_item:
|
||||
%Action.modulate = DEFAULT_ACTION_COLOR if current_selected_item.energy_usage == 0 else ENERGY_ACTION_COLOR
|
||||
else :
|
||||
|
||||
Reference in New Issue
Block a user