Skip to content

Commit

Permalink
Merge pull request #215 from carenalgas/develop
Browse files Browse the repository at this point in the history
Hot fixes for Beta 3
  • Loading branch information
mapedorr authored Apr 21, 2024
2 parents 00ff635 + 2086e4b commit df23dc0
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,8 @@ func say(dialog: String, emo := "") -> void:
await G.dialog_line_finished

# Stop the voice if it is still playing (feature #202)
if A[vo_name].is_playing():
# Fix: Check if the vo_name is valid in order to stop it
if not vo_name.is_empty() and A[vo_name].is_playing():
A[vo_name].stop(0.3)

emotion = ''
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,9 @@ func _create_options(options := [], autoshow := false) -> void:
if not current_options.is_empty():
show_options()
return

current_options = options.duplicate(true)

for dialog_option: PopochiuDialogOption in options:
var dialog_menu_option := option_scene.instantiate()
dialog_menu_option.normal_color = normal_font_color
Expand All @@ -94,9 +94,22 @@ func _create_options(options := [], autoshow := false) -> void:
dialog_menu_option.show()

if autoshow: show_options()
await get_tree().process_frame
await get_tree().create_timer(0.1).timeout

# Fix: Height and position of the dialog menu was wrong when changing the amount of options to
# show.
var options_height := 0
var visible_options := 0
for opt in dialog_options_container.get_children():
if not opt.visible: continue

options_height += opt.size.y
visible_options += 1

options_height += dialog_options_container.get_theme_constant("separation") * (visible_options - 1)

custom_minimum_size.y = min(dialog_options_container.size.y, max_height)
size.y = min(options_height, max_height)
position.y = E.height - size.y


func remove_options(_dialog: PopochiuDialog = null) -> void:
Expand Down
2 changes: 1 addition & 1 deletion release-notes/v2.0.0-beta3.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ This release has new features, various bug fixes, and a bright new guide. Here a

## Welcome to the new getting started guide!

- Thanks to @stickgrinder, now we have a new introductory guide to Popochiu: [Creating a game stub](https://carenalgas.github.io/popochiu/getting-started/creating-a-game-stub/). It will help new-comers, and old users, to learn the basics of Popochiu, or get up to date if coming from version 1 (the one that ran in Godot 3).
- Thanks to @stickgrinder, now we have a new introductory guide to Popochiu: [Creating a game stub](https://carenalgas.github.io/popochiu/getting-started/creating-a-game-stub/introduction/). It will help new-comers, and old users, to learn the basics of Popochiu, or get up to date if coming from version 1 (the one that ran in Godot 3).
- Also, @Whyshchuck wrote a couple of guides on:
- How to use a **Region** to scale characters depending on their `y` position inside it. You can find it on the [Character Scaling](https://carenalgas.github.io/popochiu/how-to-develop-a-game/advanced-techniques/character-scaling/) page of the Documentation site.
- How to use the [Character Anti-glide feature](https://carenalgas.github.io/popochiu/how-to-develop-a-game/advanced-techniques/character-anti-glide-feature/). Enable it with the `Project Settings > Popochiu > Pixel > Pixel Perfect` option.

0 comments on commit df23dc0

Please sign in to comment.