-
-
Notifications
You must be signed in to change notification settings - Fork 227
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Moved projects panel to a separate scene
- Loading branch information
Showing
6 changed files
with
204 additions
and
182 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,38 @@ | ||
extends Control | ||
|
||
|
||
@onready var projects = $Projects | ||
@onready var preview_2d_background = $BackgroundPreviews/Preview2D | ||
@onready var preview_2d_background_button = $PreviewUI/Preview2DButton | ||
@onready var preview_3d_background = $BackgroundPreviews/Preview3D | ||
@onready var preview_3d_background_button = $PreviewUI/Preview3DButton | ||
@onready var preview_3d_background_panel = $PreviewUI/Panel | ||
|
||
|
||
func get_projects(): | ||
return projects | ||
|
||
func _on_projects_panel_resized(): | ||
var preview_position : Vector2 = Vector2(0.0, 0.0) | ||
var preview_size : Vector2 = size | ||
preview_position.y += $Projects/TabBar.size.y | ||
preview_size.y -= $Projects/TabBar.size.y | ||
$BackgroundPreviews.position = preview_position | ||
$BackgroundPreviews.size = preview_size | ||
|
||
func show_background_preview_2d(button_pressed): | ||
preview_2d_background.visible = button_pressed | ||
if button_pressed: | ||
preview_3d_background_button.button_pressed = false | ||
|
||
func show_background_preview_3d(button_pressed): | ||
preview_3d_background.visible = button_pressed | ||
preview_3d_background_panel.visible = button_pressed | ||
if button_pressed: | ||
preview_2d_background_button.button_pressed = false | ||
|
||
func _on_projects_no_more_tabs(): | ||
mm_globals.main_window.new_material() | ||
|
||
func _on_projects_tab_changed(tab : int): | ||
mm_globals.main_window._on_Projects_tab_changed(tab) |
Oops, something went wrong.