mirror of
https://github.com/Orama-Interactive/Pixelorama.git
synced 2025-01-31 07:29:49 +00:00
Compare commits
5 commits
b389b82c8e
...
04d291c327
Author | SHA1 | Date | |
---|---|---|---|
04d291c327 | |||
d846ce1cec | |||
3224297572 | |||
5ec316a50f | |||
a7a76ff9f0 |
|
@ -1473,6 +1473,7 @@ text = "Pixelorama must be restarted for changes to take effect."
|
||||||
mode = 1
|
mode = 1
|
||||||
title = "Open File(s)"
|
title = "Open File(s)"
|
||||||
size = Vector2i(560, 400)
|
size = Vector2i(560, 400)
|
||||||
|
always_on_top = true
|
||||||
ok_button_text = "Open"
|
ok_button_text = "Open"
|
||||||
file_mode = 1
|
file_mode = 1
|
||||||
access = 2
|
access = 2
|
||||||
|
@ -1484,6 +1485,7 @@ transient = true
|
||||||
|
|
||||||
[node name="EnableExtensionConfirmation" type="ConfirmationDialog" parent="."]
|
[node name="EnableExtensionConfirmation" type="ConfirmationDialog" parent="."]
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
|
always_on_top = true
|
||||||
dialog_text = "Are you sure you want to enable this extension? Make sure to only enable extensions from sources that you trust."
|
dialog_text = "Are you sure you want to enable this extension? Make sure to only enable extensions from sources that you trust."
|
||||||
dialog_autowrap = true
|
dialog_autowrap = true
|
||||||
|
|
||||||
|
@ -1491,11 +1493,13 @@ dialog_autowrap = true
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
position = Vector2i(0, 36)
|
position = Vector2i(0, 36)
|
||||||
size = Vector2i(400, 100)
|
size = Vector2i(400, 100)
|
||||||
|
always_on_top = true
|
||||||
ok_button_text = "Delete Permanently"
|
ok_button_text = "Delete Permanently"
|
||||||
dialog_text = "Are you sure you want to delete this extension?"
|
dialog_text = "Are you sure you want to delete this extension?"
|
||||||
dialog_autowrap = true
|
dialog_autowrap = true
|
||||||
|
|
||||||
[node name="ResetOptionsConfirmation" type="ConfirmationDialog" parent="."]
|
[node name="ResetOptionsConfirmation" type="ConfirmationDialog" parent="."]
|
||||||
|
always_on_top = true
|
||||||
dialog_text = "Are you sure you want to reset the selected options? There will be no way to undo this."
|
dialog_text = "Are you sure you want to reset the selected options? There will be no way to undo this."
|
||||||
|
|
||||||
[connection signal="about_to_popup" from="." to="." method="_on_PreferencesDialog_about_to_show"]
|
[connection signal="about_to_popup" from="." to="." method="_on_PreferencesDialog_about_to_show"]
|
||||||
|
|
|
@ -139,7 +139,7 @@ func text_to_pixels() -> void:
|
||||||
var text := text_edit.text
|
var text := text_edit.text
|
||||||
var color := tool_slot.color
|
var color := tool_slot.color
|
||||||
var font_ascent := font.get_ascent(text_size)
|
var font_ascent := font.get_ascent(text_size)
|
||||||
var pos := Vector2(1, font_ascent + text_edit.get_theme_constant(&"line_spacing"))
|
var pos := Vector2(0, font_ascent + text_edit.get_theme_constant(&"line_spacing"))
|
||||||
pos += text_edit.position
|
pos += text_edit.position
|
||||||
font.draw_multiline_string(ci_rid, pos, text, horizontal_alignment, -1, text_size, -1, color)
|
font.draw_multiline_string(ci_rid, pos, text, horizontal_alignment, -1, text_size, -1, color)
|
||||||
|
|
||||||
|
|
|
@ -16,6 +16,7 @@ resource_name = "Layout"
|
||||||
script = ExtResource("3")
|
script = ExtResource("3")
|
||||||
root = SubResource("1")
|
root = SubResource("1")
|
||||||
hidden_tabs = {}
|
hidden_tabs = {}
|
||||||
|
windows = {}
|
||||||
save_on_change = false
|
save_on_change = false
|
||||||
|
|
||||||
[node name="ManageLayouts" type="AcceptDialog"]
|
[node name="ManageLayouts" type="AcceptDialog"]
|
||||||
|
@ -110,6 +111,7 @@ disabled = true
|
||||||
text = "Delete"
|
text = "Delete"
|
||||||
|
|
||||||
[node name="LayoutSettings" type="ConfirmationDialog" parent="."]
|
[node name="LayoutSettings" type="ConfirmationDialog" parent="."]
|
||||||
|
always_on_top = true
|
||||||
|
|
||||||
[node name="VBoxContainer" type="VBoxContainer" parent="LayoutSettings"]
|
[node name="VBoxContainer" type="VBoxContainer" parent="LayoutSettings"]
|
||||||
offset_right = 40.0
|
offset_right = 40.0
|
||||||
|
@ -131,12 +133,12 @@ text = "Copy from"
|
||||||
[node name="LayoutFrom" type="OptionButton" parent="LayoutSettings/VBoxContainer/HBoxContainer"]
|
[node name="LayoutFrom" type="OptionButton" parent="LayoutSettings/VBoxContainer/HBoxContainer"]
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
item_count = 1
|
|
||||||
selected = 0
|
selected = 0
|
||||||
|
item_count = 1
|
||||||
popup/item_0/text = "Current layout"
|
popup/item_0/text = "Current layout"
|
||||||
popup/item_0/id = 0
|
|
||||||
|
|
||||||
[node name="DeleteConfirmation" type="ConfirmationDialog" parent="."]
|
[node name="DeleteConfirmation" type="ConfirmationDialog" parent="."]
|
||||||
|
always_on_top = true
|
||||||
dialog_text = "Are you sure you want to delete this layout?"
|
dialog_text = "Are you sure you want to delete this layout?"
|
||||||
|
|
||||||
[connection signal="about_to_popup" from="." to="." method="_on_ManageLayouts_about_to_show"]
|
[connection signal="about_to_popup" from="." to="." method="_on_ManageLayouts_about_to_show"]
|
||||||
|
|
|
@ -12,6 +12,7 @@ size = Vector2i(760, 470)
|
||||||
visible = false
|
visible = false
|
||||||
wrap_controls = true
|
wrap_controls = true
|
||||||
exclusive = true
|
exclusive = true
|
||||||
|
always_on_top = true
|
||||||
script = ExtResource("1_pwcwi")
|
script = ExtResource("1_pwcwi")
|
||||||
|
|
||||||
[node name="TabContainer" type="TabContainer" parent="."]
|
[node name="TabContainer" type="TabContainer" parent="."]
|
||||||
|
@ -24,9 +25,11 @@ offset_left = 7.0
|
||||||
offset_top = 8.0
|
offset_top = 8.0
|
||||||
offset_right = -7.0
|
offset_right = -7.0
|
||||||
offset_bottom = -8.0
|
offset_bottom = -8.0
|
||||||
|
current_tab = 0
|
||||||
|
|
||||||
[node name="Store" type="MarginContainer" parent="TabContainer"]
|
[node name="Store" type="MarginContainer" parent="TabContainer"]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
|
metadata/_tab_index = 0
|
||||||
|
|
||||||
[node name="StoreMainContainer" type="HSplitContainer" parent="TabContainer/Store"]
|
[node name="StoreMainContainer" type="HSplitContainer" parent="TabContainer/Store"]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
|
@ -68,6 +71,7 @@ size_flags_horizontal = 3
|
||||||
[node name="Options" type="MarginContainer" parent="TabContainer"]
|
[node name="Options" type="MarginContainer" parent="TabContainer"]
|
||||||
visible = false
|
visible = false
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
|
metadata/_tab_index = 1
|
||||||
|
|
||||||
[node name="ScrollContainer" type="ScrollContainer" parent="TabContainer/Options"]
|
[node name="ScrollContainer" type="ScrollContainer" parent="TabContainer/Options"]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
|
@ -153,6 +157,7 @@ unique_name_in_owner = true
|
||||||
position = Vector2i(0, 36)
|
position = Vector2i(0, 36)
|
||||||
size = Vector2i(511, 326)
|
size = Vector2i(511, 326)
|
||||||
unresizable = true
|
unresizable = true
|
||||||
|
always_on_top = true
|
||||||
popup_window = true
|
popup_window = true
|
||||||
|
|
||||||
[node name="Content" type="VBoxContainer" parent="Error"]
|
[node name="Content" type="VBoxContainer" parent="Error"]
|
||||||
|
@ -200,6 +205,7 @@ autowrap_mode = 3
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
position = Vector2i(0, 36)
|
position = Vector2i(0, 36)
|
||||||
size = Vector2i(357, 110)
|
size = Vector2i(357, 110)
|
||||||
|
always_on_top = true
|
||||||
popup_window = true
|
popup_window = true
|
||||||
|
|
||||||
[node name="Content" type="VBoxContainer" parent="ErrorCustom"]
|
[node name="Content" type="VBoxContainer" parent="ErrorCustom"]
|
||||||
|
|
|
@ -5,15 +5,18 @@ var font: Font:
|
||||||
set(value):
|
set(value):
|
||||||
font = value
|
font = value
|
||||||
add_theme_font_override(&"font", font)
|
add_theme_font_override(&"font", font)
|
||||||
|
var _border_node := Control.new()
|
||||||
|
|
||||||
|
|
||||||
func _ready() -> void:
|
func _ready() -> void:
|
||||||
|
Global.camera.zoom_changed.connect(func(): _border_node.queue_redraw())
|
||||||
|
_border_node.draw.connect(_on_border_redraw)
|
||||||
|
_border_node.set_anchors_preset(Control.PRESET_FULL_RECT)
|
||||||
|
_border_node.mouse_filter = Control.MOUSE_FILTER_IGNORE
|
||||||
|
add_child(_border_node)
|
||||||
|
caret_blink = true
|
||||||
var stylebox := StyleBoxFlat.new()
|
var stylebox := StyleBoxFlat.new()
|
||||||
stylebox.draw_center = false
|
stylebox.draw_center = false
|
||||||
stylebox.border_width_left = 1
|
|
||||||
stylebox.border_width_top = 1
|
|
||||||
stylebox.border_width_right = 1
|
|
||||||
stylebox.border_width_bottom = 1
|
|
||||||
add_theme_stylebox_override(&"normal", stylebox)
|
add_theme_stylebox_override(&"normal", stylebox)
|
||||||
add_theme_stylebox_override(&"focus", stylebox)
|
add_theme_stylebox_override(&"focus", stylebox)
|
||||||
add_theme_constant_override(&"line_spacing", 0)
|
add_theme_constant_override(&"line_spacing", 0)
|
||||||
|
@ -44,3 +47,9 @@ func _on_text_changed() -> void:
|
||||||
var string_size := font.get_string_size(max_line, HORIZONTAL_ALIGNMENT_LEFT, -1, font_size)
|
var string_size := font.get_string_size(max_line, HORIZONTAL_ALIGNMENT_LEFT, -1, font_size)
|
||||||
size.x = font_size + string_size.x
|
size.x = font_size + string_size.x
|
||||||
size.y = (get_line_count() + 1) * font.get_height(font_size)
|
size.y = (get_line_count() + 1) * font.get_height(font_size)
|
||||||
|
_border_node.queue_redraw()
|
||||||
|
|
||||||
|
|
||||||
|
func _on_border_redraw() -> void:
|
||||||
|
var border_width := (1.0 / Global.camera.zoom.x) * 2.0 + 1.0
|
||||||
|
_border_node.draw_rect(_border_node.get_rect(), Color.WHITE, false, border_width)
|
||||||
|
|
|
@ -73,11 +73,6 @@ layout_mode = 2
|
||||||
[node name="VBoxContainer" type="VBoxContainer" parent="VBoxContainer/MarginContainer"]
|
[node name="VBoxContainer" type="VBoxContainer" parent="VBoxContainer/MarginContainer"]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
|
|
||||||
[node name="Header" type="Label" parent="VBoxContainer/MarginContainer/VBoxContainer"]
|
|
||||||
layout_mode = 2
|
|
||||||
theme_type_variation = &"HeaderSmall"
|
|
||||||
text = "Tileset Options:"
|
|
||||||
|
|
||||||
[node name="Buttons" type="HBoxContainer" parent="VBoxContainer/MarginContainer/VBoxContainer"]
|
[node name="Buttons" type="HBoxContainer" parent="VBoxContainer/MarginContainer/VBoxContainer"]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
|
|
||||||
|
@ -218,20 +213,16 @@ autowrap_mode = 3
|
||||||
[node name="HSeparator2" type="HSeparator" parent="VBoxContainer/MarginContainer/VBoxContainer"]
|
[node name="HSeparator2" type="HSeparator" parent="VBoxContainer/MarginContainer/VBoxContainer"]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
|
|
||||||
[node name="PanelContainer" type="PanelContainer" parent="VBoxContainer"]
|
[node name="ScrollContainer" type="ScrollContainer" parent="VBoxContainer"]
|
||||||
self_modulate = Color(0.866085, 0.866085, 0.866085, 1)
|
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
size_flags_vertical = 3
|
size_flags_vertical = 3
|
||||||
|
|
||||||
[node name="ScrollContainer" type="ScrollContainer" parent="VBoxContainer/PanelContainer"]
|
[node name="MarginContainer" type="MarginContainer" parent="VBoxContainer/ScrollContainer"]
|
||||||
layout_mode = 2
|
|
||||||
|
|
||||||
[node name="MarginContainer" type="MarginContainer" parent="VBoxContainer/PanelContainer/ScrollContainer"]
|
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
size_flags_horizontal = 3
|
size_flags_horizontal = 3
|
||||||
size_flags_vertical = 3
|
size_flags_vertical = 3
|
||||||
|
|
||||||
[node name="TileButtonContainer" type="HFlowContainer" parent="VBoxContainer/PanelContainer/ScrollContainer/MarginContainer"]
|
[node name="TileButtonContainer" type="HFlowContainer" parent="VBoxContainer/ScrollContainer/MarginContainer"]
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue