Added colored background to the editor

This commit is contained in:
Flairieve 2019-11-24 02:33:45 -06:00
parent b838e2383b
commit f239129542
4 changed files with 9 additions and 1 deletions

View File

@ -12,4 +12,4 @@ func _process(delta):
if Input.is_key_pressed(KEY_UP):
position += Vector2(0, -1) * speed
elif Input.is_key_pressed(KEY_DOWN):
position += Vector2(0, 1) * speed
position += Vector2(0, 1) * speed

View File

@ -45,6 +45,11 @@ __meta__ = {
"_edit_lock_": true
}
[node name="Background" type="ColorRect" parent="PaintCanvasContainer"]
anchor_right = 1.0
anchor_bottom = 1.0
color = Color( 0.192157, 0.192157, 0.192157, 1 )
[node name="ViewportContainer" type="ViewportContainer" parent="PaintCanvasContainer"]
anchor_right = 1.0
anchor_bottom = 1.0

View File

@ -6,6 +6,7 @@ onready var layer_list = get_node("Panel/ScrollContainer/VBoxContainer")
var layer_scene = preload("res://addons/graphics_editor/Layer.tscn")
var active_layer setget set_active_layer
#TODO: When a layer gets deleted, and then added back in with the same name, the layer data is copied over then
func _ready():
if layer_list.get_children().size() <= 0:
add_new_layer(true)

View File

@ -1,6 +1,8 @@
tool
extends Control
#TODO: Make the settings auto generate!
onready var editor = get_parent()
onready var canvas_outline = get_parent().get_node("PaintCanvasContainer/ViewportContainer/Viewport/PaintCanvas/CanvasOutline")
onready var visual_grid_1 = get_parent().get_node("PaintCanvasContainer/ViewportContainer/Viewport/PaintCanvas/Grids/VisualGrid")