Commit 5e71647d authored by adud's avatar adud

Add the 10 first line of the editor (the hardest ones)

parent 49dd5c4d
[gd_scene format=2]
[node name="SignSymb" type="Control"]
margin_right = 35.0
margin_bottom = 14.0
__meta__ = {
"_edit_group_": true
}
[node name="Label" type="Label" parent="."]
margin_right = 35.0
margin_bottom = 14.0
mouse_filter = 1
mouse_default_cursor_shape = 1
text = "A....Z"
extends Container
# WorkSpace
# handles speech display
# Classes
export (PackedScene) var SignSymb
# Properties
export var sep = Vector2(5, 5)
var text = []
# puts the SignSymbs in the grid
func dispose_childs():
if text == []:
return
var symb_size = text[0].get_size()
var space = symb_size + sep
var pos = Vector2(0, 0)
print(symb_size, space, pos)
for symb in text:
if pos.x + symb_size.x > rect_size.x: # Line Wrapping
pos.y += space.y
pos.x = 0
print(pos.x)
fit_child_in_rect(symb, Rect2(pos, rect_size))
pos.x += space.x
func test():
var symb
for i in range(20):
symb = SignSymb.instance()
add_child(symb)
text.append(symb)
dispose_childs()
# Called when the node enters the scene tree for the first time.
func _ready():
test()
# Called every frame. 'delta' is the elapsed time since the previous frame.
#func _process(delta):
# pass
[gd_scene load_steps=3 format=2]
[ext_resource path="res://WorkSpace.gd" type="Script" id=1]
[ext_resource path="res://SignSymb.tscn" type="PackedScene" id=2]
[node name="WorkSpace" type="Container"]
margin_right = 620.0
margin_bottom = 480.0
script = ExtResource( 1 )
SignSymb = ExtResource( 2 )
[gd_resource type="Environment" load_steps=2 format=2]
[sub_resource type="ProceduralSky" id=1]
[resource]
background_mode = 2
background_sky = SubResource( 1 )
; Engine configuration file.
; It's best edited using the editor UI and not directly,
; since the parameters that go here are not all obvious.
;
; Format:
; [section] ; section goes between []
; param=value ; assign values to parameters
config_version=4
_global_script_classes=[ ]
_global_script_class_icons={
}
[application]
config/name="Editor"
config/icon="res://icon.png"
[rendering]
quality/driver/driver_name="GLES2"
vram_compression/import_etc=true
vram_compression/import_etc2=false
environment/default_environment="res://default_env.tres"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment