pandemonium_engine/modules/paint/paint_window.cpp

2163 lines
214 KiB
C++
Raw Normal View History

/*
Copyright (c) 2019 Flairieve
Copyright (c) 2020-2022 cobrapitz
Copyright (c) 2022 Péter Magyar
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/
#include "paint_window.h"
void PaintWindow::_input(const Ref<InputEvent> &event) {
/*
if is_any_menu_open():
return
if not is_visible_in_tree():
return
if paint_canvas_container_node == null or paint_canvas == null:
return
if event is InputEventKey and event.is_pressed() and not event.is_echo():
_handle_shortcuts(event.scancode)
if is_mouse_in_canvas() and paint_canvas.mouse_on_top:
_handle_zoom(event)
if paint_canvas.is_active_layer_locked():
return
if brush_mode == Tools.CUT:
if event is InputEventMouseButton:
if event.button_index == BUTTON_LEFT:
if not event.pressed:
commit_action()
if (paint_canvas.mouse_in_region and paint_canvas.mouse_on_top):
if event is InputEventMouseButton:
match brush_mode:
Tools.BUCKET:
if event.button_index == BUTTON_LEFT:
if event.pressed:
if _current_action == null:
_current_action = get_action()
do_action([cell_mouse_position, last_cell_mouse_position, selected_color])
Tools.COLORPICKER:
if event.button_index == BUTTON_LEFT:
if event.pressed:
if paint_canvas.get_pixel(cell_mouse_position.x, cell_mouse_position.y).a == 0:
return
selected_color = paint_canvas.get_pixel(cell_mouse_position.x, cell_mouse_position.y)
_picked_color = true
find_node("Colors").add_color_prefab(selected_color)
elif _picked_color:
set_brush(_previous_tool)
elif event.button_index == BUTTON_RIGHT:
if event.pressed:
set_brush(_previous_tool)
Tools.PASTECUT:
if event.button_index == BUTTON_RIGHT:
if event.pressed:
commit_action()
set_brush(Tools.PAINT)
*/
}
void PaintWindow::_process(float delta) {
/*
if not is_visible_in_tree():
return
if paint_canvas_container_node == null or paint_canvas == null:
return
if is_any_menu_open():
return
if is_mouse_in_canvas():
_handle_scroll()
#Update commonly used variables
var grid_size = paint_canvas.pixel_size
mouse_position = get_global_mouse_position() #paint_canvas.get_local_mouse_position()
canvas_position = paint_canvas.rect_global_position
canvas_mouse_position = Vector2(mouse_position.x - canvas_position.x, mouse_position.y - canvas_position.y)
if is_mouse_in_canvas() && paint_canvas.mouse_on_top:
cell_mouse_position = Vector2(
floor(canvas_mouse_position.x / grid_size),
floor(canvas_mouse_position.y / grid_size))
cell_color = paint_canvas.get_pixel(cell_mouse_position.x, cell_mouse_position.y)
update_text_info()
# if not is_mouse_in_canvas():
# paint_canvas.tool_layer.clear()
# paint_canvas.update()
# paint_canvas.tool_layer.update_texture()
# else:
if is_mouse_in_canvas() && paint_canvas.mouse_on_top:
if not paint_canvas.is_active_layer_locked():
if is_position_in_canvas(get_global_mouse_position()) or \
is_position_in_canvas(_last_mouse_pos_canvas_area):
brush_process()
else:
print(cell_mouse_position, " not in ", paint_canvas_container_node.rect_size)
print("not in canvas")
_draw_tool_brush()
#Update last variables with the current variables
last_mouse_position = mouse_position
last_canvas_position = canvas_position
last_canvas_mouse_position = canvas_mouse_position
last_cell_mouse_position = cell_mouse_position
last_cell_color = cell_color
_last_mouse_pos_canvas_area = get_global_mouse_position() #paint_canvas_container_node.get_local_mouse_position()
*/
}
void PaintWindow::_handle_shortcuts(const int scancode) {
/*
match scancode:
K_UNDO:
undo_action()
K_REDO:
redo_action()
K_PENCIL:
set_brush(Tools.PAINT)
K_BRUSH:
set_brush(Tools.BRUSH)
K_BUCKET:
set_brush(Tools.BUCKET)
K_RAINBOW:
set_brush(Tools.RAINBOW)
K_LINE:
set_brush(Tools.LINE)
K_DARK:
set_brush(Tools.DARKEN)
K_BRIGHT:
set_brush(Tools.BRIGHTEN)
K_CUT:
set_brush(Tools.CUT)
K_PICK:
set_brush(Tools.COLORPICKER)
*/
}
void PaintWindow::_draw_tool_brush() {
/*
paint_canvas.tool_layer.clear()
match brush_mode:
Tools.PASTECUT:
for idx in range(_selection_cells.size()):
var pixel = _selection_cells[idx]
# if pixel.x < 0 or pixel.y < 0:
# print(pixel)
var color = _selection_colors[idx]
pixel -= _cut_pos + _cut_size / 2
pixel += cell_mouse_position
paint_canvas._set_pixel_v(paint_canvas.tool_layer, pixel, color)
Tools.BRUSH:
var pixels = BrushPrefabs.get_brush(selected_brush_prefab, find_node("BrushSize").value)
for pixel in pixels:
paint_canvas._set_pixel(paint_canvas.tool_layer,
cell_mouse_position.x + pixel.x, cell_mouse_position.y + pixel.y, selected_color)
Tools.RAINBOW:
paint_canvas._set_pixel(paint_canvas.tool_layer,
cell_mouse_position.x, cell_mouse_position.y, Color(0.46875, 0.446777, 0.446777, 0.196078))
Tools.COLORPICKER:
paint_canvas._set_pixel(paint_canvas.tool_layer,
cell_mouse_position.x, cell_mouse_position.y, Color(0.866667, 0.847059, 0.847059, 0.196078))
_:
paint_canvas._set_pixel(paint_canvas.tool_layer,
cell_mouse_position.x, cell_mouse_position.y, selected_color)
paint_canvas.update()
#TODO add here brush prefab drawing
paint_canvas.tool_layer.update_texture()
*/
}
void PaintWindow::_handle_scroll() {
/*
if Input.is_mouse_button_pressed(BUTTON_MIDDLE):
if _middle_mouse_pressed_start_pos == null:
_middle_mouse_pressed_start_pos = paint_canvas.rect_position
_middle_mouse_pressed_pos = get_global_mouse_position()
paint_canvas.rect_position = _middle_mouse_pressed_start_pos
paint_canvas.rect_position += get_global_mouse_position() - _middle_mouse_pressed_pos
elif _middle_mouse_pressed_start_pos != null:
_middle_mouse_pressed_start_pos = null
*/
}
void PaintWindow::_handle_zoom(const Ref<InputEvent> &event) {
/*
if not event is InputEventMouseButton:
return
if event.is_pressed():
if event.button_index == BUTTON_WHEEL_UP:
var px = min(paint_canvas.pixel_size * 2, max_zoom_in)
if px == paint_canvas.pixel_size:
return
paint_canvas.set_pixel_size(px)
find_node("CanvasBackground").material.set_shader_param(
"pixel_size", 8 * pow(0.5, big_grid_pixels)/paint_canvas.pixel_size)
paint_canvas.rect_position -= paint_canvas.get_local_mouse_position()
paint_canvas.rect_position.x = clamp(paint_canvas.rect_position.x, -paint_canvas.rect_size.x * 0.8, rect_size.x)
paint_canvas.rect_position.y = clamp(paint_canvas.rect_position.y, -paint_canvas.rect_size.y * 0.8, rect_size.y)
elif event.button_index == BUTTON_WHEEL_DOWN:
var px = max(paint_canvas.pixel_size / 2.0, max_zoom_out)
if px == paint_canvas.pixel_size:
return
paint_canvas.set_pixel_size(px)
find_node("CanvasBackground").material.set_shader_param(
# 4 2 1
"pixel_size", 8 * pow(0.5, big_grid_pixels)/paint_canvas.pixel_size)
paint_canvas.rect_position += paint_canvas.get_local_mouse_position() / 2
paint_canvas.rect_position.x = clamp(paint_canvas.rect_position.x, -paint_canvas.rect_size.x * 0.8, rect_size.x)
paint_canvas.rect_position.y = clamp(paint_canvas.rect_position.y, -paint_canvas.rect_size.y * 0.8, rect_size.y)
*/
}
void PaintWindow::_handle_cut() {
/*
if Input.is_mouse_button_pressed(BUTTON_RIGHT):
paint_canvas.clear_preview_layer()
set_brush(_previous_tool)
return
if Input.is_mouse_button_pressed(BUTTON_LEFT):
for pixel_pos in GEUtils.get_pixels_in_line(cell_mouse_position, last_cell_mouse_position):
for idx in range(_selection_cells.size()):
var pixel = _selection_cells[idx]
var color = _selection_colors[idx]
pixel -= _cut_pos + _cut_size / 2
pixel += pixel_pos
paint_canvas.set_pixel_v(pixel, color)
else:
if _last_preview_draw_cell_pos == cell_mouse_position:
return
paint_canvas.clear_preview_layer()
for idx in range(_selection_cells.size()):
var pixel = _selection_cells[idx]
var color = _selection_colors[idx]
pixel -= _cut_pos + _cut_size / 2
pixel += cell_mouse_position
paint_canvas.set_preview_pixel_v(pixel, color)
_last_preview_draw_cell_pos = cell_mouse_position
*/
}
void PaintWindow::brush_process() {
/*
if Input.is_mouse_button_pressed(BUTTON_LEFT):
if _current_action == null:
_current_action = get_action()
if brush_mode == Tools.COLORPICKER:
_current_action = null
match brush_mode:
Tools.PAINT:
do_action([cell_mouse_position, last_cell_mouse_position, selected_color])
Tools.BRUSH:
do_action([cell_mouse_position, last_cell_mouse_position, selected_color,
selected_brush_prefab, find_node("BrushSize").value])
Tools.LINE:
do_action([cell_mouse_position, last_cell_mouse_position, selected_color])
Tools.RECT:
do_action([cell_mouse_position, last_cell_mouse_position, selected_color])
Tools.DARKEN:
do_action([cell_mouse_position, last_cell_mouse_position, selected_color])
Tools.BRIGHTEN:
do_action([cell_mouse_position, last_cell_mouse_position, selected_color])
Tools.COLORPICKER:
pass
Tools.CUT:
do_action([cell_mouse_position, last_cell_mouse_position, selected_color])
Tools.PASTECUT:
do_action([cell_mouse_position, last_cell_mouse_position,
_selection_cells, _selection_colors,
_cut_pos, _cut_size])
Tools.RAINBOW:
do_action([cell_mouse_position, last_cell_mouse_position])
paint_canvas.update()
elif Input.is_mouse_button_pressed(BUTTON_RIGHT):
paint_canvas.update()
if _current_action == null:
_current_action = get_action()
match brush_mode:
Tools.PAINT:
do_action([cell_mouse_position, last_cell_mouse_position, Color.transparent])
Tools.BRUSH:
do_action([cell_mouse_position, last_cell_mouse_position, Color.transparent,
selected_brush_prefab, find_node("BrushSize").value])
else:
if _current_action and _current_action.can_commit():
commit_action()
paint_canvas.update()
*/
}
void PaintWindow::update_text_info() {
/*
var text = ""
var cell_color_text = cell_color
cell_color_text = Color(0, 0, 0, 0)
text += \
str("FPS %s\t" + \
"Mouse Position %s\t" + \
"Canvas Mouse Position %s \t" + \
"Canvas Position %s\t\n" + \
"Cell Position %s \t" + \
"Cell Color %s\t") % [
str(Engine.get_frames_per_second()),
str(mouse_position),
str(canvas_mouse_position),
str(canvas_position),
str(cell_mouse_position),
str(cell_color_text),
]
find_node("DebugTextDisplay").display_text(text)
*/
}
void PaintWindow::_on_Save_pressed() {
/*
get_node("SaveFileDialog").show()
*/
}
void PaintWindow::do_action(const Array &data) {
/*
if _current_action == null:
#print("clear redo")
_redo_history.clear()
_current_action.do_action(paint_canvas, data)
*/
}
void PaintWindow::commit_action() {
/*
if not _current_action:
return
#print("commit action")
var commit_data = _current_action.commit_action(paint_canvas)
var action = get_action()
action.action_data = _current_action.action_data.duplicate(true)
_actions_history.push_back(action)
_redo_history.clear()
match brush_mode:
Tools.CUT:
_cut_pos = _current_action.mouse_start_pos
_cut_size = _current_action.mouse_end_pos - _current_action.mouse_start_pos
_selection_cells = _current_action.action_data.redo.cells.duplicate()
_selection_colors = _current_action.action_data.redo.colors.duplicate()
set_brush(Tools.PASTECUT)
_:
_current_action = null
*/
}
void PaintWindow::redo_action() {
/*
if _redo_history.empty():
print("nothing to redo")
return
var action = _redo_history.pop_back()
if not action:
return
_actions_history.append(action)
action.redo_action(paint_canvas)
paint_canvas.update()
#print("redo action")
*/
}
void PaintWindow::undo_action() {
/*
var action = _actions_history.pop_back()
if not action:
return
_redo_history.append(action)
action.undo_action(paint_canvas)
update()
paint_canvas.update()
#print("undo action")
*/
}
Ref<PaintAction> PaintWindow::get_action() {
/*
match brush_mode:
Tools.PAINT:
return GEPencil.new()
Tools.BRUSH:
return GEBrush.new()
Tools.LINE:
return GELine.new()
Tools.RAINBOW:
return GERainbow.new()
Tools.BUCKET:
return GEBucket.new()
Tools.RECT:
return GERect.new()
Tools.DARKEN:
return GEDarken.new()
Tools.BRIGHTEN:
return GEBrighten.new()
Tools.CUT:
return GECut.new()
Tools.PASTECUT:
return GEPasteCut.new()
_:
#print("no tool!")
return null
*/
}
void PaintWindow::set_selected_color(const Color &color) {
/*
selected_color = color
*/
}
void PaintWindow::set_brush(const PaintWindow::Tools new_mode) {
/*
if brush_mode == new_mode:
return
_previous_tool = brush_mode
brush_mode = new_mode
_current_action = get_action()
match _previous_tool:
Tools.CUT:
paint_canvas.clear_preview_layer()
Tools.PASTECUT:
_selection_cells.clear()
_selection_colors.clear()
Tools.BUCKET:
_current_action = null
#print("Selected: ", Tools.keys()[brush_mode])
*/
}
void PaintWindow::change_color(const Color &new_color) {
/*
if new_color.a == 0:
return
selected_color = new_color
find_node("ColorPicker").color = selected_color
*/
}
void PaintWindow::_on_ColorPicker_color_changed(const Color &color) {
/*
selected_color = color
*/
}
void PaintWindow::_on_PaintTool_pressed() {
/*
set_brush(Tools.PAINT)
*/
}
void PaintWindow::_on_BucketTool_pressed() {
/*
set_brush(Tools.BUCKET)
*/
}
void PaintWindow::_on_RainbowTool_pressed() {
/*
set_brush(Tools.RAINBOW)
*/
}
void PaintWindow::_on_BrushTool_pressed() {
/*
set_brush(Tools.BRUSH)
*/
}
void PaintWindow::_on_LineTool_pressed() {
/*
set_brush(Tools.LINE)
*/
}
void PaintWindow::_on_RectTool_pressed() {
/*
set_brush(Tools.RECT)
*/
}
void PaintWindow::_on_DarkenTool_pressed() {
/*
set_brush(Tools.DARKEN)
*/
}
void PaintWindow::_on_BrightenTool_pressed() {
/*
set_brush(Tools.BRIGHTEN)
*/
}
void PaintWindow::_on_ColorPickerTool_pressed() {
/*
set_brush(Tools.COLORPICKER)
*/
}
void PaintWindow::_on_CutTool_pressed() {
/*
set_brush(Tools.CUT)
*/
}
void PaintWindow::_on_Editor_visibility_changed() {
/*
pause_mode = not visible
*/
}
void PaintWindow::highlight_layer(const String &layer_name) {
/*
for button in layer_buttons.get_children():
if paint_canvas.find_layer_by_name(button.name).locked:
button.get("custom_styles/panel").set("bg_color", locked_layer_highlight)
elif button.name == layer_name:
button.get("custom_styles/panel").set("bg_color", current_layer_highlight)
else:
button.get("custom_styles/panel").set("bg_color", other_layer_highlight)
*/
}
void PaintWindow::toggle_layer_visibility(Node *button, const String &layer_name) {
/*
#print("toggling: ", layer_name)
paint_canvas.toggle_layer_visibility(layer_name)
*/
}
void PaintWindow::select_layer(const String &layer_name) {
/*
#print("select layer: ", layer_name)
paint_canvas.select_layer(layer_name)
highlight_layer(layer_name)
*/
}
void PaintWindow::lock_layer(Node *button, const String &layer_name) {
/*
paint_canvas.toggle_lock_layer(layer_name)
highlight_layer(paint_canvas.get_active_layer().name)
*/
}
Ref<PaintCanvasLayer> PaintWindow::add_new_layer() {
/*
var new_layer_button = layer_buttons.get_child(0).duplicate()
new_layer_button.set("custom_styles/panel", layer_buttons.get_child(0).get("custom_styles/panel").duplicate())
layer_buttons.add_child_below_node(
layer_buttons.get_child(layer_buttons.get_child_count() - 1), new_layer_button, true)
_total_added_layers += 1
new_layer_button.find_node("Select").text = "Layer " + str(_total_added_layers)
_layer_button_ref[new_layer_button.name] = new_layer_button
_connect_layer_buttons()
var layer: GELayer = paint_canvas.add_new_layer(new_layer_button.name)
highlight_layer(paint_canvas.get_active_layer().name)
#print("added layer: ", layer.name)
return layer
*/
}
void PaintWindow::remove_active_layer() {
/*
if layer_buttons.get_child_count() <= 1:
return
var layer_name = paint_canvas.active_layer.name
paint_canvas.remove_layer(layer_name)
layer_buttons.remove_child(_layer_button_ref[layer_name])
_layer_button_ref[layer_name].queue_free()
_layer_button_ref.erase(layer_name)
highlight_layer(paint_canvas.get_active_layer().name)
*/
}
void PaintWindow::duplicate_active_layer() {
/*
var new_layer_button = layer_buttons.get_child(0).duplicate()
new_layer_button.set("custom_styles/panel", layer_buttons.get_child(0).get("custom_styles/panel").duplicate())
layer_buttons.add_child_below_node(
layer_buttons.get_child(layer_buttons.get_child_count() - 1), new_layer_button, true)
_total_added_layers += 1 # for keeping track...
new_layer_button.find_node("Select").text = "Layer " + str(_total_added_layers)
var new_layer = paint_canvas.duplicate_layer(paint_canvas.active_layer.name, new_layer_button.name)
new_layer.update_texture()
_layer_button_ref[new_layer.name] = new_layer_button
new_layer_button.find_node("Select").connect("pressed", self, "select_layer", [new_layer_button.name])
new_layer_button.find_node("Visible").connect("pressed", self, "toggle_layer_visibility",
[new_layer_button.find_node("Visible"), new_layer_button.name])
new_layer_button.find_node("Up").connect("pressed", self, "move_down", [new_layer_button])
new_layer_button.find_node("Down").connect("pressed", self, "move_up", [new_layer_button])
new_layer_button.find_node("Lock").connect("pressed", self, "lock_layer", [new_layer_button, new_layer_button.name])
# update highlight
highlight_layer(paint_canvas.get_active_layer().name)
#print("added layer: ", new_layer.name, " (total:", layer_buttons.get_child_count(), ")")
*/
}
void PaintWindow::move_up(Node *layer_btn) {
/*
var new_idx = min(layer_btn.get_index() + 1, layer_buttons.get_child_count())
#print("move_up: ", layer_btn.name, " from ", layer_btn.get_index(), " to ", new_idx)
layer_buttons.move_child(layer_btn, new_idx)
paint_canvas.move_layer_back(layer_btn.name)
*/
}
void PaintWindow::move_down(Node *layer_btn) {
/*
var new_idx = max(layer_btn.get_index() - 1, 0)
#print("move_down: ", layer_btn.name, " from ", layer_btn.get_index(), " to ", new_idx)
layer_buttons.move_child(layer_btn, new_idx)
paint_canvas.move_layer_forward(layer_btn.name)
*/
}
void PaintWindow::_connect_layer_buttons() {
/*
for layer_btn in layer_buttons.get_children():
if layer_btn.find_node("Select").is_connected("pressed", self, "select_layer"):
continue
layer_btn.find_node("Select").connect("pressed", self, "select_layer", [layer_btn.name])
layer_btn.find_node("Visible").connect("pressed", self, "toggle_layer_visibility",
[layer_btn.find_node("Visible"), layer_btn.name])
layer_btn.find_node("Up").connect("pressed", self, "move_down", [layer_btn])
layer_btn.find_node("Down").connect("pressed", self, "move_up", [layer_btn])
layer_btn.find_node("Lock").connect("pressed", self, "lock_layer",
[layer_btn, layer_btn.name])
*/
}
void PaintWindow::_on_Button_pressed() {
/*
add_new_layer()
*/
}
void PaintWindow::_on_PaintCanvasContainer_mouse_entered() {
/*
if mouse_on_top == true:
return
mouse_on_top = true
paint_canvas.tool_layer.clear()
paint_canvas.update()
paint_canvas.tool_layer.update_texture()
*/
}
void PaintWindow::_on_PaintCanvasContainer_mouse_exited() {
/*
if mouse_on_top == false:
return
mouse_on_top = false
paint_canvas.tool_layer.clear()
paint_canvas.update()
paint_canvas.tool_layer.update_texture()
*/
}
void PaintWindow::_on_ColorPicker_popup_closed() {
/*
find_node("Colors").add_color_prefab(find_node("ColorPicker").color)
*/
}
bool PaintWindow::is_position_in_canvas(const Vector2 &pos) {
/*
if Rect2(paint_canvas_container_node.rect_global_position,
paint_canvas_container_node.rect_global_position + paint_canvas_container_node.rect_size).has_point(pos):
return true
return false
*/
}
bool PaintWindow::is_mouse_in_canvas() {
/*
if is_position_in_canvas(get_global_mouse_position()):
return true #mouse_on_top # check if mouse is inside canvas
else:
return false
*/
}
bool PaintWindow::is_any_menu_open() {
/*
return $ChangeCanvasSize.visible or \
$ChangeGridSizeDialog.visible or \
$Settings.visible or \
$LoadFileDialog.visible or \
$SaveFileDialog.visible or \
find_node("Navbar").is_any_menu_open()
*/
}
void PaintWindow::_on_LockAlpha_pressed() {
/*
var checked = find_node("LockAlpha").pressed
paint_canvas.active_layer.toggle_alpha_locked()
for i in range(find_node("Layer").get_popup().get_item_count()):
if find_node("Layer").get_popup().get_item_text(i) == "Toggle Alpha Locked":
find_node("Layer").get_popup().set_item_checked(i, not find_node("Layer").get_popup().is_item_checked(i))
*/
}
void PaintWindow::_on_BrushRect_pressed() {
/*
if brush_mode != Tools.BRUSH:
set_brush(Tools.BRUSH)
selected_brush_prefab = BrushPrefabs.Type.RECT
*/
}
void PaintWindow::_on_BrushCircle_pressed() {
/*
if brush_mode != Tools.BRUSH:
set_brush(Tools.BRUSH)
selected_brush_prefab = BrushPrefabs.Type.CIRCLE
*/
}
void PaintWindow::_on_BrushVLine_pressed() {
/*
if brush_mode != Tools.BRUSH:
set_brush(Tools.BRUSH)
selected_brush_prefab = BrushPrefabs.Type.V_LINE
*/
}
void PaintWindow::_on_BrushHLine_pressed() {
/*
if brush_mode != Tools.BRUSH:
set_brush(Tools.BRUSH)
selected_brush_prefab = BrushPrefabs.Type.H_LINE
*/
}
void PaintWindow::_on_BrushSize_value_changed(float value) {
/*
find_node("BrushSizeLabel").text = str(int(value))
*/
}
void PaintWindow::_on_XSymmetry_pressed() {
/*
paint_canvas.symmetry_x = not paint_canvas.symmetry_x
*/
}
void PaintWindow::_on_YSymmetry_pressed() {
/*
paint_canvas.symmetry_y = not paint_canvas.symmetry_y
*/
}
PaintWindow::PaintWindow() {
/*
var layer_buttons: Control
var paint_canvas_container_node
var paint_canvas: GECanvas
var canvas_background: TextureRect
var grids_node
var colors_grid
var selected_color = Color(1, 1, 1, 1) setget set_selected_color
var util = preload("res://addons/Godoxel/Util.gd")
var textinfo
var allow_drawing = true
var mouse_in_region = false
var mouse_on_top = false
var _middle_mouse_pressed_pos = null
var _middle_mouse_pressed_start_pos = null
var _left_mouse_pressed_start_pos = Vector2()
var _previous_tool
var brush_mode
var _layer_button_ref = {}
var _total_added_layers = 1
var selected_brush_prefab = 0
var _last_drawn_pixel = Vector2.ZERO
var _last_preview_draw_cell_pos = Vector2.ZERO
var _selection_cells = []
var _selection_colors = []
var _cut_pos = Vector2.ZERO
var _cut_size = Vector2.ZERO
var _actions_history = [] # for undo
var _redo_history = []
var _current_action
var _last_mouse_pos_canvas_area = Vector2.ZERO
var _picked_color = false
var mouse_position = Vector2()
var canvas_position = Vector2()
var canvas_mouse_position = Vector2()
var cell_mouse_position = Vector2()
var cell_color = Color()
var last_mouse_position = Vector2()
var last_canvas_position = Vector2()
var last_canvas_mouse_position = Vector2()
var last_cell_mouse_position = Vector2()
var last_cell_color = Color()
const current_layer_highlight = Color(0.354706, 0.497302, 0.769531)
const other_layer_highlight = Color(0.180392, 0.176471, 0.176471)
const locked_layer_highlight = Color(0.098039, 0.094118, 0.094118)
var big_grid_pixels = 4 # 1 grid-box is big_grid_pixels big
#--------------------
#Setup nodes
#--------------------
paint_canvas_container_node = find_node("PaintCanvasContainer")
textinfo = find_node("DebugTextDisplay")
selected_color = find_node("ColorPicker").color
colors_grid = find_node("Colors")
paint_canvas = paint_canvas_container_node.find_node("Canvas")
layer_buttons = find_node("LayerButtons")
canvas_background = find_node("CanvasBackground")
set_process(true)
#--------------------
#connect nodes
#--------------------
if not colors_grid.is_connected("color_change_request", self, "change_color"):
colors_grid.connect("color_change_request", self, "change_color")
if not is_connected("visibility_changed", self, "_on_Editor_visibility_changed"):
connect("visibility_changed", self, "_on_Editor_visibility_changed")
find_node("CanvasBackground").material.set_shader_param(
"pixel_size", 8 * pow(0.5, big_grid_pixels)/paint_canvas.pixel_size)
# ready
set_brush(Tools.PAINT)
_layer_button_ref[layer_buttons.get_child(0).name] = layer_buttons.get_child(0) #ugly
_connect_layer_buttons()
highlight_layer(paint_canvas.get_active_layer().name)
find_node("BrushSizeLabel").text = str(int(find_node("BrushSize").value))
paint_canvas.update()
*/
/*
[gd_scene load_steps=56 format=2]
[ext_resource path="res://addons/Godoxel/Editor.gd" type="Script" id=1]
[ext_resource path="res://addons/Godoxel/dialogs/LoadFileDialog.gd" type="Script" id=2]
[ext_resource path="res://addons/Godoxel/Canvas.gd" type="Script" id=3]
[ext_resource path="res://addons/Godoxel/VisualGrid.tscn" type="PackedScene" id=4]
[ext_resource path="res://addons/Godoxel/CanvasOutline.gd" type="Script" id=5]
[ext_resource path="res://addons/Godoxel/Navbar.gd" type="Script" id=6]
[ext_resource path="res://addons/Godoxel/MenuButtonExtended.gd" type="Script" id=7]
[ext_resource path="res://addons/Godoxel/Colors.gd" type="Script" id=8]
[ext_resource path="res://addons/Godoxel/SaveFileDialog.gd" type="Script" id=9]
[ext_resource path="res://addons/Godoxel/Settings.tscn" type="PackedScene" id=10]
[ext_resource path="res://addons/Godoxel/DebugTextDisplay.gd" type="Script" id=11]
[ext_resource path="res://addons/Godoxel/LayerButton.tscn" type="PackedScene" id=12]
[ext_resource path="res://addons/Godoxel/assets/grid.png" type="Texture" id=13]
[ext_resource path="res://addons/Godoxel/dialogs/ConfirmationDialog.gd" type="Script" id=14]
[ext_resource path="res://addons/Godoxel/dialogs/ChangeGridSizeDialog.gd" type="Script" id=15]
[ext_resource path="res://addons/Godoxel/assets/BrushVLine.png" type="Texture" id=16]
[ext_resource path="res://addons/Godoxel/assets/BrushRect.png" type="Texture" id=17]
[ext_resource path="res://addons/Godoxel/assets/BrushCircle.png" type="Texture" id=18]
[ext_resource path="res://addons/Godoxel/assets/BrushHLine.png" type="Texture" id=19]
[ext_resource path="res://addons/Godoxel/assets/BrushRect_Hovered.png" type="Texture" id=20]
[ext_resource path="res://addons/Godoxel/assets/BrushCircle_Hovered.png" type="Texture" id=21]
[ext_resource path="res://addons/Godoxel/assets/BrushVLine_Hovered.png" type="Texture" id=22]
[ext_resource path="res://addons/Godoxel/assets/BrushHLine_Hovered.png" type="Texture" id=23]
[sub_resource type="StyleBoxFlat" id=7]
bg_color = Color( 0.2, 0.2, 0.2, 1 )
[sub_resource type="StyleBoxFlat" id=33]
bg_color = Color( 0.397716, 0.0538159, 0.114134, 1 )
[sub_resource type="StyleBoxFlat" id=34]
bg_color = Color( 0.989919, 0.990908, 0.315986, 1 )
[sub_resource type="StyleBoxFlat" id=35]
bg_color = Color( 0.563746, 0.536825, 0.218219, 1 )
[sub_resource type="StyleBoxFlat" id=36]
bg_color = Color( 0.336323, 0.0659741, 0.163289, 1 )
[sub_resource type="StyleBoxFlat" id=37]
bg_color = Color( 0.240192, 0.37346, 0.330661, 1 )
[sub_resource type="StyleBoxFlat" id=38]
bg_color = Color( 0.369256, 0.97379, 0.216537, 1 )
[sub_resource type="StyleBoxFlat" id=39]
bg_color = Color( 0.755049, 0.491349, 0.826652, 1 )
[sub_resource type="StyleBoxFlat" id=40]
bg_color = Color( 0.848742, 0.0115273, 0.122094, 1 )
[sub_resource type="StyleBoxFlat" id=41]
bg_color = Color( 0.920589, 0.44931, 0.150271, 1 )
[sub_resource type="StyleBoxFlat" id=42]
bg_color = Color( 0.325517, 0.694568, 0.703849, 1 )
[sub_resource type="StyleBoxFlat" id=43]
bg_color = Color( 0.926427, 0.334865, 0.471709, 1 )
[sub_resource type="StyleBoxFlat" id=44]
bg_color = Color( 0.00867083, 0.188914, 0.300704, 1 )
[sub_resource type="StyleBoxFlat" id=45]
bg_color = Color( 0.501144, 0.687167, 0.52919, 1 )
[sub_resource type="StyleBoxFlat" id=46]
bg_color = Color( 0.953225, 0.374313, 0.443307, 1 )
[sub_resource type="StyleBoxFlat" id=47]
bg_color = Color( 0.0121565, 0.599621, 0.868357, 1 )
[sub_resource type="StyleBoxFlat" id=48]
bg_color = Color( 0.245633, 0.583044, 0.20955, 1 )
[sub_resource type="StyleBoxFlat" id=49]
bg_color = Color( 0.510868, 0.721501, 0.544154, 1 )
[sub_resource type="StyleBoxFlat" id=50]
bg_color = Color( 0.786819, 0.162435, 0.309762, 1 )
[sub_resource type="StyleBoxFlat" id=51]
bg_color = Color( 0.772837, 0.467272, 0.0682784, 1 )
[sub_resource type="StyleBoxFlat" id=52]
bg_color = Color( 0.753402, 0.362869, 0.343818, 1 )
[sub_resource type="StyleBoxFlat" id=53]
bg_color = Color( 0.0699588, 0.589297, 0.290648, 1 )
[sub_resource type="StyleBoxFlat" id=54]
bg_color = Color( 0.443224, 0.249702, 0.838284, 1 )
[sub_resource type="StyleBoxFlat" id=55]
bg_color = Color( 0.660357, 0.11075, 0.876227, 1 )
[sub_resource type="StyleBoxFlat" id=56]
bg_color = Color( 0.296861, 0.400053, 0.915836, 1 )
[sub_resource type="Shader" id=1]
code = "shader_type canvas_item;
uniform float pixel_size : hint_range(0.01, 1.0);
void fragment() {
vec4 color = texture(TEXTURE, UV);
float light = 0.8;
float dark = 0.4;
float val = dark;
if ( int(UV.y * 8.0 * pixel_size) % 2 == 1 ) {
if ( int(UV.x * 8.0 * pixel_size) % 2 == 1 ) {
val = dark;
}
else {
val = light;
}
}
else {
if ( int(UV.x * 8.0 * pixel_size) % 2 == 1 ) {
val = light;
}
else {
val = dark;
}
}
color.rgb = vec3(val, val, val);
COLOR = color;
}"
[sub_resource type="ShaderMaterial" id=2]
shader = SubResource( 1 )
shader_param/pixel_size = 0.125
[sub_resource type="Image" id=57]
data = {
"data": PoolByteArray( 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255
"format": "RGBA8",
"height": 64,
"mipmaps": false,
"width": 64
}
[sub_resource type="ImageTexture" id=58]
flags = 0
flags = 0
image = SubResource( 57 )
size = Vector2( 64, 64 )
[sub_resource type="Image" id=59]
data = {
"data": PoolByteArray( 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255
"format": "RGBA8",
"height": 64,
"mipmaps": false,
"width": 64
}
[sub_resource type="ImageTexture" id=60]
flags = 0
flags = 0
image = SubResource( 59 )
size = Vector2( 64, 64 )
[sub_resource type="StyleBoxFlat" id=32]
bg_color = Color( 0.156863, 0.156863, 0.156863, 1 )
border_width_top = 2
border_color = Color( 0.0901961, 0.0901961, 0.0901961, 1 )
[node name="Editor" type="Control"]
anchor_right = 1.0
anchor_bottom = 1.0
rect_clip_content = true
size_flags_horizontal = 3
size_flags_vertical = 3
script = ExtResource( 1 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="Panel" type="Panel" parent="."]
anchor_right = 1.0
anchor_bottom = 1.0
__meta__ = {
"_edit_use_anchors_": false
}
[node name="NoBCViewportsnotworking26181" type="VBoxContainer" parent="Panel"]
anchor_right = 1.0
anchor_bottom = 1.0
__meta__ = {
"_edit_lock_": true,
"_editor_description_": "https://github.com/godotengine/godot/issues/26181"
}
[node name="Navbar" type="HBoxContainer" parent="Panel/NoBCViewportsnotworking26181"]
margin_right = 1024.0
margin_bottom = 20.0
size_flags_horizontal = 3
script = ExtResource( 6 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="Buttons" type="HBoxContainer" parent="Panel/NoBCViewportsnotworking26181/Navbar"]
margin_right = 430.0
margin_bottom = 20.0
custom_constants/separation = 20
__meta__ = {
"_edit_use_anchors_": true
}
[node name="File" type="MenuButton" parent="Panel/NoBCViewportsnotworking26181/Navbar/Buttons"]
margin_right = 35.0
margin_bottom = 20.0
size_flags_horizontal = 3
size_flags_vertical = 3
text = "File"
flat = false
items = [ "New", null, 0, false, false, 0, 0, null, "", false, "Save", null, 0, false, false, 1, 0, null, "", false, "Load", null, 0, false, false, 2, 0, null, "", false ]
switch_on_hover = true
script = ExtResource( 7 )
[node name="Edit" type="MenuButton" parent="Panel/NoBCViewportsnotworking26181/Navbar/Buttons"]
margin_left = 55.0
margin_right = 91.0
margin_bottom = 20.0
size_flags_horizontal = 3
size_flags_vertical = 3
disabled = true
text = "Edit"
flat = false
items = [ "Undo", null, 0, false, false, 0, 0, null, "", false, "Redo", null, 0, false, false, 1, 0, null, "", false, "Cut", null, 0, false, false, 2, 0, null, "", false, "Copy", null, 0, false, false, 3, 0, null, "", false, "Paste", null, 0, false, false, 4, 0, null, "", false ]
switch_on_hover = true
script = ExtResource( 7 )
[node name="Canvas" type="MenuButton" parent="Panel/NoBCViewportsnotworking26181/Navbar/Buttons"]
margin_left = 111.0
margin_right = 167.0
margin_bottom = 20.0
size_flags_horizontal = 3
size_flags_vertical = 3
text = "Canvas"
flat = false
items = [ "Change Size", null, 0, false, false, 0, 0, null, "", false, "Crop To Content", null, 0, false, true, 1, 0, null, "", false ]
switch_on_hover = true
script = ExtResource( 7 )
[node name="Layer" type="MenuButton" parent="Panel/NoBCViewportsnotworking26181/Navbar/Buttons"]
margin_left = 187.0
margin_right = 233.0
margin_bottom = 20.0
size_flags_horizontal = 3
size_flags_vertical = 3
text = "Layer"
flat = false
items = [ "Add Layer", null, 0, false, false, 0, 0, null, "", false, "Delete Layer", null, 0, false, false, 1, 0, null, "", false, "Duplicate Layer", null, 0, false, false, 2, 0, null, "", false, "Clear Layer", null, 0, false, false, 3, 0, null, "", false, "", null, 0, false, false, 4, 0, null, "", true, "Toggle Alpha Locked", null, 1, false, false, 5, 0, null, "", false ]
switch_on_hover = true
script = ExtResource( 7 )
[node name="Grid" type="MenuButton" parent="Panel/NoBCViewportsnotworking26181/Navbar/Buttons"]
margin_left = 253.0
margin_right = 292.0
margin_bottom = 20.0
size_flags_horizontal = 3
size_flags_vertical = 3
text = "Grid"
flat = false
items = [ "Toggle Grid", null, 0, false, false, 0, 0, null, "", false, "Change Grid Size", null, 0, false, false, 1, 0, null, "", false ]
switch_on_hover = true
script = ExtResource( 7 )
[node name="Magic" type="MenuButton" parent="Panel/NoBCViewportsnotworking26181/Navbar/Buttons"]
margin_left = 312.0
margin_right = 361.0
margin_bottom = 20.0
size_flags_horizontal = 3
size_flags_vertical = 3
text = "Magic"
flat = false
items = [ "ChangeSingleColor", null, 0, false, false, 0, 0, null, "", false, "ChangeColorRange", null, 0, false, false, 1, 0, null, "", false, "HSV Noise", null, 0, false, false, 2, 0, null, "", false, "HSV Color Modulation", null, 0, false, false, 3, 0, null, "", false ]
switch_on_hover = true
script = ExtResource( 7 )
[node name="Editor" type="MenuButton" parent="Panel/NoBCViewportsnotworking26181/Navbar/Buttons"]
margin_left = 381.0
margin_right = 430.0
margin_bottom = 20.0
size_flags_horizontal = 3
size_flags_vertical = 3
text = "Editor"
flat = false
items = [ "Settings", null, 0, false, false, 0, 0, null, "", false ]
switch_on_hover = true
script = ExtResource( 7 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="Control" type="Control" parent="Panel/NoBCViewportsnotworking26181/Navbar"]
margin_left = 434.0
margin_right = 907.0
margin_bottom = 20.0
size_flags_horizontal = 3
[node name="Label" type="Label" parent="Panel/NoBCViewportsnotworking26181/Navbar"]
modulate = Color( 1, 1, 1, 0.184314 )
margin_left = 911.0
margin_top = 3.0
margin_right = 1024.0
margin_bottom = 17.0
text = "Undo (Z) Redo (Y)"
align = 1
valign = 1
__meta__ = {
"_edit_use_anchors_": false
}
[node name="Control" type="HBoxContainer" parent="Panel/NoBCViewportsnotworking26181"]
margin_top = 24.0
margin_right = 1024.0
margin_bottom = 556.0
size_flags_horizontal = 3
size_flags_vertical = 3
[node name="LeftPanel" type="PanelContainer" parent="Panel/NoBCViewportsnotworking26181/Control"]
margin_right = 157.0
margin_bottom = 532.0
size_flags_horizontal = 3
size_flags_vertical = 3
custom_styles/panel = SubResource( 7 )
__meta__ = {
"_editor_description_": ""
}
[node name="MarginContainer" type="MarginContainer" parent="Panel/NoBCViewportsnotworking26181/Control/LeftPanel"]
margin_right = 157.0
margin_bottom = 532.0
__meta__ = {
"_edit_use_anchors_": false
}
[node name="VBoxContainer" type="VBoxContainer" parent="Panel/NoBCViewportsnotworking26181/Control/LeftPanel/MarginContainer"]
margin_right = 157.0
margin_bottom = 532.0
custom_constants/separation = 12
__meta__ = {
"_edit_use_anchors_": false
}
[node name="ScrollContainer" type="ScrollContainer" parent="Panel/NoBCViewportsnotworking26181/Control/LeftPanel/MarginContainer/VBoxContainer"]
margin_right = 157.0
margin_bottom = 144.0
rect_min_size = Vector2( 0, 144 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="Colors" type="GridContainer" parent="Panel/NoBCViewportsnotworking26181/Control/LeftPanel/MarginContainer/VBoxContainer/ScrollContainer"]
margin_right = 145.0
margin_bottom = 170.0
rect_min_size = Vector2( 0, 144 )
size_flags_horizontal = 3
size_flags_vertical = 3
columns = 4
script = ExtResource( 8 )
[node name="Button1" type="Button" parent="Panel/NoBCViewportsnotworking26181/Control/LeftPanel/MarginContainer/VBoxContainer/ScrollContainer/Colors"]
margin_right = 33.0
margin_bottom = 25.0
rect_min_size = Vector2( 25, 25 )
size_flags_horizontal = 3
size_flags_vertical = 3
custom_styles/normal = SubResource( 33 )
[node name="Button2" type="Button" parent="Panel/NoBCViewportsnotworking26181/Control/LeftPanel/MarginContainer/VBoxContainer/ScrollContainer/Colors"]
margin_left = 37.0
margin_right = 70.0
margin_bottom = 25.0
rect_min_size = Vector2( 25, 25 )
size_flags_horizontal = 3
size_flags_vertical = 3
custom_styles/normal = SubResource( 34 )
[node name="Button3" type="Button" parent="Panel/NoBCViewportsnotworking26181/Control/LeftPanel/MarginContainer/VBoxContainer/ScrollContainer/Colors"]
margin_left = 74.0
margin_right = 107.0
margin_bottom = 25.0
rect_min_size = Vector2( 25, 25 )
size_flags_horizontal = 3
size_flags_vertical = 3
custom_styles/normal = SubResource( 35 )
[node name="Button4" type="Button" parent="Panel/NoBCViewportsnotworking26181/Control/LeftPanel/MarginContainer/VBoxContainer/ScrollContainer/Colors"]
margin_left = 111.0
margin_right = 144.0
margin_bottom = 25.0
rect_min_size = Vector2( 25, 25 )
size_flags_horizontal = 3
size_flags_vertical = 3
custom_styles/normal = SubResource( 36 )
[node name="Button5" type="Button" parent="Panel/NoBCViewportsnotworking26181/Control/LeftPanel/MarginContainer/VBoxContainer/ScrollContainer/Colors"]
margin_top = 29.0
margin_right = 33.0
margin_bottom = 54.0
rect_min_size = Vector2( 25, 25 )
size_flags_horizontal = 3
size_flags_vertical = 3
custom_styles/normal = SubResource( 37 )
[node name="Button6" type="Button" parent="Panel/NoBCViewportsnotworking26181/Control/LeftPanel/MarginContainer/VBoxContainer/ScrollContainer/Colors"]
margin_left = 37.0
margin_top = 29.0
margin_right = 70.0
margin_bottom = 54.0
rect_min_size = Vector2( 25, 25 )
size_flags_horizontal = 3
size_flags_vertical = 3
custom_styles/normal = SubResource( 38 )
[node name="Button7" type="Button" parent="Panel/NoBCViewportsnotworking26181/Control/LeftPanel/MarginContainer/VBoxContainer/ScrollContainer/Colors"]
margin_left = 74.0
margin_top = 29.0
margin_right = 107.0
margin_bottom = 54.0
rect_min_size = Vector2( 25, 25 )
size_flags_horizontal = 3
size_flags_vertical = 3
custom_styles/normal = SubResource( 39 )
[node name="Button8" type="Button" parent="Panel/NoBCViewportsnotworking26181/Control/LeftPanel/MarginContainer/VBoxContainer/ScrollContainer/Colors"]
margin_left = 111.0
margin_top = 29.0
margin_right = 144.0
margin_bottom = 54.0
rect_min_size = Vector2( 25, 25 )
size_flags_horizontal = 3
size_flags_vertical = 3
custom_styles/normal = SubResource( 40 )
[node name="Button9" type="Button" parent="Panel/NoBCViewportsnotworking26181/Control/LeftPanel/MarginContainer/VBoxContainer/ScrollContainer/Colors"]
margin_top = 58.0
margin_right = 33.0
margin_bottom = 83.0
rect_min_size = Vector2( 25, 25 )
size_flags_horizontal = 3
size_flags_vertical = 3
custom_styles/normal = SubResource( 41 )
[node name="Button10" type="Button" parent="Panel/NoBCViewportsnotworking26181/Control/LeftPanel/MarginContainer/VBoxContainer/ScrollContainer/Colors"]
margin_left = 37.0
margin_top = 58.0
margin_right = 70.0
margin_bottom = 83.0
rect_min_size = Vector2( 25, 25 )
size_flags_horizontal = 3
size_flags_vertical = 3
custom_styles/normal = SubResource( 42 )
[node name="Button11" type="Button" parent="Panel/NoBCViewportsnotworking26181/Control/LeftPanel/MarginContainer/VBoxContainer/ScrollContainer/Colors"]
margin_left = 74.0
margin_top = 58.0
margin_right = 107.0
margin_bottom = 83.0
rect_min_size = Vector2( 25, 25 )
size_flags_horizontal = 3
size_flags_vertical = 3
custom_styles/normal = SubResource( 43 )
[node name="Button12" type="Button" parent="Panel/NoBCViewportsnotworking26181/Control/LeftPanel/MarginContainer/VBoxContainer/ScrollContainer/Colors"]
margin_left = 111.0
margin_top = 58.0
margin_right = 144.0
margin_bottom = 83.0
rect_min_size = Vector2( 25, 25 )
size_flags_horizontal = 3
size_flags_vertical = 3
custom_styles/normal = SubResource( 44 )
[node name="Button13" type="Button" parent="Panel/NoBCViewportsnotworking26181/Control/LeftPanel/MarginContainer/VBoxContainer/ScrollContainer/Colors"]
margin_top = 87.0
margin_right = 33.0
margin_bottom = 112.0
rect_min_size = Vector2( 25, 25 )
size_flags_horizontal = 3
size_flags_vertical = 3
custom_styles/normal = SubResource( 45 )
[node name="Button14" type="Button" parent="Panel/NoBCViewportsnotworking26181/Control/LeftPanel/MarginContainer/VBoxContainer/ScrollContainer/Colors"]
margin_left = 37.0
margin_top = 87.0
margin_right = 70.0
margin_bottom = 112.0
rect_min_size = Vector2( 25, 25 )
size_flags_horizontal = 3
size_flags_vertical = 3
custom_styles/normal = SubResource( 46 )
[node name="Button15" type="Button" parent="Panel/NoBCViewportsnotworking26181/Control/LeftPanel/MarginContainer/VBoxContainer/ScrollContainer/Colors"]
margin_left = 74.0
margin_top = 87.0
margin_right = 107.0
margin_bottom = 112.0
rect_min_size = Vector2( 25, 25 )
size_flags_horizontal = 3
size_flags_vertical = 3
custom_styles/normal = SubResource( 47 )
[node name="Button16" type="Button" parent="Panel/NoBCViewportsnotworking26181/Control/LeftPanel/MarginContainer/VBoxContainer/ScrollContainer/Colors"]
margin_left = 111.0
margin_top = 87.0
margin_right = 144.0
margin_bottom = 112.0
rect_min_size = Vector2( 25, 25 )
size_flags_horizontal = 3
size_flags_vertical = 3
custom_styles/normal = SubResource( 48 )
[node name="Button17" type="Button" parent="Panel/NoBCViewportsnotworking26181/Control/LeftPanel/MarginContainer/VBoxContainer/ScrollContainer/Colors"]
margin_top = 116.0
margin_right = 33.0
margin_bottom = 141.0
rect_min_size = Vector2( 25, 25 )
size_flags_horizontal = 3
size_flags_vertical = 3
custom_styles/normal = SubResource( 49 )
[node name="Button18" type="Button" parent="Panel/NoBCViewportsnotworking26181/Control/LeftPanel/MarginContainer/VBoxContainer/ScrollContainer/Colors"]
margin_left = 37.0
margin_top = 116.0
margin_right = 70.0
margin_bottom = 141.0
rect_min_size = Vector2( 25, 25 )
size_flags_horizontal = 3
size_flags_vertical = 3
custom_styles/normal = SubResource( 50 )
[node name="Button19" type="Button" parent="Panel/NoBCViewportsnotworking26181/Control/LeftPanel/MarginContainer/VBoxContainer/ScrollContainer/Colors"]
margin_left = 74.0
margin_top = 116.0
margin_right = 107.0
margin_bottom = 141.0
rect_min_size = Vector2( 25, 25 )
size_flags_horizontal = 3
size_flags_vertical = 3
custom_styles/normal = SubResource( 51 )
[node name="Button20" type="Button" parent="Panel/NoBCViewportsnotworking26181/Control/LeftPanel/MarginContainer/VBoxContainer/ScrollContainer/Colors"]
margin_left = 111.0
margin_top = 116.0
margin_right = 144.0
margin_bottom = 141.0
rect_min_size = Vector2( 25, 25 )
size_flags_horizontal = 3
size_flags_vertical = 3
custom_styles/normal = SubResource( 52 )
[node name="Button21" type="Button" parent="Panel/NoBCViewportsnotworking26181/Control/LeftPanel/MarginContainer/VBoxContainer/ScrollContainer/Colors"]
margin_top = 145.0
margin_right = 33.0
margin_bottom = 170.0
rect_min_size = Vector2( 25, 25 )
size_flags_horizontal = 3
size_flags_vertical = 3
custom_styles/normal = SubResource( 53 )
[node name="Button22" type="Button" parent="Panel/NoBCViewportsnotworking26181/Control/LeftPanel/MarginContainer/VBoxContainer/ScrollContainer/Colors"]
margin_left = 37.0
margin_top = 145.0
margin_right = 70.0
margin_bottom = 170.0
rect_min_size = Vector2( 25, 25 )
size_flags_horizontal = 3
size_flags_vertical = 3
custom_styles/normal = SubResource( 54 )
[node name="Button23" type="Button" parent="Panel/NoBCViewportsnotworking26181/Control/LeftPanel/MarginContainer/VBoxContainer/ScrollContainer/Colors"]
margin_left = 74.0
margin_top = 145.0
margin_right = 107.0
margin_bottom = 170.0
rect_min_size = Vector2( 25, 25 )
size_flags_horizontal = 3
size_flags_vertical = 3
custom_styles/normal = SubResource( 55 )
[node name="Button24" type="Button" parent="Panel/NoBCViewportsnotworking26181/Control/LeftPanel/MarginContainer/VBoxContainer/ScrollContainer/Colors"]
margin_left = 111.0
margin_top = 145.0
margin_right = 144.0
margin_bottom = 170.0
rect_min_size = Vector2( 25, 25 )
size_flags_horizontal = 3
size_flags_vertical = 3
custom_styles/normal = SubResource( 56 )
[node name="VBoxContainer" type="VBoxContainer" parent="Panel/NoBCViewportsnotworking26181/Control/LeftPanel/MarginContainer/VBoxContainer"]
margin_top = 156.0
margin_right = 157.0
margin_bottom = 196.0
[node name="LockAlpha" type="CheckButton" parent="Panel/NoBCViewportsnotworking26181/Control/LeftPanel/MarginContainer/VBoxContainer/VBoxContainer"]
margin_right = 157.0
margin_bottom = 40.0
text = "Lock Alpha"
align = 2
[node name="BrushSelection" type="GridContainer" parent="Panel/NoBCViewportsnotworking26181/Control/LeftPanel/MarginContainer/VBoxContainer"]
margin_top = 208.0
margin_right = 157.0
margin_bottom = 233.0
columns = 4
[node name="BrushRect" type="TextureButton" parent="Panel/NoBCViewportsnotworking26181/Control/LeftPanel/MarginContainer/VBoxContainer/BrushSelection"]
margin_right = 25.0
margin_bottom = 25.0
rect_min_size = Vector2( 25, 25 )
texture_normal = ExtResource( 17 )
texture_hover = ExtResource( 20 )
[node name="BrushCircle" type="TextureButton" parent="Panel/NoBCViewportsnotworking26181/Control/LeftPanel/MarginContainer/VBoxContainer/BrushSelection"]
margin_left = 29.0
margin_right = 54.0
margin_bottom = 25.0
rect_min_size = Vector2( 25, 25 )
texture_normal = ExtResource( 18 )
texture_hover = ExtResource( 21 )
[node name="BrushVLine" type="TextureButton" parent="Panel/NoBCViewportsnotworking26181/Control/LeftPanel/MarginContainer/VBoxContainer/BrushSelection"]
margin_left = 58.0
margin_right = 83.0
margin_bottom = 25.0
rect_min_size = Vector2( 25, 25 )
texture_normal = ExtResource( 16 )
texture_hover = ExtResource( 22 )
[node name="BrushHLine" type="TextureButton" parent="Panel/NoBCViewportsnotworking26181/Control/LeftPanel/MarginContainer/VBoxContainer/BrushSelection"]
margin_left = 87.0
margin_right = 112.0
margin_bottom = 25.0
rect_min_size = Vector2( 25, 25 )
texture_normal = ExtResource( 19 )
texture_hover = ExtResource( 23 )
[node name="VSplitContainer" type="VBoxContainer" parent="Panel/NoBCViewportsnotworking26181/Control/LeftPanel/MarginContainer/VBoxContainer"]
margin_top = 245.0
margin_right = 157.0
margin_bottom = 279.0
size_flags_horizontal = 3
[node name="BrushLabel" type="Label" parent="Panel/NoBCViewportsnotworking26181/Control/LeftPanel/MarginContainer/VBoxContainer/VSplitContainer"]
margin_right = 157.0
margin_bottom = 14.0
text = "Brush Size"
[node name="HBoxContainer" type="HBoxContainer" parent="Panel/NoBCViewportsnotworking26181/Control/LeftPanel/MarginContainer/VBoxContainer/VSplitContainer"]
margin_top = 18.0
margin_right = 157.0
margin_bottom = 34.0
[node name="BrushSizeLabel" type="Label" parent="Panel/NoBCViewportsnotworking26181/Control/LeftPanel/MarginContainer/VBoxContainer/VSplitContainer/HBoxContainer"]
margin_top = 1.0
margin_right = 30.0
margin_bottom = 15.0
rect_min_size = Vector2( 30, 0 )
text = "1"
[node name="BrushSize" type="HSlider" parent="Panel/NoBCViewportsnotworking26181/Control/LeftPanel/MarginContainer/VBoxContainer/VSplitContainer/HBoxContainer"]
margin_left = 34.0
margin_right = 157.0
margin_bottom = 16.0
size_flags_horizontal = 3
size_flags_vertical = 2
min_value = 1.0
value = 1.0
[node name="XSymmetry" type="CheckButton" parent="Panel/NoBCViewportsnotworking26181/Control/LeftPanel/MarginContainer/VBoxContainer"]
margin_top = 291.0
margin_right = 157.0
margin_bottom = 331.0
text = "X Symmetry"
[node name="YSymmetry" type="CheckButton" parent="Panel/NoBCViewportsnotworking26181/Control/LeftPanel/MarginContainer/VBoxContainer"]
margin_top = 343.0
margin_right = 157.0
margin_bottom = 383.0
text = "Y Symmetry"
[node name="PaintCanvasContainer" type="Control" parent="Panel/NoBCViewportsnotworking26181/Control"]
margin_left = 161.0
margin_right = 897.0
margin_bottom = 532.0
rect_clip_content = true
focus_mode = 1
mouse_filter = 1
size_flags_horizontal = 3
size_flags_vertical = 3
size_flags_stretch_ratio = 6.0
__meta__ = {
"_edit_use_anchors_": true
}
[node name="Canvas" type="Control" parent="Panel/NoBCViewportsnotworking26181/Control/PaintCanvasContainer"]
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
margin_left = -124.252
margin_top = -118.205
margin_right = 131.748
margin_bottom = 137.795
mouse_filter = 1
size_flags_horizontal = 3
size_flags_vertical = 3
script = ExtResource( 3 )
__meta__ = {
"_edit_group_": true,
"_edit_use_anchors_": false
}
pixel_size = 4
canvas_width = 64
canvas_height = 64
grid_size = 1
big_grid_size = 8
[node name="CanvasBackground" type="TextureRect" parent="Panel/NoBCViewportsnotworking26181/Control/PaintCanvasContainer/Canvas"]
show_behind_parent = true
material = SubResource( 2 )
anchor_right = 1.0
anchor_bottom = 1.0
texture = ExtResource( 13 )
expand = true
stretch_mode = 2
__meta__ = {
"_edit_lock_": true
}
[node name="CanvasLayers" type="Control" parent="Panel/NoBCViewportsnotworking26181/Control/PaintCanvasContainer/Canvas"]
anchor_right = 1.0
anchor_bottom = 1.0
mouse_filter = 2
__meta__ = {
"_edit_lock_": true,
"_edit_use_anchors_": false
}
[node name="PreviewLayer" type="TextureRect" parent="Panel/NoBCViewportsnotworking26181/Control/PaintCanvasContainer/Canvas"]
anchor_right = 1.0
anchor_bottom = 1.0
mouse_filter = 2
texture = SubResource( 58 )
expand = true
__meta__ = {
"_edit_use_anchors_": false
}
[node name="ToolPreviewLayer" type="TextureRect" parent="Panel/NoBCViewportsnotworking26181/Control/PaintCanvasContainer/Canvas"]
anchor_right = 1.0
anchor_bottom = 1.0
mouse_filter = 2
texture = SubResource( 60 )
expand = true
__meta__ = {
"_edit_use_anchors_": false
}
[node name="Grid" parent="Panel/NoBCViewportsnotworking26181/Control/PaintCanvasContainer/Canvas" instance=ExtResource( 4 )]
mouse_filter = 2
color = Color( 1, 1, 1, 0.415686 )
size = 4
[node name="CanvasOutline" type="Control" parent="Panel/NoBCViewportsnotworking26181/Control/PaintCanvasContainer/Canvas"]
anchor_right = 1.0
anchor_bottom = 1.0
mouse_filter = 2
script = ExtResource( 5 )
__meta__ = {
"_edit_lock_": true,
"_edit_use_anchors_": false
}
color = Color( 0, 1, 0, 1 )
[node name="RightPanel" type="PanelContainer" parent="Panel/NoBCViewportsnotworking26181/Control"]
margin_left = 901.0
margin_right = 1024.0
margin_bottom = 532.0
size_flags_horizontal = 3
size_flags_vertical = 3
custom_styles/panel = SubResource( 7 )
[node name="ScrollContainer" type="ScrollContainer" parent="Panel/NoBCViewportsnotworking26181/Control/RightPanel"]
margin_right = 123.0
margin_bottom = 532.0
size_flags_horizontal = 3
size_flags_vertical = 3
__meta__ = {
"_edit_use_anchors_": false
}
[node name="ToolMenu" type="VBoxContainer" parent="Panel/NoBCViewportsnotworking26181/Control/RightPanel/ScrollContainer"]
margin_right = 123.0
margin_bottom = 532.0
size_flags_horizontal = 3
size_flags_vertical = 3
[node name="Tools" type="VBoxContainer" parent="Panel/NoBCViewportsnotworking26181/Control/RightPanel/ScrollContainer/ToolMenu"]
margin_right = 123.0
margin_bottom = 236.0
size_flags_horizontal = 3
[node name="PaintTool" type="Button" parent="Panel/NoBCViewportsnotworking26181/Control/RightPanel/ScrollContainer/ToolMenu/Tools"]
margin_right = 123.0
margin_bottom = 20.0
size_flags_horizontal = 3
size_flags_vertical = 3
text = "Pencil (Q)"
[node name="BrushTool" type="Button" parent="Panel/NoBCViewportsnotworking26181/Control/RightPanel/ScrollContainer/ToolMenu/Tools"]
visible = false
margin_top = 24.0
margin_right = 132.0
margin_bottom = 44.0
size_flags_horizontal = 3
size_flags_vertical = 3
text = "Brush"
[node name="MultiTool" type="Button" parent="Panel/NoBCViewportsnotworking26181/Control/RightPanel/ScrollContainer/ToolMenu/Tools"]
visible = false
margin_top = 24.0
margin_right = 132.0
margin_bottom = 44.0
size_flags_horizontal = 3
size_flags_vertical = 3
text = "Polygon"
__meta__ = {
"_edit_use_anchors_": false
}
[node name="BucketTool" type="Button" parent="Panel/NoBCViewportsnotworking26181/Control/RightPanel/ScrollContainer/ToolMenu/Tools"]
margin_top = 24.0
margin_right = 123.0
margin_bottom = 44.0
size_flags_horizontal = 3
size_flags_vertical = 3
text = "Bucket Fill (F)"
__meta__ = {
"_edit_use_anchors_": false
}
[node name="RainbowTool" type="Button" parent="Panel/NoBCViewportsnotworking26181/Control/RightPanel/ScrollContainer/ToolMenu/Tools"]
margin_top = 48.0
margin_right = 123.0
margin_bottom = 68.0
size_flags_horizontal = 3
size_flags_vertical = 3
text = "Rainbow (R)"
__meta__ = {
"_edit_use_anchors_": false
}
[node name="LineTool" type="Button" parent="Panel/NoBCViewportsnotworking26181/Control/RightPanel/ScrollContainer/ToolMenu/Tools"]
margin_top = 72.0
margin_right = 123.0
margin_bottom = 92.0
size_flags_horizontal = 3
size_flags_vertical = 3
text = "Line (L)"
__meta__ = {
"_edit_use_anchors_": false
}
[node name="RectTool" type="Button" parent="Panel/NoBCViewportsnotworking26181/Control/RightPanel/ScrollContainer/ToolMenu/Tools"]
margin_top = 96.0
margin_right = 123.0
margin_bottom = 116.0
size_flags_horizontal = 3
size_flags_vertical = 3
text = "Rectangle"
__meta__ = {
"_edit_use_anchors_": false
}
[node name="DarkenTool" type="Button" parent="Panel/NoBCViewportsnotworking26181/Control/RightPanel/ScrollContainer/ToolMenu/Tools"]
margin_top = 120.0
margin_right = 123.0
margin_bottom = 140.0
size_flags_horizontal = 3
size_flags_vertical = 3
text = "Darken (D)"
__meta__ = {
"_edit_use_anchors_": false
}
[node name="BrightenTool" type="Button" parent="Panel/NoBCViewportsnotworking26181/Control/RightPanel/ScrollContainer/ToolMenu/Tools"]
margin_top = 144.0
margin_right = 123.0
margin_bottom = 164.0
size_flags_horizontal = 3
size_flags_vertical = 3
text = "Brighten (B)"
__meta__ = {
"_edit_use_anchors_": false
}
[node name="ColorPickerTool" type="Button" parent="Panel/NoBCViewportsnotworking26181/Control/RightPanel/ScrollContainer/ToolMenu/Tools"]
margin_top = 168.0
margin_right = 123.0
margin_bottom = 188.0
size_flags_horizontal = 3
size_flags_vertical = 3
text = "Color Picker (P)"
__meta__ = {
"_edit_use_anchors_": false
}
[node name="CutTool" type="Button" parent="Panel/NoBCViewportsnotworking26181/Control/RightPanel/ScrollContainer/ToolMenu/Tools"]
margin_top = 192.0
margin_right = 123.0
margin_bottom = 212.0
size_flags_horizontal = 3
size_flags_vertical = 3
text = "Cut Section (C)"
__meta__ = {
"_edit_use_anchors_": false
}
[node name="ColorPicker" type="ColorPickerButton" parent="Panel/NoBCViewportsnotworking26181/Control/RightPanel/ScrollContainer/ToolMenu/Tools"]
margin_top = 216.0
margin_right = 123.0
margin_bottom = 236.0
size_flags_horizontal = 3
size_flags_vertical = 3
__meta__ = {
"_edit_use_anchors_": false
}
[node name="Control" type="ScrollContainer" parent="Panel/NoBCViewportsnotworking26181/Control/RightPanel/ScrollContainer/ToolMenu"]
margin_top = 240.0
margin_right = 123.0
margin_bottom = 532.0
size_flags_vertical = 3
[node name="VBoxContainer" type="VBoxContainer" parent="Panel/NoBCViewportsnotworking26181/Control/RightPanel/ScrollContainer/ToolMenu/Control"]
margin_right = 123.0
margin_bottom = 292.0
size_flags_horizontal = 3
size_flags_vertical = 3
[node name="LayerButtons" type="VBoxContainer" parent="Panel/NoBCViewportsnotworking26181/Control/RightPanel/ScrollContainer/ToolMenu/Control/VBoxContainer"]
margin_right = 123.0
margin_bottom = 263.0
size_flags_horizontal = 3
size_flags_vertical = 3
__meta__ = {
"_edit_use_anchors_": false
}
[node name="Layer1" parent="Panel/NoBCViewportsnotworking26181/Control/RightPanel/ScrollContainer/ToolMenu/Control/VBoxContainer/LayerButtons" instance=ExtResource( 12 )]
anchor_right = 0.0
anchor_bottom = 0.0
margin_right = 123.0
margin_bottom = 32.0
[node name="Button" type="Button" parent="Panel/NoBCViewportsnotworking26181/Control/RightPanel/ScrollContainer/ToolMenu/Control/VBoxContainer"]
margin_top = 267.0
margin_right = 123.0
margin_bottom = 292.0
rect_min_size = Vector2( 0, 25 )
size_flags_horizontal = 3
text = "+"
__meta__ = {
"_edit_use_anchors_": false
}
[node name="BottomPanel" type="Panel" parent="Panel/NoBCViewportsnotworking26181"]
margin_top = 560.0
margin_right = 1024.0
margin_bottom = 600.0
rect_min_size = Vector2( 0, 40 )
size_flags_horizontal = 3
custom_styles/panel = SubResource( 32 )
__meta__ = {
"_edit_group_": true,
"_edit_use_anchors_": true
}
[node name="DebugTextDisplay" type="RichTextLabel" parent="Panel/NoBCViewportsnotworking26181/BottomPanel"]
anchor_right = 1.0
anchor_bottom = 1.0
text = "FPS 58 Mouse Position (1122.090332, 370.304382) Canvas Mouse Position (717.342346, 198.509415) Canvas Position (404.747986, 171.794968)
Cell Position (0, 0) Cell Color 0,0,0,0 "
scroll_active = false
script = ExtResource( 11 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="SaveFileDialog" type="FileDialog" parent="."]
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
margin_left = -340.0
margin_top = -165.0
margin_right = 340.0
margin_bottom = 165.0
mouse_filter = 1
filters = PoolStringArray( "*.png ; PNG Images" )
show_hidden_files = true
script = ExtResource( 9 )
[node name="LoadFileDialog" type="FileDialog" parent="."]
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
margin_left = -340.0
margin_top = -165.0
margin_right = 340.0
margin_bottom = 165.0
mouse_filter = 1
window_title = "Open a File"
mode = 0
filters = PoolStringArray( "*.png ; PNG Images" )
show_hidden_files = true
script = ExtResource( 2 )
[node name="Settings" parent="." instance=ExtResource( 10 )]
visible = false
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
margin_left = -150.0
margin_top = -50.0
margin_right = 150.0
margin_bottom = 50.0
mouse_filter = 1
[node name="ChangeCanvasSize" type="ConfirmationDialog" parent="."]
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
margin_left = -162.0
margin_top = -69.0
margin_right = 162.0
margin_bottom = 69.0
script = ExtResource( 14 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="VBoxContainer" type="VBoxContainer" parent="ChangeCanvasSize"]
anchor_left = 0.104938
anchor_top = 0.108696
anchor_right = 0.891975
anchor_bottom = 0.695652
margin_left = -25.9999
margin_top = -7.00005
margin_right = 27.0001
margin_bottom = 6.00002
__meta__ = {
"_edit_use_anchors_": true
}
[node name="Label" type="Label" parent="ChangeCanvasSize/VBoxContainer"]
margin_top = 7.0
margin_right = 308.0
margin_bottom = 21.0
size_flags_vertical = 6
text = "Change canvas size?"
align = 1
[node name="HBoxContainer" type="HBoxContainer" parent="ChangeCanvasSize/VBoxContainer"]
margin_top = 32.0
margin_right = 308.0
margin_bottom = 61.0
size_flags_horizontal = 3
size_flags_vertical = 3
[node name="Label" type="Label" parent="ChangeCanvasSize/VBoxContainer/HBoxContainer"]
margin_top = 7.0
margin_right = 152.0
margin_bottom = 21.0
size_flags_horizontal = 3
size_flags_vertical = 6
text = "Width (X)"
[node name="Width" type="SpinBox" parent="ChangeCanvasSize/VBoxContainer/HBoxContainer"]
margin_left = 156.0
margin_right = 308.0
margin_bottom = 29.0
size_flags_horizontal = 3
size_flags_vertical = 3
min_value = 1.0
max_value = 2500.0
value = 64.0
align = 1
__meta__ = {
"_edit_use_anchors_": false
}
[node name="HBoxContainer2" type="HBoxContainer" parent="ChangeCanvasSize/VBoxContainer"]
margin_top = 65.0
margin_right = 308.0
margin_bottom = 94.0
size_flags_horizontal = 3
size_flags_vertical = 3
[node name="Label" type="Label" parent="ChangeCanvasSize/VBoxContainer/HBoxContainer2"]
margin_top = 7.0
margin_right = 152.0
margin_bottom = 21.0
size_flags_horizontal = 3
size_flags_vertical = 6
text = "Height (Y)"
[node name="Height" type="SpinBox" parent="ChangeCanvasSize/VBoxContainer/HBoxContainer2"]
margin_left = 156.0
margin_right = 308.0
margin_bottom = 29.0
size_flags_horizontal = 3
size_flags_vertical = 3
min_value = 1.0
max_value = 2500.0
value = 64.0
align = 1
__meta__ = {
"_edit_use_anchors_": false
}
[node name="ChangeGridSizeDialog" type="AcceptDialog" parent="."]
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
margin_left = -127.0
margin_top = -74.0
margin_right = 128.0
margin_bottom = 73.0
window_title = "Change Grid Size"
resizable = true
script = ExtResource( 15 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="VBoxContainer" type="VBoxContainer" parent="ChangeGridSizeDialog"]
anchor_left = 0.0313726
anchor_top = 0.0816327
anchor_right = 0.968627
anchor_bottom = 0.727891
margin_left = -1.23978e-05
margin_top = -4.00001
margin_right = 0.00012207
margin_bottom = 4.00002
__meta__ = {
"_edit_use_anchors_": true
}
[node name="Label" type="Label" parent="ChangeGridSizeDialog/VBoxContainer"]
margin_right = 239.0
margin_bottom = 31.0
size_flags_horizontal = 3
size_flags_vertical = 3
text = "Change Grid Size"
align = 1
[node name="HBoxContainer" type="HBoxContainer" parent="ChangeGridSizeDialog/VBoxContainer"]
margin_top = 35.0
margin_right = 239.0
margin_bottom = 67.0
size_flags_horizontal = 3
size_flags_vertical = 3
[node name="Label" type="Label" parent="ChangeGridSizeDialog/VBoxContainer/HBoxContainer"]
margin_top = 9.0
margin_right = 117.0
margin_bottom = 23.0
size_flags_horizontal = 3
size_flags_vertical = 6
text = "Grid 1"
[node name="GridValue" type="SpinBox" parent="ChangeGridSizeDialog/VBoxContainer/HBoxContainer"]
margin_left = 121.0
margin_top = 4.0
margin_right = 239.0
margin_bottom = 28.0
size_flags_horizontal = 3
size_flags_vertical = 6
max_value = 2500.0
value = 1.0
[node name="HBoxContainer2" type="HBoxContainer" parent="ChangeGridSizeDialog/VBoxContainer"]
margin_top = 71.0
margin_right = 239.0
margin_bottom = 103.0
size_flags_horizontal = 3
size_flags_vertical = 3
[node name="Label" type="Label" parent="ChangeGridSizeDialog/VBoxContainer/HBoxContainer2"]
margin_top = 9.0
margin_right = 117.0
margin_bottom = 23.0
size_flags_horizontal = 3
size_flags_vertical = 6
text = "Grid 2"
[node name="BigGridValue" type="SpinBox" parent="ChangeGridSizeDialog/VBoxContainer/HBoxContainer2"]
margin_left = 121.0
margin_top = 4.0
margin_right = 239.0
margin_bottom = 28.0
size_flags_horizontal = 3
size_flags_vertical = 6
max_value = 2500.0
value = 8.0
[connection signal="pressed" from="Panel/NoBCViewportsnotworking26181/Control/LeftPanel/MarginContainer/VBoxContainer/VBoxContainer/LockAlpha" to="." method="_on_LockAlpha_pressed"]
[connection signal="pressed" from="Panel/NoBCViewportsnotworking26181/Control/LeftPanel/MarginContainer/VBoxContainer/BrushSelection/BrushRect" to="." method="_on_BrushRect_pressed"]
[connection signal="pressed" from="Panel/NoBCViewportsnotworking26181/Control/LeftPanel/MarginContainer/VBoxContainer/BrushSelection/BrushCircle" to="." method="_on_BrushCircle_pressed"]
[connection signal="pressed" from="Panel/NoBCViewportsnotworking26181/Control/LeftPanel/MarginContainer/VBoxContainer/BrushSelection/BrushVLine" to="." method="_on_BrushVLine_pressed"]
[connection signal="pressed" from="Panel/NoBCViewportsnotworking26181/Control/LeftPanel/MarginContainer/VBoxContainer/BrushSelection/BrushHLine" to="." method="_on_BrushHLine_pressed"]
[connection signal="value_changed" from="Panel/NoBCViewportsnotworking26181/Control/LeftPanel/MarginContainer/VBoxContainer/VSplitContainer/HBoxContainer/BrushSize" to="." method="_on_BrushSize_value_changed"]
[connection signal="pressed" from="Panel/NoBCViewportsnotworking26181/Control/LeftPanel/MarginContainer/VBoxContainer/XSymmetry" to="." method="_on_XSymmetry_pressed"]
[connection signal="pressed" from="Panel/NoBCViewportsnotworking26181/Control/LeftPanel/MarginContainer/VBoxContainer/YSymmetry" to="." method="_on_YSymmetry_pressed"]
[connection signal="mouse_entered" from="Panel/NoBCViewportsnotworking26181/Control/PaintCanvasContainer" to="." method="_on_PaintCanvasContainer_mouse_entered"]
[connection signal="mouse_exited" from="Panel/NoBCViewportsnotworking26181/Control/PaintCanvasContainer" to="." method="_on_PaintCanvasContainer_mouse_exited"]
[connection signal="pressed" from="Panel/NoBCViewportsnotworking26181/Control/RightPanel/ScrollContainer/ToolMenu/Tools/PaintTool" to="." method="_on_PaintTool_pressed"]
[connection signal="pressed" from="Panel/NoBCViewportsnotworking26181/Control/RightPanel/ScrollContainer/ToolMenu/Tools/BrushTool" to="." method="_on_BrushTool_pressed"]
[connection signal="pressed" from="Panel/NoBCViewportsnotworking26181/Control/RightPanel/ScrollContainer/ToolMenu/Tools/MultiTool" to="." method="_on_MultiTool_pressed"]
[connection signal="pressed" from="Panel/NoBCViewportsnotworking26181/Control/RightPanel/ScrollContainer/ToolMenu/Tools/BucketTool" to="." method="_on_BucketTool_pressed"]
[connection signal="pressed" from="Panel/NoBCViewportsnotworking26181/Control/RightPanel/ScrollContainer/ToolMenu/Tools/RainbowTool" to="." method="_on_RainbowTool_pressed"]
[connection signal="pressed" from="Panel/NoBCViewportsnotworking26181/Control/RightPanel/ScrollContainer/ToolMenu/Tools/LineTool" to="." method="_on_LineTool_pressed"]
[connection signal="pressed" from="Panel/NoBCViewportsnotworking26181/Control/RightPanel/ScrollContainer/ToolMenu/Tools/RectTool" to="." method="_on_RectTool_pressed"]
[connection signal="pressed" from="Panel/NoBCViewportsnotworking26181/Control/RightPanel/ScrollContainer/ToolMenu/Tools/DarkenTool" to="." method="_on_DarkenTool_pressed"]
[connection signal="pressed" from="Panel/NoBCViewportsnotworking26181/Control/RightPanel/ScrollContainer/ToolMenu/Tools/BrightenTool" to="." method="_on_BrightenTool_pressed"]
[connection signal="pressed" from="Panel/NoBCViewportsnotworking26181/Control/RightPanel/ScrollContainer/ToolMenu/Tools/ColorPickerTool" to="." method="_on_ColorPickerTool_pressed"]
[connection signal="pressed" from="Panel/NoBCViewportsnotworking26181/Control/RightPanel/ScrollContainer/ToolMenu/Tools/CutTool" to="." method="_on_CutTool_pressed"]
[connection signal="color_changed" from="Panel/NoBCViewportsnotworking26181/Control/RightPanel/ScrollContainer/ToolMenu/Tools/ColorPicker" to="." method="_on_ColorPicker_color_changed"]
[connection signal="popup_closed" from="Panel/NoBCViewportsnotworking26181/Control/RightPanel/ScrollContainer/ToolMenu/Tools/ColorPicker" to="." method="_on_ColorPicker_popup_closed"]
[connection signal="pressed" from="Panel/NoBCViewportsnotworking26181/Control/RightPanel/ScrollContainer/ToolMenu/Control/VBoxContainer/Button" to="." method="_on_Button_pressed"]
[connection signal="about_to_show" from="SaveFileDialog" to="SaveFileDialog" method="_on_SaveFileDialog_about_to_show"]
[connection signal="confirmed" from="SaveFileDialog" to="SaveFileDialog" method="_on_SaveFileDialog_confirmed"]
[connection signal="file_selected" from="SaveFileDialog" to="SaveFileDialog" method="_on_SaveFileDialog_file_selected"]
[connection signal="visibility_changed" from="SaveFileDialog" to="SaveFileDialog" method="_on_SaveFileDialog_visibility_changed"]
[connection signal="about_to_show" from="LoadFileDialog" to="LoadFileDialog" method="_on_LoadFileDialog_about_to_show"]
[connection signal="confirmed" from="LoadFileDialog" to="LoadFileDialog" method="_on_LoadFileDialog_confirmed"]
[connection signal="file_selected" from="LoadFileDialog" to="LoadFileDialog" method="_on_LoadFileDialog_file_selected"]
[connection signal="visibility_changed" from="LoadFileDialog" to="LoadFileDialog" method="_on_LoadFileDialog_visibility_changed"]
[connection signal="confirmed" from="ChangeCanvasSize" to="ChangeCanvasSize" method="_on_ConfirmationDialog_confirmed"]
[connection signal="visibility_changed" from="ChangeCanvasSize" to="ChangeCanvasSize" method="_on_ChangeCanvasSize_visibility_changed"]
[connection signal="confirmed" from="ChangeGridSizeDialog" to="ChangeGridSizeDialog" method="_on_ChangeGridSizeDialog_confirmed"]
[connection signal="visibility_changed" from="ChangeGridSizeDialog" to="ChangeGridSizeDialog" method="_on_ChangeGridSizeDialog_visibility_changed"]
[connection signal="value_changed" from="ChangeGridSizeDialog/VBoxContainer/HBoxContainer/GridValue" to="ChangeGridSizeDialog" method="_on_GridValue_value_changed"]
[connection signal="value_changed" from="ChangeGridSizeDialog/VBoxContainer/HBoxContainer2/BigGridValue" to="ChangeGridSizeDialog" method="_on_BigGridValue_value_changed"]
*/
}
PaintWindow::~PaintWindow() {
}
void PaintWindow::_bind_methods() {
}