mirror of
https://github.com/Orama-Interactive/Pixelorama.git
synced 2025-01-31 07:29:49 +00:00
Fixed shadowed variables crashes/warnings occurring in Godot 3.2.2-rc1
This commit is contained in:
parent
e6aea97f1b
commit
8064d7b459
|
@ -429,8 +429,8 @@ func animation_tags_changed(value : Array) -> void:
|
|||
|
||||
tag_c.rect_position.x = (tag.from - 1) * 39 + tag.from
|
||||
|
||||
var size : int = tag.to - tag.from
|
||||
tag_c.rect_min_size.x = (size + 1) * 39
|
||||
var tag_size : int = tag.to - tag.from
|
||||
tag_c.rect_min_size.x = (tag_size + 1) * 39
|
||||
tag_c.get_node("Line2D").points[2] = Vector2(tag_c.rect_min_size.x, 0)
|
||||
tag_c.get_node("Line2D").points[3] = Vector2(tag_c.rect_min_size.x, 32)
|
||||
|
||||
|
|
|
@ -78,8 +78,8 @@ func _on_PresetOptionButton_item_selected(id : int) -> void:
|
|||
|
||||
func apply_shortcuts_preset(preset) -> void:
|
||||
for action in preset:
|
||||
var old_input_event : InputEventKey = InputMap.get_action_list(action)[0]
|
||||
set_action_shortcut(action, old_input_event, preset[action])
|
||||
var _old_input_event : InputEventKey = InputMap.get_action_list(action)[0]
|
||||
set_action_shortcut(action, _old_input_event, preset[action])
|
||||
get_node("Shortcuts/" + action).text = OS.get_scancode_string(preset[action].get_scancode_with_modifiers())
|
||||
|
||||
|
||||
|
|
|
@ -43,14 +43,14 @@ func _draw() -> void:
|
|||
first = (transform * ruler_transform * major_subdivide * minor_subdivide).affine_inverse().xform(Vector2.ZERO)
|
||||
last = (transform * ruler_transform * major_subdivide * minor_subdivide).affine_inverse().xform(Global.main_viewport.rect_size)
|
||||
|
||||
for i in range(ceil(first.x), ceil(last.x)):
|
||||
var position : Vector2 = (transform * ruler_transform * major_subdivide * minor_subdivide).xform(Vector2(i, 0))
|
||||
if i % (major_subdivision * minor_subdivision) == 0:
|
||||
for j in range(ceil(first.x), ceil(last.x)):
|
||||
var position : Vector2 = (transform * ruler_transform * major_subdivide * minor_subdivide).xform(Vector2(j, 0))
|
||||
if j % (major_subdivision * minor_subdivision) == 0:
|
||||
draw_line(Vector2(position.x + RULER_WIDTH, 0), Vector2(position.x + RULER_WIDTH, RULER_WIDTH), Color.white)
|
||||
var val = (ruler_transform * major_subdivide * minor_subdivide).xform(Vector2(i, 0)).x
|
||||
var val = (ruler_transform * major_subdivide * minor_subdivide).xform(Vector2(j, 0)).x
|
||||
draw_string(font, Vector2(position.x + RULER_WIDTH + 2, font.get_height() - 4), str(int(val)))
|
||||
else:
|
||||
if i % minor_subdivision == 0:
|
||||
if j % minor_subdivision == 0:
|
||||
draw_line(Vector2(position.x + RULER_WIDTH, RULER_WIDTH * 0.33), Vector2(position.x + RULER_WIDTH, RULER_WIDTH), Color.white)
|
||||
else:
|
||||
draw_line(Vector2(position.x + RULER_WIDTH, RULER_WIDTH * 0.66), Vector2(position.x + RULER_WIDTH, RULER_WIDTH), Color.white)
|
||||
|
|
|
@ -43,17 +43,17 @@ func _draw() -> void:
|
|||
first = (transform * ruler_transform * major_subdivide * minor_subdivide).affine_inverse().xform(Vector2.ZERO)
|
||||
last = (transform * ruler_transform * major_subdivide * minor_subdivide).affine_inverse().xform(Global.main_viewport.rect_size)
|
||||
|
||||
for i in range(ceil(first.y), ceil(last.y)):
|
||||
var position : Vector2 = (transform * ruler_transform * major_subdivide * minor_subdivide).xform(Vector2(0, i))
|
||||
if i % (major_subdivision * minor_subdivision) == 0:
|
||||
for j in range(ceil(first.y), ceil(last.y)):
|
||||
var position : Vector2 = (transform * ruler_transform * major_subdivide * minor_subdivide).xform(Vector2(0, j))
|
||||
if j % (major_subdivision * minor_subdivision) == 0:
|
||||
draw_line(Vector2(0, position.y), Vector2(RULER_WIDTH, position.y), Color.white)
|
||||
var text_xform = Transform2D(-PI / 2, Vector2(font.get_height() - 4, position.y - 2))
|
||||
draw_set_transform_matrix(get_transform() * text_xform)
|
||||
var val = (ruler_transform * major_subdivide * minor_subdivide).xform(Vector2(0, i)).y
|
||||
var val = (ruler_transform * major_subdivide * minor_subdivide).xform(Vector2(0, j)).y
|
||||
draw_string(font, Vector2(), str(int(val)))
|
||||
draw_set_transform_matrix(get_transform())
|
||||
else:
|
||||
if i % minor_subdivision == 0:
|
||||
if j % minor_subdivision == 0:
|
||||
draw_line(Vector2(RULER_WIDTH * 0.33, position.y), Vector2(RULER_WIDTH, position.y), Color.white)
|
||||
else:
|
||||
draw_line(Vector2(RULER_WIDTH * 0.66, position.y), Vector2(RULER_WIDTH, position.y), Color.white)
|
||||
|
|
|
@ -6,7 +6,7 @@ var tag_vboxes := []
|
|||
var delete_tag_button : Button
|
||||
|
||||
onready var main_vbox_cont : VBoxContainer = $VBoxContainer/ScrollContainer/VBoxTagContainer
|
||||
onready var add_tag_button : TextureButton = $VBoxContainer/ScrollContainer/VBoxTagContainer/AddTag
|
||||
onready var add_tag_button : Button = $VBoxContainer/ScrollContainer/VBoxTagContainer/AddTag
|
||||
onready var options_dialog = $TagOptions
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue