Skip to content

Commit

Permalink
localization fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
TinyTakinTeller committed Jan 5, 2025
1 parent 8914bf2 commit 963e0ac
Show file tree
Hide file tree
Showing 8 changed files with 39 additions and 8 deletions.
2 changes: 1 addition & 1 deletion global/const/game.gd
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const WORKER_ROLE_RESOURCE: Array[String] = [WORKER_RESOURCE_ID, "swordsman"]
const VERSION_MAJOR: String = "prototype"
const VERSION_MINOR: String = "release 1.1"

const PARAMS: Dictionary = PARAMS_PROD #PARAMS_PROD #PARAMS_DEBUG
const PARAMS: Dictionary = PARAMS_DEBUG #PARAMS_PROD #PARAMS_DEBUG

const SKIP_BOSS: bool = false

Expand Down
5 changes: 5 additions & 0 deletions scenes/autostart/main/prestige_ui/prestige_ui.gd
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ func _connect_signals() -> void:
SignalBus.prestige_condition_fail.connect(_on_prestige_condition_fail)
SignalBus.prestige_condition_disabled.connect(_on_prestige_condition_disabled)
SignalBus.prestige_condition_pass.connect(_on_prestige_condition_pass)
SignalBus.display_language_updated.connect(_on_display_language_updated)


func _on_dialog_heart_button() -> void:
Expand Down Expand Up @@ -103,3 +104,7 @@ func _on_prestige_condition_disabled() -> void:
func _on_prestige_condition_pass(_infinity_count: int) -> void:
heart_yes_button.disabled = true
heart_no_button.disabled = true


func _on_display_language_updated() -> void:
_initialize()
2 changes: 1 addition & 1 deletion scenes/autostart/main/reborn_ui/reborn_ui.gd
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ func push_next_label() -> void:
button.visible = true
if _text == " ":
_on_typing_animation_end()
elif StringUtils.is_not_empty(_text):
elif StringUtils.is_not_empty(_text) and not _text == "?":
_add_label_typing(_text)
else:
SignalBus.prestige_reborn.emit()
Expand Down
8 changes: 6 additions & 2 deletions scenes/ui/screen/darkness_screen/darkness_screen.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -53,22 +53,26 @@ layout_mode = 2

[node name="TitleLabel" parent="ScreenMarginContainer/TitleMarginContainer/VBoxContainer" instance=ExtResource("2_juuhi")]
unique_name_in_owner = true
custom_minimum_size = Vector2(200, 25)
layout_mode = 2
size_flags_horizontal = 4
size_flags_horizontal = 1
size_flags_vertical = 0
theme_override_colors/font_outline_color = Color(0, 0, 0, 1)
theme_override_constants/outline_size = 8
text = "The Ambassador Of Darkness"
horizontal_alignment = 1

[node name="LevelLabel" parent="ScreenMarginContainer/TitleMarginContainer/VBoxContainer" instance=ExtResource("2_juuhi")]
unique_name_in_owner = true
visible = false
material = SubResource("ShaderMaterial_6dwjo")
custom_minimum_size = Vector2(200, 25)
layout_mode = 2
size_flags_horizontal = 4
size_flags_horizontal = 1
theme_override_colors/font_outline_color = Color(0, 0, 0, 1)
theme_override_constants/outline_size = 8
text = "DCCCXXXVIII"
horizontal_alignment = 1

[node name="EnemyTexture" parent="ScreenMarginContainer" instance=ExtResource("3_hlysm")]
unique_name_in_owner = true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ layout_mode = 2

[node name="InfoLabel" type="Label" parent="HBoxContainer/InfoMarginContainer/InfoLabelMarginContainer"]
unique_name_in_owner = true
custom_minimum_size = Vector2(110, 26)
custom_minimum_size = Vector2(100, 26)
layout_mode = 2
size_flags_horizontal = 4
theme_override_font_sizes/font_size = 16
Expand Down
9 changes: 9 additions & 0 deletions scenes/ui/screen/world_screen/npc_dialog/npc_dialog.gd
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ var _target_id: String = ""
@onready var npc_texture_rect: TextureRect = %NpcTextureRect
@onready var npc_button: Button = %NpcButton
@onready var enter_simple_tween: SimpleTween = %EnterSimpleTween
@onready var panel: Panel = %Panel

###############
## overrides ##
Expand Down Expand Up @@ -256,3 +257,11 @@ func _enter_simple_tween_method(animation_percent: float) -> void:
npc_margin_container.add_theme_constant_override("margin_bottom", 20)
else:
npc_margin_container.add_theme_constant_override("margin_bottom", 25)


# workaround
func _process(_delta: float) -> void:
panel.visible = dialog_label.visible
panel.modulate = dialog_label.modulate
if dialog_label.text.length() <= 1:
panel.visible = false
15 changes: 13 additions & 2 deletions scenes/ui/screen/world_screen/npc_dialog/npc_dialog.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,21 @@ layout_mode = 2

[node name="DialogMarginContainer" type="MarginContainer" parent="MarginContainer/VBoxContainer"]
layout_mode = 2
theme_override_constants/margin_left = 8
theme_override_constants/margin_left = 12
theme_override_constants/margin_top = 8
theme_override_constants/margin_right = 8
theme_override_constants/margin_bottom = 8
theme_override_constants/margin_bottom = 12

[node name="MarginContainer" type="MarginContainer" parent="MarginContainer/VBoxContainer/DialogMarginContainer"]
layout_mode = 2
theme_override_constants/margin_left = -8
theme_override_constants/margin_top = -8
theme_override_constants/margin_right = -8
theme_override_constants/margin_bottom = -8

[node name="Panel" type="Panel" parent="MarginContainer/VBoxContainer/DialogMarginContainer/MarginContainer"]
unique_name_in_owner = true
layout_mode = 2

[node name="DialogLabel" parent="MarginContainer/VBoxContainer/DialogMarginContainer" instance=ExtResource("2_55et7")]
unique_name_in_owner = true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,9 @@ func _red_color_rect_simple_tween_method(animation_percent: float) -> void:
############


static func before_than(a: ProgressButton, b: ProgressButton) -> bool:
static func before_than(a: Node, b: Node) -> bool:
if not is_instance_of(a, ProgressButton) or not is_instance_of(b, ProgressButton):
return false
var sort_a: ResourceGenerator = Resources.resource_generators.get(a.get_id(), null)
var sort_b: ResourceGenerator = Resources.resource_generators.get(b.get_id(), null)
if sort_a == null:
Expand Down

0 comments on commit 963e0ac

Please sign in to comment.