mirror of
https://github.com/godotengine/godot-demo-projects.git
synced 2026-01-04 23:10:08 +01:00
Convert some 2D nodes to Control nodes in GDPaint and Pseudolocal demos
This commit is contained in:
|
Before Width: | Height: | Size: 474 B After Width: | Height: | Size: 474 B |
@@ -4,8 +4,6 @@ extends Control
|
||||
const UNDO_MODE_SHAPE = -2
|
||||
# A constant for whether or not we can undo.
|
||||
const UNDO_NONE = -1
|
||||
# How large is the image (it's actually the size of DrawingAreaBG, because that's our background canvas).
|
||||
const IMAGE_SIZE = Vector2(674, 600)
|
||||
|
||||
# Enums for the various modes and brush shapes that can be applied.
|
||||
enum BrushModes {
|
||||
@@ -20,9 +18,6 @@ enum BrushShapes {
|
||||
CIRCLE,
|
||||
}
|
||||
|
||||
# The top-left position of the canvas.
|
||||
var TL_node
|
||||
|
||||
# A list to hold all of the dictionaries that make up each brush.
|
||||
var brush_data_list = []
|
||||
|
||||
@@ -48,20 +43,15 @@ var brush_shape = BrushShapes.CIRCLE;
|
||||
# in the _draw function for more details).
|
||||
var bg_color = Color.WHITE
|
||||
|
||||
func _ready():
|
||||
# Get the top left position node. We need this to find out whether or not the mouse is inside the canvas.
|
||||
TL_node = get_node(^"TLPos")
|
||||
set_process(true)
|
||||
@onready var drawing_area = $"../DrawingAreaBG"
|
||||
|
||||
|
||||
func _process(_delta):
|
||||
var mouse_pos = get_viewport().get_mouse_position()
|
||||
|
||||
# Check if the mouse is currently inside the canvas/drawing-area.
|
||||
is_mouse_in_drawing_area = false
|
||||
if mouse_pos.x > TL_node.global_position.x:
|
||||
if mouse_pos.y > TL_node.global_position.y:
|
||||
is_mouse_in_drawing_area = true
|
||||
var drawing_area_rect := Rect2(drawing_area.position, drawing_area.size)
|
||||
is_mouse_in_drawing_area = drawing_area_rect.has_point(mouse_pos)
|
||||
|
||||
if Input.is_mouse_button_pressed(MOUSE_BUTTON_LEFT):
|
||||
# If we do not have a position for when the mouse was first clicked, then this must
|
||||
@@ -110,11 +100,10 @@ func check_if_mouse_is_inside_canvas():
|
||||
# Make sure the mouse click starting position is inside the canvas.
|
||||
# This is so if we start out click outside the canvas (say chosing a color from the color picker)
|
||||
# and then move our mouse back into the canvas, it won't start painting.
|
||||
if mouse_click_start_pos.x > TL_node.global_position.x:
|
||||
if mouse_click_start_pos.y > TL_node.global_position.y:
|
||||
# Make sure the current mouse position is inside the canvas.
|
||||
if is_mouse_in_drawing_area:
|
||||
return true
|
||||
if Rect2(drawing_area.position, drawing_area.size).has_point(mouse_click_start_pos):
|
||||
# Make sure the current mouse position is inside the canvas.
|
||||
if is_mouse_in_drawing_area:
|
||||
return true
|
||||
return false
|
||||
|
||||
|
||||
@@ -244,7 +233,7 @@ func save_picture(path):
|
||||
# Get the viewport image.
|
||||
var img = get_viewport().get_texture().get_image()
|
||||
# Crop the image so we only have canvas area.
|
||||
var cropped_image = img.get_rect(Rect2(TL_node.global_position, IMAGE_SIZE))
|
||||
var cropped_image = img.get_rect(Rect2(drawing_area.position, drawing_area.size))
|
||||
|
||||
# Save the image with the passed in path we got from the save dialog.
|
||||
cropped_image.save_png(path)
|
||||
@@ -1,4 +1,4 @@
|
||||
[gd_scene load_steps=6 format=3 uid="uid://bhjmyer4wlwy2"]
|
||||
[gd_scene load_steps=10 format=3 uid="uid://bhjmyer4wlwy2"]
|
||||
|
||||
[ext_resource type="Script" path="res://paint_control.gd" id="1"]
|
||||
[ext_resource type="Script" path="res://tools_panel.gd" id="2"]
|
||||
@@ -10,6 +10,22 @@ bg_color = Color(1, 1, 1, 1)
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_npkcn"]
|
||||
bg_color = Color(0.2, 0.2, 0.2, 1)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_v0gbg"]
|
||||
atlas = ExtResource( "3" )
|
||||
region = Rect2(0, 0, 16, 16)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_j7akv"]
|
||||
atlas = ExtResource( "3" )
|
||||
region = Rect2(16, 0, 16, 16)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_63q87"]
|
||||
atlas = ExtResource( "3" )
|
||||
region = Rect2(0, 16, 16, 16)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_t52fe"]
|
||||
atlas = ExtResource( "3" )
|
||||
region = Rect2(16, 16, 16, 16)
|
||||
|
||||
[node name="PaintRoot" type="Control"]
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
@@ -33,9 +49,6 @@ script = ExtResource( "1" )
|
||||
metadata/_edit_layout_mode = 1
|
||||
metadata/_edit_use_custom_anchors = false
|
||||
|
||||
[node name="TLPos" type="Position2D" parent="PaintControl"]
|
||||
position = Vector2(350, 0)
|
||||
|
||||
[node name="ToolsPanel" type="Panel" parent="."]
|
||||
offset_right = 350.0
|
||||
offset_bottom = 600.0
|
||||
@@ -61,12 +74,18 @@ offset_bottom = 85.0
|
||||
metadata/_edit_layout_mode = 0
|
||||
metadata/_edit_use_custom_anchors = false
|
||||
|
||||
[node name="Sprite2D" type="Sprite2D" parent="ToolsPanel/ButtonToolPencil"]
|
||||
position = Vector2(27, 26)
|
||||
scale = Vector2(2.5, 2.5)
|
||||
texture = ExtResource( "3" )
|
||||
region_enabled = true
|
||||
region_rect = Rect2(0, 0, 16, 16)
|
||||
[node name="TextureRect" type="TextureRect" parent="ToolsPanel/ButtonToolPencil"]
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
offset_left = 5.0
|
||||
offset_top = 5.0
|
||||
offset_right = -5.0
|
||||
offset_bottom = -5.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
texture = SubResource( "AtlasTexture_v0gbg" )
|
||||
metadata/_edit_layout_mode = 1
|
||||
metadata/_edit_use_custom_anchors = false
|
||||
|
||||
[node name="ButtonToolEraser" type="Button" parent="ToolsPanel"]
|
||||
offset_left = 110.0
|
||||
@@ -76,12 +95,18 @@ offset_bottom = 85.0
|
||||
metadata/_edit_layout_mode = 0
|
||||
metadata/_edit_use_custom_anchors = false
|
||||
|
||||
[node name="Sprite2D" type="Sprite2D" parent="ToolsPanel/ButtonToolEraser"]
|
||||
position = Vector2(29, 26)
|
||||
scale = Vector2(2.5, 2.5)
|
||||
texture = ExtResource( "3" )
|
||||
region_enabled = true
|
||||
region_rect = Rect2(16, 0, 16, 16)
|
||||
[node name="TextureRect2" type="TextureRect" parent="ToolsPanel/ButtonToolEraser"]
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
offset_left = 5.0
|
||||
offset_top = 5.0
|
||||
offset_right = -5.0
|
||||
offset_bottom = -5.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
texture = SubResource( "AtlasTexture_j7akv" )
|
||||
metadata/_edit_layout_mode = 1
|
||||
metadata/_edit_use_custom_anchors = false
|
||||
|
||||
[node name="ButtonToolRectangle" type="Button" parent="ToolsPanel"]
|
||||
offset_left = 180.0
|
||||
@@ -91,12 +116,18 @@ offset_bottom = 85.0
|
||||
metadata/_edit_layout_mode = 0
|
||||
metadata/_edit_use_custom_anchors = false
|
||||
|
||||
[node name="Sprite2D" type="Sprite2D" parent="ToolsPanel/ButtonToolRectangle"]
|
||||
position = Vector2(28, 26)
|
||||
scale = Vector2(2.5, 2.5)
|
||||
texture = ExtResource( "3" )
|
||||
region_enabled = true
|
||||
region_rect = Rect2(0, 16, 16, 16)
|
||||
[node name="TextureRect" type="TextureRect" parent="ToolsPanel/ButtonToolRectangle"]
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
offset_left = 5.0
|
||||
offset_top = 5.0
|
||||
offset_right = -5.0
|
||||
offset_bottom = -5.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
texture = SubResource( "AtlasTexture_63q87" )
|
||||
metadata/_edit_layout_mode = 1
|
||||
metadata/_edit_use_custom_anchors = false
|
||||
|
||||
[node name="ButtonToolCircle" type="Button" parent="ToolsPanel"]
|
||||
offset_left = 250.0
|
||||
@@ -106,12 +137,18 @@ offset_bottom = 85.0
|
||||
metadata/_edit_layout_mode = 0
|
||||
metadata/_edit_use_custom_anchors = false
|
||||
|
||||
[node name="Sprite2D" type="Sprite2D" parent="ToolsPanel/ButtonToolCircle"]
|
||||
position = Vector2(28, 26)
|
||||
scale = Vector2(2.5, 2.5)
|
||||
texture = ExtResource( "3" )
|
||||
region_enabled = true
|
||||
region_rect = Rect2(16, 16, 16, 16)
|
||||
[node name="TextureRect" type="TextureRect" parent="ToolsPanel/ButtonToolCircle"]
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
offset_left = 5.0
|
||||
offset_top = 5.0
|
||||
offset_right = -5.0
|
||||
offset_bottom = -5.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
texture = SubResource( "AtlasTexture_t52fe" )
|
||||
metadata/_edit_layout_mode = 1
|
||||
metadata/_edit_use_custom_anchors = false
|
||||
|
||||
[node name="LabelBrushColor" type="Label" parent="ToolsPanel"]
|
||||
offset_left = 20.0
|
||||
@@ -172,12 +209,18 @@ offset_bottom = 114.0
|
||||
metadata/_edit_layout_mode = 0
|
||||
metadata/_edit_use_custom_anchors = false
|
||||
|
||||
[node name="Sprite2D" type="Sprite2D" parent="ToolsPanel/BrushSettings/ButtonShapeBox"]
|
||||
position = Vector2(27, 27)
|
||||
scale = Vector2(2.5, 2.5)
|
||||
texture = ExtResource( "3" )
|
||||
region_enabled = true
|
||||
region_rect = Rect2(0, 16, 16, 16)
|
||||
[node name="TextureRect" type="TextureRect" parent="ToolsPanel/BrushSettings/ButtonShapeBox"]
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
offset_left = 5.0
|
||||
offset_top = 5.0
|
||||
offset_right = -5.0
|
||||
offset_bottom = -5.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
texture = SubResource( "AtlasTexture_63q87" )
|
||||
metadata/_edit_layout_mode = 1
|
||||
metadata/_edit_use_custom_anchors = false
|
||||
|
||||
[node name="ButtonShapeCircle" type="Button" parent="ToolsPanel/BrushSettings"]
|
||||
offset_left = 190.0
|
||||
@@ -187,12 +230,18 @@ offset_bottom = 114.0
|
||||
metadata/_edit_layout_mode = 0
|
||||
metadata/_edit_use_custom_anchors = false
|
||||
|
||||
[node name="Sprite2D" type="Sprite2D" parent="ToolsPanel/BrushSettings/ButtonShapeCircle"]
|
||||
position = Vector2(28, 27)
|
||||
scale = Vector2(2.5, 2.5)
|
||||
texture = ExtResource( "3" )
|
||||
region_enabled = true
|
||||
region_rect = Rect2(16, 16, 16, 16)
|
||||
[node name="TextureRect" type="TextureRect" parent="ToolsPanel/BrushSettings/ButtonShapeCircle"]
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
offset_left = 5.0
|
||||
offset_top = 5.0
|
||||
offset_right = -5.0
|
||||
offset_bottom = -5.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
texture = SubResource( "AtlasTexture_t52fe" )
|
||||
metadata/_edit_layout_mode = 1
|
||||
metadata/_edit_use_custom_anchors = false
|
||||
|
||||
[node name="LabelBackgroundColor" type="Label" parent="ToolsPanel"]
|
||||
offset_left = 20.0
|
||||
@@ -251,6 +300,8 @@ metadata/_edit_layout_mode = 0
|
||||
metadata/_edit_use_custom_anchors = false
|
||||
|
||||
[node name="SaveFileDialog" type="FileDialog" parent="."]
|
||||
size = Vector2i(800, 300)
|
||||
min_size = Vector2i(800, 300)
|
||||
access = 2
|
||||
filters = PackedStringArray("*.png")
|
||||
show_hidden_files = true
|
||||
|
Before Width: | Height: | Size: 273 B After Width: | Height: | Size: 273 B |
|
Before Width: | Height: | Size: 31 KiB After Width: | Height: | Size: 31 KiB |
@@ -1,78 +1,67 @@
|
||||
extends Node2D
|
||||
extends Control
|
||||
|
||||
func _ready():
|
||||
$HBoxContainer/Pseudolocalization_options/accents.button_pressed = ProjectSettings.get("internationalization/pseudolocalization/replace_with_accents")
|
||||
$HBoxContainer/Pseudolocalization_options/toggle.button_pressed = TranslationServer.pseudolocalization_enabled
|
||||
$HBoxContainer/Pseudolocalization_options/fakebidi.button_pressed = ProjectSettings.get("internationalization/pseudolocalization/fake_bidi")
|
||||
$HBoxContainer/Pseudolocalization_options/doublevowels.button_pressed = ProjectSettings.get("internationalization/pseudolocalization/double_vowels")
|
||||
$HBoxContainer/Pseudolocalization_options/override.button_pressed = ProjectSettings.get("internationalization/pseudolocalization/override")
|
||||
$HBoxContainer/Pseudolocalization_options/skipplaceholders.button_pressed = ProjectSettings.get("internationalization/pseudolocalization/skip_placeholders")
|
||||
$HBoxContainer/Pseudolocalization_options/prefix/TextEdit.text = ProjectSettings.get("internationalization/pseudolocalization/prefix")
|
||||
$HBoxContainer/Pseudolocalization_options/suffix/TextEdit.text = ProjectSettings.get("internationalization/pseudolocalization/suffix")
|
||||
$HBoxContainer/Pseudolocalization_options/exp_ratio/TextEdit.text = str(ProjectSettings.get("internationalization/pseudolocalization/expansion_ratio"))
|
||||
pass
|
||||
$Main/Pseudolocalization_options/accents.button_pressed = ProjectSettings.get("internationalization/pseudolocalization/replace_with_accents")
|
||||
$Main/Pseudolocalization_options/toggle.button_pressed = TranslationServer.pseudolocalization_enabled
|
||||
$Main/Pseudolocalization_options/fakebidi.button_pressed = ProjectSettings.get("internationalization/pseudolocalization/fake_bidi")
|
||||
$Main/Pseudolocalization_options/doublevowels.button_pressed = ProjectSettings.get("internationalization/pseudolocalization/double_vowels")
|
||||
$Main/Pseudolocalization_options/override.button_pressed = ProjectSettings.get("internationalization/pseudolocalization/override")
|
||||
$Main/Pseudolocalization_options/skipplaceholders.button_pressed = ProjectSettings.get("internationalization/pseudolocalization/skip_placeholders")
|
||||
$Main/Pseudolocalization_options/prefix/TextEdit.text = ProjectSettings.get("internationalization/pseudolocalization/prefix")
|
||||
$Main/Pseudolocalization_options/suffix/TextEdit.text = ProjectSettings.get("internationalization/pseudolocalization/suffix")
|
||||
$Main/Pseudolocalization_options/exp_ratio/TextEdit.text = str(ProjectSettings.get("internationalization/pseudolocalization/expansion_ratio"))
|
||||
|
||||
|
||||
func _on_accents_toggled(button_pressed):
|
||||
ProjectSettings.set("internationalization/pseudolocalization/replace_with_accents", button_pressed)
|
||||
TranslationServer.reload_pseudolocalization()
|
||||
pass
|
||||
|
||||
|
||||
func _on_toggle_toggled(button_pressed):
|
||||
TranslationServer.pseudolocalization_enabled = button_pressed
|
||||
pass
|
||||
|
||||
|
||||
func _on_fakebidi_toggled(button_pressed):
|
||||
ProjectSettings.set("internationalization/pseudolocalization/fake_bidi", button_pressed)
|
||||
TranslationServer.reload_pseudolocalization()
|
||||
pass
|
||||
|
||||
|
||||
func _on_prefix_changed():
|
||||
ProjectSettings.set("internationalization/pseudolocalization/prefix", $HBoxContainer/Pseudolocalization_options/prefix/TextEdit.text)
|
||||
ProjectSettings.set("internationalization/pseudolocalization/prefix", $Main/Pseudolocalization_options/prefix/TextEdit.text)
|
||||
TranslationServer.reload_pseudolocalization()
|
||||
pass
|
||||
|
||||
|
||||
func _on_suffix_changed():
|
||||
ProjectSettings.set("internationalization/pseudolocalization/suffix", $HBoxContainer/Pseudolocalization_options/suffix/TextEdit.text)
|
||||
ProjectSettings.set("internationalization/pseudolocalization/suffix", $Main/Pseudolocalization_options/suffix/TextEdit.text)
|
||||
TranslationServer.reload_pseudolocalization()
|
||||
pass
|
||||
|
||||
|
||||
func _on_Pseudolocalize_pressed():
|
||||
$HBoxContainer/Pseudolocalizer/Result.text = TranslationServer.pseudolocalize($HBoxContainer/Pseudolocalizer/Key.text)
|
||||
pass
|
||||
$Main/Pseudolocalizer/Result.text = TranslationServer.pseudolocalize($Main/Pseudolocalizer/Key.text)
|
||||
|
||||
|
||||
func _on_doublevowels_toggled(button_pressed):
|
||||
ProjectSettings.set("internationalization/pseudolocalization/double_vowels", button_pressed)
|
||||
TranslationServer.reload_pseudolocalization()
|
||||
pass
|
||||
|
||||
|
||||
func _on_expansion_ratio_text_changed():
|
||||
float()
|
||||
var ratio = ($HBoxContainer/Pseudolocalization_options/exp_ratio/TextEdit.text).to_float()
|
||||
var ratio = ($Main/Pseudolocalization_options/exp_ratio/TextEdit.text).to_float()
|
||||
if ratio > 1:
|
||||
ratio = 1
|
||||
$HBoxContainer/Pseudolocalization_options/exp_ratio/TextEdit.text = str(ratio)
|
||||
$Main/Pseudolocalization_options/exp_ratio/TextEdit.text = str(ratio)
|
||||
if ratio < 0:
|
||||
ratio = 0
|
||||
$HBoxContainer/Pseudolocalization_options/exp_ratio/TextEdit.text = str(ratio)
|
||||
$Main/Pseudolocalization_options/exp_ratio/TextEdit.text = str(ratio)
|
||||
ProjectSettings.set("internationalization/pseudolocalization/expansion_ratio", ratio)
|
||||
TranslationServer.reload_pseudolocalization()
|
||||
pass
|
||||
|
||||
|
||||
func _on_override_toggled(button_pressed):
|
||||
ProjectSettings.set("internationalization/pseudolocalization/override", button_pressed)
|
||||
TranslationServer.reload_pseudolocalization()
|
||||
pass
|
||||
|
||||
|
||||
func _on_skipplaceholders_toggled(button_pressed):
|
||||
ProjectSettings.set("internationalization/pseudolocalization/skip_placeholders", button_pressed)
|
||||
TranslationServer.reload_pseudolocalization()
|
||||
pass
|
||||
|
||||
@@ -3,88 +3,110 @@
|
||||
[ext_resource type="Texture2D" uid="uid://ddpix5j1t4swg" path="res://icon.png" id="1"]
|
||||
[ext_resource type="Script" path="res://Pseudolocalization.gd" id="2"]
|
||||
|
||||
[node name="Pseudolocalization" type="Node2D"]
|
||||
[node name="Pseudolocalization" type="Control"]
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
script = ExtResource( "2" )
|
||||
|
||||
[node name="Title" type="Label" parent="."]
|
||||
offset_left = 140.0
|
||||
offset_top = 19.0
|
||||
offset_right = 1024.0
|
||||
offset_bottom = 114.0
|
||||
[node name="Title" type="HBoxContainer" parent="."]
|
||||
anchor_right = 1.0
|
||||
offset_left = 20.0
|
||||
offset_top = 30.0
|
||||
offset_right = -20.0
|
||||
offset_bottom = 130.0
|
||||
grow_horizontal = 2
|
||||
metadata/_edit_layout_mode = 1
|
||||
metadata/_edit_use_custom_anchors = false
|
||||
|
||||
[node name="TextureRect" type="TextureRect" parent="Title"]
|
||||
minimum_size = Vector2(110, 0)
|
||||
offset_right = 110.0
|
||||
offset_bottom = 100.0
|
||||
texture = ExtResource( "1" )
|
||||
ignore_texture_size = true
|
||||
stretch_mode = 4
|
||||
|
||||
[node name="Label" type="Label" parent="Title"]
|
||||
offset_left = 114.0
|
||||
offset_top = 27.0
|
||||
offset_right = 984.0
|
||||
offset_bottom = 72.0
|
||||
size_flags_horizontal = 3
|
||||
theme_override_font_sizes/font_size = 30
|
||||
text = "Pseudolocalization Demo"
|
||||
vertical_alignment = 1
|
||||
|
||||
[node name="icon" type="Sprite2D" parent="Title"]
|
||||
position = Vector2(-66, 47)
|
||||
scale = Vector2(0.78563, 0.78563)
|
||||
texture = ExtResource( "1" )
|
||||
|
||||
[node name="HBoxContainer" type="HBoxContainer" parent="."]
|
||||
offset_left = 19.0
|
||||
offset_top = 142.0
|
||||
offset_right = 1031.0
|
||||
offset_bottom = 600.0
|
||||
[node name="Main" type="HBoxContainer" parent="."]
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
offset_left = 20.0
|
||||
offset_top = 150.0
|
||||
offset_right = -20.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
size_flags_vertical = 3
|
||||
theme_override_constants/separation = 20
|
||||
metadata/_edit_layout_mode = 1
|
||||
metadata/_edit_use_custom_anchors = false
|
||||
|
||||
[node name="Pseudolocalization_options" type="VBoxContainer" parent="HBoxContainer"]
|
||||
[node name="Pseudolocalization_options" type="VBoxContainer" parent="Main"]
|
||||
layout_direction = 2
|
||||
offset_right = 502.0
|
||||
offset_bottom = 458.0
|
||||
offset_right = 472.0
|
||||
offset_bottom = 450.0
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
|
||||
[node name="toggle" type="CheckButton" parent="HBoxContainer/Pseudolocalization_options"]
|
||||
offset_right = 502.0
|
||||
[node name="toggle" type="CheckButton" parent="Main/Pseudolocalization_options"]
|
||||
offset_right = 472.0
|
||||
offset_bottom = 31.0
|
||||
size_flags_horizontal = 3
|
||||
text = "Toggle Pseudolocalization"
|
||||
|
||||
[node name="accents" type="CheckButton" parent="HBoxContainer/Pseudolocalization_options"]
|
||||
[node name="accents" type="CheckButton" parent="Main/Pseudolocalization_options"]
|
||||
offset_top = 35.0
|
||||
offset_right = 502.0
|
||||
offset_right = 472.0
|
||||
offset_bottom = 66.0
|
||||
size_flags_horizontal = 3
|
||||
text = "Toggle Accents"
|
||||
|
||||
[node name="doublevowels" type="CheckButton" parent="HBoxContainer/Pseudolocalization_options"]
|
||||
[node name="doublevowels" type="CheckButton" parent="Main/Pseudolocalization_options"]
|
||||
offset_top = 70.0
|
||||
offset_right = 502.0
|
||||
offset_right = 472.0
|
||||
offset_bottom = 101.0
|
||||
size_flags_horizontal = 3
|
||||
text = "Toggle Double Vowels"
|
||||
|
||||
[node name="fakebidi" type="CheckButton" parent="HBoxContainer/Pseudolocalization_options"]
|
||||
[node name="fakebidi" type="CheckButton" parent="Main/Pseudolocalization_options"]
|
||||
offset_top = 105.0
|
||||
offset_right = 502.0
|
||||
offset_right = 472.0
|
||||
offset_bottom = 136.0
|
||||
size_flags_horizontal = 3
|
||||
text = "Toggle Fake Bidi"
|
||||
|
||||
[node name="override" type="CheckButton" parent="HBoxContainer/Pseudolocalization_options"]
|
||||
[node name="override" type="CheckButton" parent="Main/Pseudolocalization_options"]
|
||||
offset_top = 140.0
|
||||
offset_right = 502.0
|
||||
offset_right = 472.0
|
||||
offset_bottom = 171.0
|
||||
size_flags_horizontal = 3
|
||||
text = "Toggle Override"
|
||||
|
||||
[node name="skipplaceholders" type="CheckButton" parent="HBoxContainer/Pseudolocalization_options"]
|
||||
[node name="skipplaceholders" type="CheckButton" parent="Main/Pseudolocalization_options"]
|
||||
offset_top = 175.0
|
||||
offset_right = 502.0
|
||||
offset_right = 472.0
|
||||
offset_bottom = 206.0
|
||||
size_flags_horizontal = 3
|
||||
text = "Skip Placeholders"
|
||||
|
||||
[node name="exp_ratio" type="HBoxContainer" parent="HBoxContainer/Pseudolocalization_options"]
|
||||
[node name="exp_ratio" type="HBoxContainer" parent="Main/Pseudolocalization_options"]
|
||||
offset_top = 210.0
|
||||
offset_right = 502.0
|
||||
offset_right = 472.0
|
||||
offset_bottom = 241.0
|
||||
size_flags_vertical = 0
|
||||
|
||||
[node name="MarginContainer" type="MarginContainer" parent="HBoxContainer/Pseudolocalization_options/exp_ratio"]
|
||||
[node name="MarginContainer" type="MarginContainer" parent="Main/Pseudolocalization_options/exp_ratio"]
|
||||
offset_bottom = 31.0
|
||||
|
||||
[node name="Label" type="Label" parent="HBoxContainer/Pseudolocalization_options/exp_ratio"]
|
||||
[node name="Label" type="Label" parent="Main/Pseudolocalization_options/exp_ratio"]
|
||||
offset_left = 4.0
|
||||
offset_right = 141.0
|
||||
offset_bottom = 31.0
|
||||
@@ -93,128 +115,134 @@ size_flags_vertical = 1
|
||||
size_flags_stretch_ratio = 4.0
|
||||
text = "Expansion Ratio : "
|
||||
|
||||
[node name="TextEdit" type="LineEdit" parent="HBoxContainer/Pseudolocalization_options/exp_ratio"]
|
||||
offset_left = 403.0
|
||||
offset_right = 502.0
|
||||
[node name="TextEdit" type="LineEdit" parent="Main/Pseudolocalization_options/exp_ratio"]
|
||||
offset_left = 379.0
|
||||
offset_right = 472.0
|
||||
offset_bottom = 31.0
|
||||
size_flags_horizontal = 3
|
||||
caret_blink = true
|
||||
caret_blink_speed = 0.5
|
||||
|
||||
[node name="prefix" type="Control" parent="HBoxContainer/Pseudolocalization_options"]
|
||||
[node name="prefix" type="Control" parent="Main/Pseudolocalization_options"]
|
||||
offset_top = 245.0
|
||||
offset_right = 502.0
|
||||
offset_right = 472.0
|
||||
offset_bottom = 245.0
|
||||
size_flags_horizontal = 3
|
||||
|
||||
[node name="TextEdit" type="LineEdit" parent="HBoxContainer/Pseudolocalization_options/prefix"]
|
||||
[node name="TextEdit" type="LineEdit" parent="Main/Pseudolocalization_options/prefix"]
|
||||
offset_left = 5.0
|
||||
offset_top = 32.8613
|
||||
offset_right = 385.0
|
||||
offset_bottom = 62.8613
|
||||
size_flags_horizontal = 3
|
||||
caret_blink = true
|
||||
caret_blink_speed = 0.5
|
||||
|
||||
[node name="Label" type="Label" parent="HBoxContainer/Pseudolocalization_options/prefix"]
|
||||
[node name="Label" type="Label" parent="Main/Pseudolocalization_options/prefix"]
|
||||
offset_left = 6.0
|
||||
offset_top = 2.86133
|
||||
offset_right = 297.0
|
||||
offset_bottom = 28.8613
|
||||
text = "Pseudolocalization Prefix :"
|
||||
|
||||
[node name="suffix" type="Control" parent="HBoxContainer/Pseudolocalization_options"]
|
||||
[node name="suffix" type="Control" parent="Main/Pseudolocalization_options"]
|
||||
offset_top = 249.0
|
||||
offset_right = 502.0
|
||||
offset_right = 472.0
|
||||
offset_bottom = 249.0
|
||||
size_flags_horizontal = 3
|
||||
|
||||
[node name="TextEdit" type="LineEdit" parent="HBoxContainer/Pseudolocalization_options/suffix"]
|
||||
[node name="TextEdit" type="LineEdit" parent="Main/Pseudolocalization_options/suffix"]
|
||||
offset_left = 3.811
|
||||
offset_top = 106.592
|
||||
offset_right = 383.811
|
||||
offset_bottom = 136.592
|
||||
size_flags_horizontal = 3
|
||||
caret_blink = true
|
||||
caret_blink_speed = 0.5
|
||||
|
||||
[node name="Label" type="Label" parent="HBoxContainer/Pseudolocalization_options/suffix"]
|
||||
[node name="Label" type="Label" parent="Main/Pseudolocalization_options/suffix"]
|
||||
offset_left = 6.0
|
||||
offset_top = 76.5923
|
||||
offset_right = 297.0
|
||||
offset_bottom = 102.592
|
||||
text = "Pseudolocalization Suffix :"
|
||||
|
||||
[node name="Pseudolocalizer" type="VBoxContainer" parent="HBoxContainer"]
|
||||
offset_left = 506.0
|
||||
offset_right = 1008.0
|
||||
offset_bottom = 458.0
|
||||
[node name="Pseudolocalizer" type="VBoxContainer" parent="Main"]
|
||||
offset_left = 492.0
|
||||
offset_right = 964.0
|
||||
offset_bottom = 450.0
|
||||
grow_horizontal = 0
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
|
||||
[node name="Label" type="Label" parent="HBoxContainer/Pseudolocalizer"]
|
||||
offset_right = 502.0
|
||||
[node name="Label" type="Label" parent="Main/Pseudolocalizer"]
|
||||
offset_right = 472.0
|
||||
offset_bottom = 26.0
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 5
|
||||
text = "Pseudolocalization key :"
|
||||
|
||||
[node name="Key" type="TextEdit" parent="HBoxContainer/Pseudolocalizer"]
|
||||
[node name="Key" type="TextEdit" parent="Main/Pseudolocalizer"]
|
||||
offset_top = 30.0
|
||||
offset_right = 502.0
|
||||
offset_bottom = 145.0
|
||||
offset_right = 472.0
|
||||
offset_bottom = 143.0
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
text = "The quick brown fox jumped over the lazy dog."
|
||||
|
||||
[node name="margin" type="MarginContainer" parent="HBoxContainer/Pseudolocalizer"]
|
||||
offset_top = 149.0
|
||||
offset_bottom = 149.0
|
||||
[node name="margin" type="MarginContainer" parent="Main/Pseudolocalizer"]
|
||||
offset_top = 147.0
|
||||
offset_bottom = 147.0
|
||||
size_flags_horizontal = 0
|
||||
size_flags_vertical = 0
|
||||
|
||||
[node name="Pseudolocalize" type="Button" parent="HBoxContainer/Pseudolocalizer"]
|
||||
offset_left = 189.0
|
||||
offset_top = 153.0
|
||||
offset_right = 312.0
|
||||
offset_bottom = 184.0
|
||||
[node name="Pseudolocalize" type="Button" parent="Main/Pseudolocalizer"]
|
||||
offset_left = 174.0
|
||||
offset_top = 151.0
|
||||
offset_right = 297.0
|
||||
offset_bottom = 182.0
|
||||
size_flags_horizontal = 6
|
||||
text = "Pseudolocalize"
|
||||
|
||||
[node name="margin2" type="MarginContainer" parent="HBoxContainer/Pseudolocalizer"]
|
||||
offset_top = 188.0
|
||||
offset_bottom = 188.0
|
||||
[node name="margin2" type="MarginContainer" parent="Main/Pseudolocalizer"]
|
||||
offset_top = 186.0
|
||||
offset_bottom = 186.0
|
||||
size_flags_horizontal = 0
|
||||
size_flags_vertical = 0
|
||||
|
||||
[node name="Label2" type="Label" parent="HBoxContainer/Pseudolocalizer"]
|
||||
offset_top = 192.0
|
||||
offset_right = 502.0
|
||||
offset_bottom = 218.0
|
||||
[node name="Label2" type="Label" parent="Main/Pseudolocalizer"]
|
||||
offset_top = 190.0
|
||||
offset_right = 472.0
|
||||
offset_bottom = 216.0
|
||||
text = "Pseudolocalization result :"
|
||||
|
||||
[node name="Result" type="TextEdit" parent="HBoxContainer/Pseudolocalizer"]
|
||||
offset_top = 222.0
|
||||
offset_right = 502.0
|
||||
offset_bottom = 338.0
|
||||
[node name="Result" type="TextEdit" parent="Main/Pseudolocalizer"]
|
||||
offset_top = 220.0
|
||||
offset_right = 472.0
|
||||
offset_bottom = 333.0
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
|
||||
[node name="A2Z" type="Label" parent="HBoxContainer/Pseudolocalizer"]
|
||||
offset_top = 342.0
|
||||
offset_right = 502.0
|
||||
offset_bottom = 458.0
|
||||
[node name="A2Z" type="Label" parent="Main/Pseudolocalizer"]
|
||||
offset_top = 337.0
|
||||
offset_right = 472.0
|
||||
offset_bottom = 450.0
|
||||
size_flags_vertical = 7
|
||||
text = "ABCDEFGHIJKLMNOPQRSTUVWXYZ
|
||||
abcdefghijklmnopqrstuvwxyz"
|
||||
|
||||
[node name="MarginContainer" type="MarginContainer" parent="HBoxContainer"]
|
||||
offset_left = 1012.0
|
||||
offset_right = 1012.0
|
||||
offset_bottom = 458.0
|
||||
[node name="MarginContainer" type="MarginContainer" parent="Main"]
|
||||
offset_left = 984.0
|
||||
offset_right = 984.0
|
||||
offset_bottom = 450.0
|
||||
|
||||
[connection signal="toggled" from="HBoxContainer/Pseudolocalization_options/toggle" to="." method="_on_toggle_toggled"]
|
||||
[connection signal="toggled" from="HBoxContainer/Pseudolocalization_options/accents" to="." method="_on_accents_toggled"]
|
||||
[connection signal="toggled" from="HBoxContainer/Pseudolocalization_options/doublevowels" to="." method="_on_doublevowels_toggled"]
|
||||
[connection signal="toggled" from="HBoxContainer/Pseudolocalization_options/fakebidi" to="." method="_on_fakebidi_toggled"]
|
||||
[connection signal="toggled" from="HBoxContainer/Pseudolocalization_options/override" to="." method="_on_override_toggled"]
|
||||
[connection signal="toggled" from="HBoxContainer/Pseudolocalization_options/skipplaceholders" to="." method="_on_skipplaceholders_toggled"]
|
||||
[connection signal="text_changed" from="HBoxContainer/Pseudolocalization_options/exp_ratio/TextEdit" to="." method="_on_expansion_ratio_text_changed"]
|
||||
[connection signal="text_changed" from="HBoxContainer/Pseudolocalization_options/prefix/TextEdit" to="." method="_on_prefix_changed"]
|
||||
[connection signal="text_changed" from="HBoxContainer/Pseudolocalization_options/suffix/TextEdit" to="." method="_on_suffix_changed"]
|
||||
[connection signal="pressed" from="HBoxContainer/Pseudolocalizer/Pseudolocalize" to="." method="_on_Pseudolocalize_pressed"]
|
||||
[connection signal="toggled" from="Main/Pseudolocalization_options/toggle" to="." method="_on_toggle_toggled"]
|
||||
[connection signal="toggled" from="Main/Pseudolocalization_options/accents" to="." method="_on_accents_toggled"]
|
||||
[connection signal="toggled" from="Main/Pseudolocalization_options/doublevowels" to="." method="_on_doublevowels_toggled"]
|
||||
[connection signal="toggled" from="Main/Pseudolocalization_options/fakebidi" to="." method="_on_fakebidi_toggled"]
|
||||
[connection signal="toggled" from="Main/Pseudolocalization_options/override" to="." method="_on_override_toggled"]
|
||||
[connection signal="toggled" from="Main/Pseudolocalization_options/skipplaceholders" to="." method="_on_skipplaceholders_toggled"]
|
||||
[connection signal="text_changed" from="Main/Pseudolocalization_options/exp_ratio/TextEdit" to="." method="_on_expansion_ratio_text_changed"]
|
||||
[connection signal="text_changed" from="Main/Pseudolocalization_options/prefix/TextEdit" to="." method="_on_prefix_changed"]
|
||||
[connection signal="text_changed" from="Main/Pseudolocalization_options/suffix/TextEdit" to="." method="_on_suffix_changed"]
|
||||
[connection signal="pressed" from="Main/Pseudolocalizer/Pseudolocalize" to="." method="_on_Pseudolocalize_pressed"]
|
||||
|
||||
Reference in New Issue
Block a user