Skip to content

Instantly share code, notes, and snippets.

@jasonwinterpixel
jasonwinterpixel / ShrinkingScrollContainer.gd
Created November 2, 2022 20:37
Godot Scroll Container that shrinks if it's contents' size is below a threshold
tool
extends Node
class_name ShrinkingScrollContainer
onready var scroll_container := get_parent() as ScrollContainer
export var _scroll_container_contents:NodePath setget set_scroll_container_contents_path
onready var scroll_container_contents := get_node_or_null(_scroll_container_contents) as Control
export var start_scrolling_at := Vector2.ZERO
@jasonwinterpixel
jasonwinterpixel / MatchRectSize.gd
Created November 2, 2022 00:21
Godot Match Rect Size
tool
extends Node
class_name MatchRectSize
onready var parent := get_parent() as Control
export(NodePath) var target_control
onready var target := get_node(target_control) as Control
export var match_x := true
export var match_y := true