Accidentally didn't push scene resource.
This commit is contained in:
parent
5f9545ff37
commit
e882a33322
|
@ -1,6 +1,6 @@
|
|||
[gd_resource type="Resource" load_steps=2 format=2]
|
||||
|
||||
[ext_resource path="res://addons/summer_day/data_structure/scene/scene.gd" type="Script" id=1]
|
||||
[ext_resource path="res://addons/summer_day/data/scene/scene.gd" type="Script" id=1]
|
||||
|
||||
[resource]
|
||||
script = ExtResource( 1 )
|
||||
|
|
|
@ -0,0 +1,39 @@
|
|||
# Does this help?
|
||||
tool
|
||||
extends Resource
|
||||
class_name SummerDayScene
|
||||
|
||||
signal aspect_ratio_changed(new_aspect_ratio)
|
||||
|
||||
|
||||
export(Vector2) var aspect_ratio = Vector2(16, 9) setget _set_aspect_ratio
|
||||
|
||||
var raw_aspect_ratio setget , _get_raw_aspect_ratio
|
||||
|
||||
|
||||
func _ready():
|
||||
pass
|
||||
|
||||
|
||||
func _set_aspect_ratio(new_aspect_ratio):
|
||||
var handled_aspect_ratio = Vector2()
|
||||
|
||||
# Don't let a component drop below 0.01!
|
||||
if new_aspect_ratio.x <= 0.01:
|
||||
handled_aspect_ratio.x = 0.01
|
||||
else:
|
||||
handled_aspect_ratio.x = new_aspect_ratio.x
|
||||
|
||||
if new_aspect_ratio.y <= 0.01:
|
||||
handled_aspect_ratio.y = 0.01
|
||||
else:
|
||||
handled_aspect_ratio.y = new_aspect_ratio.y
|
||||
|
||||
aspect_ratio = handled_aspect_ratio
|
||||
|
||||
emit_signal("aspect_ratio_changed", aspect_ratio)
|
||||
|
||||
|
||||
func _get_raw_aspect_ratio():
|
||||
return aspect_ratio.x / aspect_ratio.y
|
||||
|
|
@ -19,6 +19,7 @@ func _gui_input(event):
|
|||
tool_pool.run_most_prior(event, tool_context)
|
||||
|
||||
|
||||
# _gui_input() cannot receive released event so we do this here.
|
||||
func _input(event):
|
||||
if event is InputEventScreenTouch and !event.is_pressed():
|
||||
tool_pool.run_most_prior(event, tool_context)
|
||||
|
|
|
@ -82,7 +82,7 @@ _global_script_classes=[ {
|
|||
"base": "Resource",
|
||||
"class": "SummerDayScene",
|
||||
"language": "GDScript",
|
||||
"path": "res://addons/summer_day/data_structure/scene/scene.gd"
|
||||
"path": "res://addons/summer_day/data/scene/scene.gd"
|
||||
}, {
|
||||
"base": "Control",
|
||||
"class": "SummerDayTimeline",
|
||||
|
@ -142,10 +142,6 @@ config/icon="res://icon.png"
|
|||
|
||||
Util="res://addons/summer_day/utilities/math_helper.gd"
|
||||
|
||||
[editor_plugins]
|
||||
|
||||
enabled=PoolStringArray( "res://addons/summer_day/plugin.cfg" )
|
||||
|
||||
[gdnative]
|
||||
|
||||
singletons=[ "res://addons/godot-git-plugin/git_api.gdnlib" ]
|
||||
|
|
Loading…
Reference in New Issue