first commit

This commit is contained in:
2025-07-20 10:34:21 +02:00
commit a5634c4619
812 changed files with 61126 additions and 0 deletions

View File

@@ -0,0 +1,4 @@
@warning_ignore("empty_file")
# This script is only placeholder for handle pop script input.
# This should closed and removed after closing the pop-up.

View File

@@ -0,0 +1 @@
uid://bkfdswehvs8sf

View File

@@ -0,0 +1,17 @@
@tool
extends Button
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# Script Spliter
# https://github.com/CodeNameTwister/Script-Spliter
#
# Script Spliter addon for godot 4
# author: "Twister"
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
func _pressed() -> void:
var parent : Node = owner
if parent == null:
parent = get_parent()
if parent:
if parent.has_method(name):
parent.call(name)

View File

@@ -0,0 +1 @@
uid://bo38caobn2x7a

View File

@@ -0,0 +1,36 @@
@tool
extends EditorContextMenuPlugin
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# Script Spliter
# https://github.com/CodeNameTwister/Script-Spliter
#
# Script Spliter addon for godot 4
# author: "Twister"
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
var CONTEXT : String = "CUSTOM"
var ICON : Texture = null
var SHORTCUT : Shortcut = null
var CALLABLE : Callable
var VALIDATOR : Callable
func _init(context : String, handle : Callable, validator : Callable, icon : Texture, input_key : Array[InputEvent] = []):
CONTEXT = context
CALLABLE = handle
ICON = icon
VALIDATOR = validator
if input_key.size() > 0:
SHORTCUT = Shortcut.new()
SHORTCUT.events = input_key
add_menu_shortcut(SHORTCUT, handle)
func _popup_menu(paths : PackedStringArray):
if VALIDATOR.is_valid():
if !VALIDATOR.call(paths):
return
if SHORTCUT:
add_context_menu_item_from_shortcut(CONTEXT, SHORTCUT, ICON)
else:
if CALLABLE.is_valid():
add_context_menu_item(CONTEXT, CALLABLE, ICON)
else:
push_error("Not valid callaback!")

View File

@@ -0,0 +1 @@
uid://dmf7coyb6hgbe

View File

@@ -0,0 +1,22 @@
@tool
extends Control
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# Script Spliter
# https://github.com/CodeNameTwister/Script-Spliter
#
# Script Spliter addon for godot 4
# author: "Twister"
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
@export var columns : SpinBox
@export var rows : SpinBox
func set_values(_columns : int, _rows : int) -> void:
columns.value = _columns
rows.value = _rows
func get_columns_value() -> int:
return max(columns.value, 1)
func get_rows_value() -> int:
return max(rows.value, 1)

View File

@@ -0,0 +1 @@
uid://y3jbguu2nw5c

View File

@@ -0,0 +1,177 @@
@tool
extends Window
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# Script Spliter
# https://github.com/CodeNameTwister/Script-Spliter
#
# Script Spliter addon for godot 4f
# author: "Twister"
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
signal on_close(window : Window)
@export var _container : Control = null
@export var _base_control : TabContainer = null
@export var _always_top : Button = null
@export var _close : Button = null
@export var _root : Control = null
var proxy : Control = null
var replacer : Node = null
var controller : Object = null
func set_base_control(node : Node) -> void:
if _base_control:
_base_control.queue_sort()
_base_control = node
if _container:
_container.add_child(node)
return
add_child(node)
if node is Control:
node.size = node.get_parent().size
func get_base_control() -> TabContainer:
return _base_control
func _init() -> void:
visible = false
close_requested.connect(_on_close)
visibility_changed.connect(_on_visibility)
focus_entered.connect(_on_focus)
focus_exited.connect(_on_focus_exited)
func _get_edit(n : Node) -> CodeEdit:
if n is CodeEdit:
return n
for x : Node in n.get_children():
return _get_edit(x)
return null
func _on_focus() -> void:
if replacer == null:
var script_editor: ScriptEditor = EditorInterface.get_script_editor()
var root : Node = script_editor.get_child(0).get_child(1).get_child(1)
if root.get_child_count() > 2:
replacer = root.get_child(2)
if "FindReplaceBar" in replacer.name:
replacer.get_parent().remove_child(replacer)
if is_instance_valid(_root):
_root.add_child(replacer)
else:
add_child(replacer)
if is_instance_valid(controller):
controller.emit_signal.call_deferred(&"focus", controller)
func _update_name() -> void:
if is_queued_for_deletion():
return
if is_instance_valid(_base_control):
if _base_control.current_tab > -1:
title = "Script-Spliter: {0}".format([_base_control.get_tab_title(_base_control.current_tab)])
return
title = "Script-Spliter: Pop Script"
func _on_tabity(__ : int) -> void:
_update_name.call_deferred()
func _on_always_top() -> void:
if transient:
return
always_on_top = !always_on_top
func _shortcut_input(event: InputEvent) -> void:
if is_instance_valid(proxy):
var vp : Viewport = proxy.get_viewport()
if vp and vp != get_viewport():
vp.push_input(event)
func _ready() -> void:
set_process_shortcut_input(true)
if _always_top:
if !_always_top.pressed.is_connected(_on_always_top):
_always_top.pressed.connect(_on_always_top)
if _close:
if !_close.pressed.is_connected(_on_close):
_close.pressed.connect(_on_close)
if _base_control:
if !_base_control.tab_changed.is_connected(_on_tabity):
_base_control.tab_changed.connect(_on_tabity)
if !_base_control.child_entered_tree.is_connected(_on_child):
_base_control.child_entered_tree.connect(_on_child)
if !_base_control.child_exiting_tree.is_connected(_out_child):
_base_control.child_exiting_tree.connect(_out_child)
var root : Control = EditorInterface.get_base_control()
if root:
add_theme_stylebox_override(&"Panel",root.get_theme_stylebox("panel", "PanelContainer"))
func _connect(n : Node, e : bool) -> void:
if n is CodeEdit:
if e:
if !n.focus_entered.is_connected(_on_focus):
n.focus_entered.connect(_on_focus)
else:
if n.focus_entered.is_connected(_on_focus):
n.focus_entered.disconnect(_on_focus)
return
for x : Node in n.get_children():
_connect(x, e)
func _on_child(n : Node) -> void:
if n is Control:
_connect(n, true)
func _out_child(n : Node) -> void:
if n is Control:
_connect(n, false)
func _on_visibility() -> void:
if !visible:
_on_focus_exited()
_on_close()
return
set_deferred(&"always_top", false)
set_process(true)
_update_name.call_deferred()
func _on_close() -> void:
on_close.emit(self)
if _base_control and _base_control.get_child_count() < 1:
queue_free()
func _on_focus_exited() -> void:
if replacer != null:
var script_editor: ScriptEditor = EditorInterface.get_script_editor()
var root : Node = script_editor.get_child(0).get_child(1).get_child(1)
var parent : Node = replacer.get_parent()
if parent != root:
if is_instance_valid(parent):
parent.remove_child(replacer)
root.add_child(replacer)
replacer = null
func _notification(what: int) -> void:
if what == NOTIFICATION_PREDELETE:
if is_instance_valid(replacer):
var script_editor: ScriptEditor = EditorInterface.get_script_editor()
var root : Node = script_editor.get_child(0).get_child(1).get_child(1)
var parent : Node = replacer.get_parent()
if parent != root:
if is_instance_valid(parent):
parent.remove_child(replacer)
root.add_child(replacer)
replacer = null
if is_instance_valid(controller):
controller.call(&"reset")
func _move_to_center() -> void:
move_to_center()
func _alpha_value(v : float) -> void:
get_child(0).modulate.a = v

View File

@@ -0,0 +1 @@
uid://dbkyfe5ri2p73

View File

@@ -0,0 +1,69 @@
[gd_scene load_steps=5 format=3 uid="uid://cr2xovtt6uo7s"]
[ext_resource type="Script" uid="uid://dbkyfe5ri2p73" path="res://addons/script_spliter/context/flying_script.gd" id="1_wfm3d"]
[ext_resource type="Texture2D" uid="uid://r6u1jtnbr4eg" path="res://addons/script_spliter/context/icons/atop.png" id="2_q3d74"]
[ext_resource type="Script" uid="uid://bo38caobn2x7a" path="res://addons/script_spliter/context/btn_callback.gd" id="3_1p1sv"]
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_q3d74"]
content_margin_left = 3.0
content_margin_top = 3.0
content_margin_right = 3.0
content_margin_bottom = 3.0
bg_color = Color(0.1155, 0.132, 0.1595, 1)
corner_detail = 1
anti_aliasing = false
[node name="FlyingScript" type="Window" node_paths=PackedStringArray("_container", "_always_top", "_close", "_root")]
title = "Script-Spliter: Pop Script"
initial_position = 4
size = Vector2i(805, 512)
visible = false
wrap_controls = true
script = ExtResource("1_wfm3d")
_container = NodePath("PanelContainer/VC")
_always_top = NodePath("PanelContainer/VC/HB/AlwaysTop")
_close = NodePath("PanelContainer/VC/HB/Close")
_root = NodePath("PanelContainer/VC")
[node name="PanelContainer" type="PanelContainer" parent="."]
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
theme_override_styles/panel = SubResource("StyleBoxFlat_q3d74")
[node name="VC" type="VBoxContainer" parent="PanelContainer"]
layout_mode = 2
size_flags_horizontal = 3
size_flags_vertical = 3
[node name="HB" type="HBoxContainer" parent="PanelContainer/VC"]
layout_mode = 2
theme_override_constants/separation = 8
[node name="AlwaysTop" type="Button" parent="PanelContainer/VC/HB"]
layout_mode = 2
tooltip_text = "Set always front visible the current window"
theme_override_font_sizes/font_size = 12
toggle_mode = true
text = "Always Top"
icon = ExtResource("2_q3d74")
flat = true
[node name="_move_to_center" type="Button" parent="PanelContainer/VC/HB"]
layout_mode = 2
tooltip_text = "Move the window to center"
theme_override_font_sizes/font_size = 12
toggle_mode = true
text = "Move To Center"
flat = true
script = ExtResource("3_1p1sv")
[node name="Close" type="Button" parent="PanelContainer/VC/HB"]
visible = false
custom_minimum_size = Vector2(32, 0)
layout_mode = 2
size_flags_horizontal = 10
tooltip_text = "Close the window"
text = "X"

View File

@@ -0,0 +1,4 @@
[gd_resource type="LabelSettings" format=3 uid="uid://cdrt4b0qrb77v"]
[resource]
font_size = 12

Binary file not shown.

After

Width:  |  Height:  |  Size: 345 B

View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://r6u1jtnbr4eg"
path="res://.godot/imported/atop.png-1d61cb69aae60a076cd60a0a3f1cc72c.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://addons/script_spliter/context/icons/atop.png"
dest_files=["res://.godot/imported/atop.png-1d61cb69aae60a076cd60a0a3f1cc72c.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

View File

@@ -0,0 +1,9 @@
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<!-- Uploaded to: SVG Repo, www.svgrepo.com, Transformed by: SVG Repo Mixer Tools -->
<svg fill="#ffffff" width="64px" height="64px" viewBox="0 0 24.00 24.00" xmlns="http://www.w3.org/2000/svg" stroke="#ffffff" stroke-width="0.00024000000000000003" transform="rotate(0)">
<g id="SVGRepo_bgCarrier" stroke-width="0"/>
<g id="SVGRepo_tracerCarrier" stroke-linecap="round" stroke-linejoin="round"/>

After

Width:  |  Height:  |  Size: 591 B

View File

@@ -0,0 +1,37 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://cractge21enk"
path="res://.godot/imported/expand.svg-963ea7d55c7ac4362bba429ef9c40e46.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://addons/script_spliter/context/icons/expand.svg"
dest_files=["res://.godot/imported/expand.svg-963ea7d55c7ac4362bba429ef9c40e46.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1
svg/scale=1.0
editor/scale_with_editor_scale=false
editor/convert_colors_with_editor_theme=false

Binary file not shown.

After

Width:  |  Height:  |  Size: 584 B

View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://c1kjfqirfexvp"
path="res://.godot/imported/sp_2H.png-c589a7f8579a9ee26d2875c35e52e183.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://addons/script_spliter/context/icons/sp_2H.png"
dest_files=["res://.godot/imported/sp_2H.png-c589a7f8579a9ee26d2875c35e52e183.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

Binary file not shown.

After

Width:  |  Height:  |  Size: 640 B

View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://d1r72ixdgbwl6"
path="res://.godot/imported/sp_2V.png-39915ece37e791e8d9a130c4c3240f49.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://addons/script_spliter/context/icons/sp_2V.png"
dest_files=["res://.godot/imported/sp_2V.png-39915ece37e791e8d9a130c4c3240f49.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

Binary file not shown.

After

Width:  |  Height:  |  Size: 637 B

View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://32xnl4cu46pj"
path="res://.godot/imported/sp_3H.png-09e8b9f9a346f328495f443e565ad878.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://addons/script_spliter/context/icons/sp_3H.png"
dest_files=["res://.godot/imported/sp_3H.png-09e8b9f9a346f328495f443e565ad878.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

Binary file not shown.

After

Width:  |  Height:  |  Size: 687 B

View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://b4cmfno0ixqnm"
path="res://.godot/imported/sp_3V.png-6984dd1b3c8e11f26b5964981b46a4b8.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://addons/script_spliter/context/icons/sp_3V.png"
dest_files=["res://.godot/imported/sp_3V.png-6984dd1b3c8e11f26b5964981b46a4b8.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

Binary file not shown.

After

Width:  |  Height:  |  Size: 572 B

View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://bf2bjkoock7re"
path="res://.godot/imported/sp_4S.png-38dbb9b7da5a9846aab652bf564a4249.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://addons/script_spliter/context/icons/sp_4S.png"
dest_files=["res://.godot/imported/sp_4S.png-38dbb9b7da5a9846aab652bf564a4249.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

Binary file not shown.

After

Width:  |  Height:  |  Size: 847 B

View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://bdxvp5dyj8y0r"
path="res://.godot/imported/sp_custom.png-91b7ef0ad7d63ebf7700a2047739db70.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://addons/script_spliter/context/icons/sp_custom.png"
dest_files=["res://.godot/imported/sp_custom.png-91b7ef0ad7d63ebf7700a2047739db70.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

Binary file not shown.

After

Width:  |  Height:  |  Size: 755 B

View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://dmvcijsjhb5pc"
path="res://.godot/imported/sp_disable.png-d75c06feba36dd2af819e235b22c2ea6.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://addons/script_spliter/context/icons/sp_disable.png"
dest_files=["res://.godot/imported/sp_disable.png-d75c06feba36dd2af819e235b22c2ea6.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

View File

@@ -0,0 +1,83 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
<svg
fill="#000000"
width="16"
height="16"
viewBox="0 0 0.64 0.64"
id="icon"
version="1.1"
sodipodi:docname="split_minus.svg"
inkscape:version="1.4 (86a8ad7, 2024-10-11)"
inkscape:export-filename="split_rminus.svg"
inkscape:export-xdpi="96"
inkscape:export-ydpi="96"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:dc="http://purl.org/dc/elements/1.1/">
<sodipodi:namedview
id="namedview2"
pagecolor="#505050"
bordercolor="#eeeeee"
borderopacity="1"
inkscape:showpageshadow="0"
inkscape:pageopacity="0"
inkscape:pagecheckerboard="0"
inkscape:deskcolor="#505050"
inkscape:zoom="2"
inkscape:cx="35.5"
inkscape:cy="58.25"
inkscape:window-width="1287"
inkscape:window-height="745"
inkscape:window-x="65"
inkscape:window-y="-8"
inkscape:window-maximized="1"
inkscape:current-layer="icon">
<inkscape:page
x="0"
y="0"
width="0.63999999"
height="0.63999999"
id="page2"
margin="0"
bleed="0" />
</sodipodi:namedview>
<defs
id="defs1">
<style
id="style1">.cls-1{fill:none;}</style>
</defs>
<title
id="title1">split-screen</title>
<path
d="M 0.18934054,0.07454552 V 0.5654545 H 0.06233516 V 0.07454552 h 0.12700536 m 0,-0.0545455 H 0.06233516 A 0.04233513,0.05454544 0 0 0 0.02000003,0.07454552 V 0.5654545 A 0.04233513,0.05454544 0 0 0 0.06233515,0.62 H 0.18934049 A 0.04233513,0.05454544 0 0 0 0.23167569,0.5654545 V 0.07454552 a 0.04233513,0.05454544 0 0 0 -0.0423352,-0.0545455 z"
id="path1"
style="fill:#00ffff;fill-opacity:1;stroke-width:0.0255591;stroke-dasharray:none" />
<path
d="M 0.57766491,0.07454552 V 0.5654545 H 0.45065951 V 0.07454552 h 0.12700538 m 0,-0.0545455 H 0.45065951 a 0.04233513,0.05454544 0 0 0 -0.0423351,0.0545455 V 0.5654545 A 0.04233513,0.05454544 0 0 0 0.45065951,0.62 H 0.57766488 A 0.04233513,0.05454544 0 0 0 0.61999998,0.5654545 V 0.07454552 a 0.04233513,0.05454544 0 0 0 -0.0423351,-0.0545455 z"
id="path2"
style="fill:#00ffff;stroke-width:0.0240271" />
<rect
x="-0.38090447"
y="0.050016876"
width="0.11920302"
height="0.53915524"
id="rect1-9-5"
style="fill:#ff0000;stroke-width:0.0416635"
ry="0.066325948"
transform="rotate(-90)" />
<metadata
id="metadata2">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:title>split-screen</dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
</svg>

After

Width:  |  Height:  |  Size: 2.9 KiB

View File

@@ -0,0 +1,37 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://c1b7aoplxr0x7"
path="res://.godot/imported/split_cminus.svg-3d236e355acd272b8108cca3f8e1c7f3.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://addons/script_spliter/context/icons/split_cminus.svg"
dest_files=["res://.godot/imported/split_cminus.svg-3d236e355acd272b8108cca3f8e1c7f3.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1
svg/scale=8.0
editor/scale_with_editor_scale=false
editor/convert_colors_with_editor_theme=false

View File

@@ -0,0 +1,92 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
<svg
fill="#000000"
width="16"
height="16"
viewBox="0 0 0.64 0.64"
id="icon"
version="1.1"
sodipodi:docname="split_minus.svg"
inkscape:version="1.4 (86a8ad7, 2024-10-11)"
inkscape:export-filename="split_cminus.svg"
inkscape:export-xdpi="96"
inkscape:export-ydpi="96"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:dc="http://purl.org/dc/elements/1.1/">
<sodipodi:namedview
id="namedview2"
pagecolor="#505050"
bordercolor="#eeeeee"
borderopacity="1"
inkscape:showpageshadow="0"
inkscape:pageopacity="0"
inkscape:pagecheckerboard="0"
inkscape:deskcolor="#505050"
inkscape:zoom="2"
inkscape:cx="35.5"
inkscape:cy="58.25"
inkscape:window-width="1287"
inkscape:window-height="745"
inkscape:window-x="65"
inkscape:window-y="-8"
inkscape:window-maximized="1"
inkscape:current-layer="icon">
<inkscape:page
x="0"
y="0"
width="0.63999999"
height="0.63999999"
id="page2"
margin="0"
bleed="0" />
</sodipodi:namedview>
<defs
id="defs1">
<style
id="style1">.cls-1{fill:none;}</style>
</defs>
<title
id="title1">split-screen</title>
<path
d="M 0.18934054,0.07454552 V 0.5654545 H 0.06233516 V 0.07454552 h 0.12700536 m 0,-0.0545455 H 0.06233516 A 0.04233513,0.05454544 0 0 0 0.02000003,0.07454552 V 0.5654545 A 0.04233513,0.05454544 0 0 0 0.06233515,0.62 H 0.18934049 A 0.04233513,0.05454544 0 0 0 0.23167569,0.5654545 V 0.07454552 a 0.04233513,0.05454544 0 0 0 -0.0423352,-0.0545455 z"
id="path1"
style="fill:#00ffff;fill-opacity:1;stroke-width:0.0255591;stroke-dasharray:none" />
<path
d="M 0.57766491,0.07454552 V 0.5654545 H 0.45065951 V 0.07454552 h 0.12700538 m 0,-0.0545455 H 0.45065951 a 0.04233513,0.05454544 0 0 0 -0.0423351,0.0545455 V 0.5654545 A 0.04233513,0.05454544 0 0 0 0.45065951,0.62 H 0.57766488 A 0.04233513,0.05454544 0 0 0 0.61999998,0.5654545 V 0.07454552 a 0.04233513,0.05454544 0 0 0 -0.0423351,-0.0545455 z"
id="path2"
style="fill:#00ffff;stroke-width:0.0240271" />
<rect
x="-0.38090447"
y="0.050016876"
width="0.11920302"
height="0.53915524"
id="rect1-9-5"
style="fill:#00ff00;stroke-width:0.0416635"
ry="0.066325948"
transform="rotate(-90)" />
<rect
x="0.26039848"
y="-0.60000002"
width="0.11920302"
height="0.53915524"
id="rect1-9-5-1"
style="fill:#00ff00;stroke-width:0.0416635"
ry="0.066325948"
transform="scale(1,-1)" />
<metadata
id="metadata2">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:title>split-screen</dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
</svg>

After

Width:  |  Height:  |  Size: 3.1 KiB

View File

@@ -0,0 +1,37 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://bvyjqo1dus1xu"
path="res://.godot/imported/split_cplus.svg-5f233626ec643447e303aa2d98ed8d14.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://addons/script_spliter/context/icons/split_cplus.svg"
dest_files=["res://.godot/imported/split_cplus.svg-5f233626ec643447e303aa2d98ed8d14.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1
svg/scale=8.0
editor/scale_with_editor_scale=false
editor/convert_colors_with_editor_theme=false

View File

@@ -0,0 +1,83 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
<svg
fill="#000000"
width="16"
height="16"
viewBox="0 0 0.64 0.64"
id="icon"
version="1.1"
sodipodi:docname="split_minus.svg"
inkscape:version="1.4 (86a8ad7, 2024-10-11)"
inkscape:export-filename="split_rminus.svg"
inkscape:export-xdpi="96"
inkscape:export-ydpi="96"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:dc="http://purl.org/dc/elements/1.1/">
<sodipodi:namedview
id="namedview2"
pagecolor="#505050"
bordercolor="#eeeeee"
borderopacity="1"
inkscape:showpageshadow="0"
inkscape:pageopacity="0"
inkscape:pagecheckerboard="0"
inkscape:deskcolor="#505050"
inkscape:zoom="2"
inkscape:cx="35.5"
inkscape:cy="58.25"
inkscape:window-width="1287"
inkscape:window-height="745"
inkscape:window-x="65"
inkscape:window-y="-8"
inkscape:window-maximized="1"
inkscape:current-layer="icon">
<inkscape:page
x="0"
y="0"
width="0.63999999"
height="0.63999999"
id="page2"
margin="0"
bleed="0" />
</sodipodi:namedview>
<defs
id="defs1">
<style
id="style1">.cls-1{fill:none;}</style>
</defs>
<title
id="title1">split-screen</title>
<path
d="M 0.56545451,0.18934056 H 0.07454553 V 0.06233518 h 0.49090898 v 0.12700536 m 0.0545455,0 V 0.06233518 A 0.05454544,0.04233513 0 0 0 0.56545451,0.02000005 H 0.07454553 A 0.05454544,0.04233513 0 0 0 0.02,0.06233517 v 0.12700534 a 0.05454544,0.04233513 0 0 0 0.05454553,0.0423352 h 0.49090898 a 0.05454544,0.04233513 0 0 0 0.0545455,-0.0423352 z"
id="path1"
style="fill:#00ffff;fill-opacity:1;stroke-width:0.0255591;stroke-dasharray:none" />
<path
d="M 0.56545451,0.57766493 H 0.07454553 v -0.1270054 h 0.49090898 v 0.12700538 m 0.0545455,0 V 0.45065953 A 0.05454544,0.04233513 0 0 0 0.56545451,0.40832438 H 0.07454553 A 0.05454544,0.04233513 0 0 0 0.02,0.45065953 V 0.5776649 A 0.05454544,0.04233513 0 0 0 0.07454553,0.62 h 0.49090898 a 0.05454544,0.04233513 0 0 0 0.0545455,-0.0423351 z"
id="path2"
style="fill:#00ffff;stroke-width:0.0240271" />
<rect
x="-0.38090447"
y="0.050016876"
width="0.11920302"
height="0.53915524"
id="rect1-9-5"
style="fill:#ff0000;stroke-width:0.0416635"
ry="0.066325948"
transform="rotate(-90)" />
<metadata
id="metadata2">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:title>split-screen</dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
</svg>

After

Width:  |  Height:  |  Size: 2.9 KiB

View File

@@ -0,0 +1,37 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://bvjk4po8w2m2j"
path="res://.godot/imported/split_rminus.svg-6f9fc75a64032d6fe5bdcc9bc3bf399d.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://addons/script_spliter/context/icons/split_rminus.svg"
dest_files=["res://.godot/imported/split_rminus.svg-6f9fc75a64032d6fe5bdcc9bc3bf399d.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1
svg/scale=8.0
editor/scale_with_editor_scale=false
editor/convert_colors_with_editor_theme=false

View File

@@ -0,0 +1,92 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
<svg
fill="#000000"
width="16"
height="16"
viewBox="0 0 0.64 0.64"
id="icon"
version="1.1"
sodipodi:docname="split_minus.svg"
inkscape:version="1.4 (86a8ad7, 2024-10-11)"
inkscape:export-filename="split_cplus.svg"
inkscape:export-xdpi="96"
inkscape:export-ydpi="96"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:dc="http://purl.org/dc/elements/1.1/">
<sodipodi:namedview
id="namedview2"
pagecolor="#505050"
bordercolor="#eeeeee"
borderopacity="1"
inkscape:showpageshadow="0"
inkscape:pageopacity="0"
inkscape:pagecheckerboard="0"
inkscape:deskcolor="#505050"
inkscape:zoom="2"
inkscape:cx="35.5"
inkscape:cy="58.25"
inkscape:window-width="1287"
inkscape:window-height="745"
inkscape:window-x="65"
inkscape:window-y="-8"
inkscape:window-maximized="1"
inkscape:current-layer="icon">
<inkscape:page
x="0"
y="0"
width="0.63999999"
height="0.63999999"
id="page2"
margin="0"
bleed="0" />
</sodipodi:namedview>
<defs
id="defs1">
<style
id="style1">.cls-1{fill:none;}</style>
</defs>
<title
id="title1">split-screen</title>
<path
d="M 0.5654545,0.18934055 H 0.07454552 V 0.06233517 H 0.5654545 v 0.12700536 m 0.0545455,0 V 0.06233517 A 0.05454544,0.04233513 0 0 0 0.5654545,0.02000004 H 0.07454552 A 0.05454544,0.04233513 0 0 0 0.02000002,0.06233516 V 0.1893405 a 0.05454544,0.04233513 0 0 0 0.0545455,0.0423352 H 0.5654545 A 0.05454544,0.04233513 0 0 0 0.62,0.18934053 Z"
id="path1"
style="fill:#00ffff;fill-opacity:1;stroke-width:0.0255591;stroke-dasharray:none" />
<path
d="M 0.5654545,0.57766492 H 0.07454552 V 0.45065952 H 0.5654545 V 0.5776649 m 0.0545455,0 V 0.45065952 A 0.05454544,0.04233513 0 0 0 0.5654545,0.40832442 H 0.07454552 a 0.05454544,0.04233513 0 0 0 -0.0545455,0.0423351 v 0.12700537 a 0.05454544,0.04233513 0 0 0 0.0545455,0.0423351 H 0.5654545 A 0.05454544,0.04233513 0 0 0 0.62,0.5776649 Z"
id="path2"
style="fill:#00ffff;stroke-width:0.0240271" />
<rect
x="-0.38090447"
y="0.050016876"
width="0.11920302"
height="0.53915524"
id="rect1-9-5"
style="fill:#00ff00;stroke-width:0.0416635"
ry="0.066325948"
transform="rotate(-90)" />
<rect
x="0.26039848"
y="-0.60000002"
width="0.11920302"
height="0.53915524"
id="rect1-9-5-1"
style="fill:#00ff00;stroke-width:0.0416635"
ry="0.066325948"
transform="scale(1,-1)" />
<metadata
id="metadata2">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:title>split-screen</dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
</svg>

After

Width:  |  Height:  |  Size: 3.1 KiB

View File

@@ -0,0 +1,37 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://1sqajw0mikdj"
path="res://.godot/imported/split_rplus.svg-a26b8d20ca41f0ec060d5e021092eced.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://addons/script_spliter/context/icons/split_rplus.svg"
dest_files=["res://.godot/imported/split_rplus.svg-a26b8d20ca41f0ec060d5e021092eced.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1
svg/scale=8.0
editor/scale_with_editor_scale=false
editor/convert_colors_with_editor_theme=false

View File

@@ -0,0 +1,81 @@
@tool
extends Window
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# Script Spliter
# https://github.com/CodeNameTwister/Script-Spliter
#
# Script Spliter addon for godot 4
# author: "Twister"
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
@export var _container : Node
@export var _custom_options : Control
var _plugin : Object = null
func _init_1() -> void:
if _container and _plugin:
var columns : int = _plugin.call(&"get_split_columns")
var rows : int = _plugin.call(&"get_split_rows")
set_split_value(columns, rows)
func _ready() -> void:
if _custom_options:
_custom_options.visible = false
if !visibility_changed.is_connected(_on_visibility_change):
visibility_changed.connect(_on_visibility_change)
_init_1()
func set_plugin(current_plugin : Object) -> void:
_plugin = current_plugin
func _on_visibility_change() -> void:
if !visible: return
if !_plugin:
return
_init_1()
func enable_options() -> void:
var custom : CheckBox = _container.get_child(_container.get_child_count() - 1)
for c : Node in _container.get_children():
if c is CheckBox:
c.button_pressed = false
_custom_options.visible = true
custom.button_pressed = true
func set_split_value(columns : int, rows : int) -> void:
var current : Node = null
var custom : CheckBox = _container.get_child(_container.get_child_count() - 1)
for c : Node in _container.get_children():
if c is CheckBox:
if c.columns == columns and c.rows == rows:
current = c
c.button_pressed = true
continue
c.button_pressed = false
if columns < 2 and rows < 2:
current = _container.get_child(0)
if current is CheckBox:
current.button_pressed = true
else:
current = null
_custom_options.visible = current == null
custom.button_pressed = _custom_options.visible
_custom_options.set_values(columns, rows)
func _on_ok_pressed() -> void:
var columns : int = _custom_options.get_columns_value()
var rows : int = _custom_options.get_rows_value()
if !_plugin:
push_error("[ERROR] Can not set split type!")
else:
_plugin.call(&"set_type_split", columns, rows)
hide()
func _on_cancel_pressed() -> void:
hide()

View File

@@ -0,0 +1 @@
uid://4wllvh127dwh

View File

@@ -0,0 +1,226 @@
[gd_scene load_steps=15 format=3 uid="uid://csu7djr8m1mgb"]
[ext_resource type="Script" uid="uid://4wllvh127dwh" path="res://addons/script_spliter/context/menu_tool.gd" id="1_00j1l"]
[ext_resource type="Texture2D" uid="uid://tgaoyybc2iji" path="res://addons/script_spliter/assets/github_CodeNameTwister.png" id="2_bi1if"]
[ext_resource type="Texture2D" uid="uid://dmvcijsjhb5pc" path="res://addons/script_spliter/context/icons/sp_disable.png" id="2_le2a0"]
[ext_resource type="Script" uid="uid://bobw4q6hrbbox" path="res://addons/script_spliter/context/split_type_button.gd" id="3_h7rbp"]
[ext_resource type="Texture2D" uid="uid://c1kjfqirfexvp" path="res://addons/script_spliter/context/icons/sp_2H.png" id="3_o7fne"]
[ext_resource type="Texture2D" uid="uid://d1r72ixdgbwl6" path="res://addons/script_spliter/context/icons/sp_2V.png" id="4_js2dr"]
[ext_resource type="Texture2D" uid="uid://32xnl4cu46pj" path="res://addons/script_spliter/context/icons/sp_3H.png" id="5_h32ac"]
[ext_resource type="Texture2D" uid="uid://b4cmfno0ixqnm" path="res://addons/script_spliter/context/icons/sp_3V.png" id="6_h7rbp"]
[ext_resource type="Texture2D" uid="uid://bf2bjkoock7re" path="res://addons/script_spliter/context/icons/sp_4S.png" id="7_bi1if"]
[ext_resource type="Texture2D" uid="uid://bdxvp5dyj8y0r" path="res://addons/script_spliter/context/icons/sp_custom.png" id="10_0n25h"]
[ext_resource type="Script" uid="uid://y3jbguu2nw5c" path="res://addons/script_spliter/context/custom_options.gd" id="11_2o3ku"]
[sub_resource type="LabelSettings" id="LabelSettings_00j1l"]
font_size = 28
outline_size = 4
outline_color = Color(0, 0, 0, 1)
[sub_resource type="LabelSettings" id="LabelSettings_2o3ku"]
font_size = 12
font_color = Color(1, 1, 1, 0.4)
[sub_resource type="LabelSettings" id="LabelSettings_0n25h"]
font_size = 12
[node name="MenuTool" type="PopupPanel" node_paths=PackedStringArray("_container", "_custom_options")]
title = "Script Splitter Menu"
position = Vector2i(0, 36)
size = Vector2i(602, 382)
visible = true
script = ExtResource("1_00j1l")
_container = NodePath("MarginContainer/MenContainer/Body")
_custom_options = NodePath("MarginContainer/MenContainer/COptions")
[node name="BG" type="ColorRect" parent="."]
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
offset_left = 4.0
offset_top = 4.0
offset_right = -4.0
offset_bottom = -4.0
grow_horizontal = 2
grow_vertical = 2
color = Color(0.249011, 0.114569, 0.435571, 1)
[node name="BGTX" type="TextureRect" parent="."]
modulate = Color(1, 1, 1, 0.34902)
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
offset_left = 4.0
offset_top = 4.0
offset_right = -4.0
offset_bottom = -4.0
grow_horizontal = 2
grow_vertical = 2
texture = ExtResource("2_bi1if")
stretch_mode = 3
[node name="MarginContainer" type="MarginContainer" parent="."]
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
offset_left = 4.0
offset_top = 4.0
offset_right = -4.0
offset_bottom = -4.0
grow_horizontal = 2
grow_vertical = 2
theme_override_constants/margin_left = 4
theme_override_constants/margin_top = 4
theme_override_constants/margin_right = 4
theme_override_constants/margin_bottom = 4
[node name="MenContainer" type="VBoxContainer" parent="MarginContainer"]
layout_mode = 2
[node name="PanelContainer2" type="PanelContainer" parent="MarginContainer/MenContainer"]
layout_mode = 2
[node name="Tittle" type="Label" parent="MarginContainer/MenContainer/PanelContainer2"]
layout_mode = 2
text = "Menu Split Selection"
label_settings = SubResource("LabelSettings_00j1l")
horizontal_alignment = 1
uppercase = true
[node name="Label" type="Label" parent="MarginContainer/MenContainer"]
visible = false
layout_mode = 2
text = "Version 0.2
Rows are created based on the maximum number of columns reached.
Example: If you want two vertical scripts, you must define a maximum of one column."
label_settings = SubResource("LabelSettings_2o3ku")
horizontal_alignment = 1
vertical_alignment = 1
[node name="Body" type="GridContainer" parent="MarginContainer/MenContainer"]
layout_mode = 2
size_flags_horizontal = 4
size_flags_vertical = 6
theme_override_constants/h_separation = 8
theme_override_constants/v_separation = 8
columns = 2
[node name="splited_off" type="CheckBox" parent="MarginContainer/MenContainer/Body"]
layout_mode = 2
tooltip_text = "Disabled Splited"
button_pressed = true
text = "Disabled"
icon = ExtResource("2_le2a0")
script = ExtResource("3_h7rbp")
[node name="splited_two_horizontal" type="CheckBox" parent="MarginContainer/MenContainer/Body"]
layout_mode = 2
tooltip_text = "Two Horizontal Splited"
text = "Two Horizontal"
icon = ExtResource("3_o7fne")
script = ExtResource("3_h7rbp")
columns = 2
rows = 1
[node name="splited_two_vertical" type="CheckBox" parent="MarginContainer/MenContainer/Body"]
layout_mode = 2
tooltip_text = "Two Vertical Splited"
text = "Two Vertical"
icon = ExtResource("4_js2dr")
script = ExtResource("3_h7rbp")
columns = 1
rows = 2
[node name="splited_three_horizontal" type="CheckBox" parent="MarginContainer/MenContainer/Body"]
layout_mode = 2
tooltip_text = "Three Horizontal Splited"
text = "Three Horizontal"
icon = ExtResource("5_h32ac")
script = ExtResource("3_h7rbp")
columns = 3
rows = 1
[node name="splited_three_vertical" type="CheckBox" parent="MarginContainer/MenContainer/Body"]
layout_mode = 2
tooltip_text = "Three Vertical Splited"
text = "Three Vertical"
icon = ExtResource("6_h7rbp")
script = ExtResource("3_h7rbp")
columns = 1
rows = 3
[node name="splited_four_square" type="CheckBox" parent="MarginContainer/MenContainer/Body"]
layout_mode = 2
tooltip_text = "Square Splited"
text = "Four Squared"
icon = ExtResource("7_bi1if")
script = ExtResource("3_h7rbp")
columns = 2
rows = 2
[node name="CheckBox" type="CheckBox" parent="MarginContainer/MenContainer/Body"]
layout_mode = 2
text = "Custom Split"
icon = ExtResource("10_0n25h")
script = ExtResource("3_h7rbp")
is_custom = true
[node name="COptions" type="VBoxContainer" parent="MarginContainer/MenContainer" node_paths=PackedStringArray("columns", "rows")]
visible = false
layout_mode = 2
script = ExtResource("11_2o3ku")
columns = NodePath("ValueOptions/ColumnsValue")
rows = NodePath("ValueOptions/RowsValue")
[node name="Label" type="Label" parent="MarginContainer/MenContainer/COptions"]
layout_mode = 2
text = "Custom Split Options"
label_settings = SubResource("LabelSettings_0n25h")
horizontal_alignment = 1
[node name="TextureRect" type="TextureRect" parent="MarginContainer/MenContainer/COptions"]
layout_mode = 2
texture = ExtResource("10_0n25h")
expand_mode = 1
stretch_mode = 5
[node name="ValueOptions" type="HBoxContainer" parent="MarginContainer/MenContainer/COptions"]
layout_mode = 2
[node name="ColumnsValue" type="SpinBox" parent="MarginContainer/MenContainer/COptions/ValueOptions"]
layout_mode = 2
size_flags_horizontal = 3
min_value = 1.0
max_value = 30.0
value = 1.0
alignment = 1
prefix = "Columns"
[node name="RowsValue" type="SpinBox" parent="MarginContainer/MenContainer/COptions/ValueOptions"]
layout_mode = 2
size_flags_horizontal = 3
min_value = 1.0
max_value = 30.0
value = 1.0
alignment = 1
prefix = "Rows"
[node name="Separator" type="HSeparator" parent="MarginContainer/MenContainer"]
layout_mode = 2
size_flags_vertical = 8
[node name="Footer" type="HBoxContainer" parent="MarginContainer/MenContainer"]
layout_mode = 2
[node name="OK" type="Button" parent="MarginContainer/MenContainer/Footer"]
layout_mode = 2
size_flags_horizontal = 3
text = "Accept"
[node name="Cancel" type="Button" parent="MarginContainer/MenContainer/Footer"]
layout_mode = 2
size_flags_horizontal = 3
text = "Exit"
[connection signal="pressed" from="MarginContainer/MenContainer/Footer/OK" to="." method="_on_ok_pressed"]
[connection signal="pressed" from="MarginContainer/MenContainer/Footer/Cancel" to="." method="_on_cancel_pressed"]

View File

@@ -0,0 +1,26 @@
[gd_scene format=3 uid="uid://di83u5ac2jww6"]
[node name="PanelPreview" type="ColorRect"]
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
color = Color(1.27546e-06, 0.644043, 0.17534, 0.4)
[node name="Label" type="Label" parent="."]
layout_mode = 1
anchors_preset = 8
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
offset_left = -44.5
offset_top = -11.5
offset_right = 44.5
offset_bottom = 11.5
grow_horizontal = 2
grow_vertical = 2
text = "DROP HERE"
horizontal_alignment = 1
vertical_alignment = 1

View File

@@ -0,0 +1,24 @@
@tool
extends CheckBox
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# Script Spliter
# https://github.com/CodeNameTwister/Script-Spliter
#
# Script Spliter addon for godot 4
# author: "Twister"
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
## V0.2 Used now as max columns by row!, 0 as infinite horizontal.
@export var columns : int = 0
## V0.2: Used now only as extra container if row > 1
@export var rows : int = 0
@export var is_custom : bool = false
func _pressed() -> void:
if is_custom:
if owner.has_method(&"enable_options"):
owner.call(&"enable_options")
else:
if owner.has_method(&"set_split_value"):
owner.call(&"set_split_value", columns, rows)

View File

@@ -0,0 +1 @@
uid://bobw4q6hrbbox