mirror of
https://github.com/thegatesbrowser/thegates.git
synced 2025-08-26 08:17:38 -04:00
add license, move folders
This commit is contained in:
parent
185cc74060
commit
271c4a46a1
132 changed files with 21 additions and 0 deletions
24
app/scripts/ui/world/world_canvas.gd
Normal file
24
app/scripts/ui/world/world_canvas.gd
Normal file
|
@ -0,0 +1,24 @@
|
|||
extends Control
|
||||
|
||||
@export var ui_events: UiEvents
|
||||
@export var interpolate: float:
|
||||
set(value):
|
||||
interpolate = value
|
||||
animate(value)
|
||||
|
||||
var initial: int
|
||||
var full_screen: int
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
var viewport_width = ProjectSettings.get_setting("display/window/size/viewport_width", 1152)
|
||||
var scale_width = float(custom_minimum_size.x) / viewport_width
|
||||
|
||||
full_screen = int(ui_events.current_ui_size.x)
|
||||
initial = int(full_screen * scale_width)
|
||||
custom_minimum_size.x = initial
|
||||
Debug.logclr("WorldCanvas initial: %d full_screen: %d" % [initial, full_screen], Color.DIM_GRAY)
|
||||
|
||||
|
||||
func animate(value: float) -> void:
|
||||
custom_minimum_size.x = lerp(initial, full_screen, value)
|
Loading…
Add table
Add a link
Reference in a new issue