mirror of
https://github.com/tonytins/CozyPixelStudio.git
synced 2025-06-25 21:44:42 -04:00
Added basic UI for tabs
This commit is contained in:
parent
2e69e1a8c2
commit
709a6d470e
4 changed files with 70 additions and 38 deletions
|
@ -127,6 +127,7 @@ var top_menu_container : Panel
|
|||
var left_cursor : Sprite
|
||||
var right_cursor : Sprite
|
||||
var canvas : Canvas
|
||||
var tabs : Tabs
|
||||
var main_viewport : ViewportContainer
|
||||
var second_viewport : ViewportContainer
|
||||
var camera : Camera2D
|
||||
|
@ -230,8 +231,6 @@ func _ready() -> void:
|
|||
# The fact that root_dir is set earlier than this is important
|
||||
# XDGDataDirs depends on it nyaa
|
||||
directory_module = XDGDataPaths.new()
|
||||
projects.append(Project.new())
|
||||
current_project = projects[0]
|
||||
image_clipboard = Image.new()
|
||||
|
||||
var root = get_tree().get_root()
|
||||
|
@ -244,6 +243,7 @@ func _ready() -> void:
|
|||
left_cursor_tool_texture.create_from_image(preload("res://assets/graphics/cursor_icons/pencil_cursor.png"))
|
||||
right_cursor_tool_texture = ImageTexture.new()
|
||||
right_cursor_tool_texture.create_from_image(preload("res://assets/graphics/cursor_icons/eraser_cursor.png"))
|
||||
tabs = find_node_by_name(root, "Tabs")
|
||||
main_viewport = find_node_by_name(root, "ViewportContainer")
|
||||
second_viewport = find_node_by_name(root, "ViewportContainer2")
|
||||
camera = find_node_by_name(main_viewport, "Camera2D")
|
||||
|
@ -353,6 +353,9 @@ func _ready() -> void:
|
|||
|
||||
error_dialog = find_node_by_name(root, "ErrorDialog")
|
||||
|
||||
projects.append(Project.new())
|
||||
current_project = projects[0]
|
||||
|
||||
|
||||
# Thanks to https://godotengine.org/qa/17524/how-to-find-an-instanced-scene-by-its-name
|
||||
func find_node_by_name(root : Node, node_name : String) -> Node:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue