mirror of
https://github.com/Orama-Interactive/Pixelorama.git
synced 2025-01-18 17:19:50 +00:00
[skip ci] Change instances of "yield" to "await" in comments
This commit is contained in:
parent
1ad4c2357f
commit
c0c391674d
|
@ -351,7 +351,7 @@ func _ready() -> void:
|
|||
pixel_perfect = Global.config_cache.get_value("tools", "pixel_perfect", false)
|
||||
alpha_locked = Global.config_cache.get_value("tools", "alpha_locked", false)
|
||||
|
||||
# Yield is necessary for the color picker nodes to update their color values
|
||||
# Await is necessary for the color picker nodes to update their color values
|
||||
await get_tree().process_frame
|
||||
var color_value: Color = Global.config_cache.get_value(
|
||||
_slots[MOUSE_BUTTON_LEFT].kname, "color", Color.BLACK
|
||||
|
@ -365,7 +365,7 @@ func _ready() -> void:
|
|||
var layer: BaseLayer = Global.current_project.layers[Global.current_project.current_layer]
|
||||
var layer_type := layer.get_layer_type()
|
||||
|
||||
# Yield is necessary to hide irrelevant tools added by extensions
|
||||
# Await is necessary to hide irrelevant tools added by extensions
|
||||
await get_tree().process_frame
|
||||
_show_relevant_tools(layer_type)
|
||||
|
||||
|
@ -380,7 +380,7 @@ func add_tool_button(t: Tool, insert_pos := -1) -> void:
|
|||
t.button_node = tool_button
|
||||
_tool_buttons.add_child(tool_button)
|
||||
if insert_pos > -1:
|
||||
insert_pos = min(insert_pos, _tool_buttons.get_child_count() - 1)
|
||||
insert_pos = mini(insert_pos, _tool_buttons.get_child_count() - 1)
|
||||
_tool_buttons.move_child(tool_button, insert_pos)
|
||||
tool_button.pressed.connect(_tool_buttons._on_Tool_pressed.bind(tool_button))
|
||||
|
||||
|
|
|
@ -233,7 +233,7 @@ func _cel_switched() -> void:
|
|||
_fill_object_option_button()
|
||||
sprite_changed_this_frame()
|
||||
|
||||
# two yields are required
|
||||
# Two awaits are required
|
||||
await get_tree().process_frame
|
||||
await get_tree().process_frame
|
||||
_cel.selected = selected
|
||||
|
|
|
@ -170,7 +170,7 @@ func _frame_scroll_changed(_value: float) -> void:
|
|||
|
||||
func _on_LayerVBox_resized() -> void:
|
||||
frame_scroll_bar.offset_left = frame_scroll_container.position.x
|
||||
# it doesn't update properly without yields (for the first time after pixelorama starts)
|
||||
# It doesn't update properly without awaits (for the first time after Pixelorama starts)
|
||||
await get_tree().process_frame
|
||||
await get_tree().process_frame
|
||||
adjust_scroll_container()
|
||||
|
@ -284,7 +284,7 @@ func add_frame() -> void:
|
|||
project.undo_redo.add_do_method(project.change_cel.bind(project.current_frame + 1))
|
||||
project.undo_redo.add_undo_method(project.change_cel.bind(project.current_frame))
|
||||
project.undo_redo.commit_action()
|
||||
# it doesn't update properly without yields
|
||||
# It doesn't update properly without awaits
|
||||
await get_tree().process_frame
|
||||
await get_tree().process_frame
|
||||
adjust_scroll_container()
|
||||
|
@ -354,7 +354,7 @@ func delete_frames(indices: PackedInt32Array = []) -> void:
|
|||
project.undo_redo.add_do_method(Global.undo_or_redo.bind(false))
|
||||
project.undo_redo.add_undo_method(Global.undo_or_redo.bind(true))
|
||||
project.undo_redo.commit_action()
|
||||
# it doesn't update properly without yields
|
||||
# It doesn't update properly without awaits
|
||||
await get_tree().process_frame
|
||||
await get_tree().process_frame
|
||||
adjust_scroll_container()
|
||||
|
|
Loading…
Reference in a new issue