mirror of
https://github.com/Relintai/GraphicsEditor.git
synced 2024-11-12 08:15:17 +01:00
9 lines
263 B
GDScript3
9 lines
263 B
GDScript3
|
extends ViewportContainer
|
||
|
|
||
|
func _ready():
|
||
|
pass
|
||
|
|
||
|
func _notification(what):
|
||
|
if what == Control.NOTIFICATION_RESIZED:
|
||
|
get_node("Viewport").size = self.rect_size
|
||
|
get_node("Viewport/Node2D/Camera2D").position = Vector2(self.rect_size.x / 2, self.rect_size.y / 2)
|