-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix GDNative version of ported controls and add demo.
- Loading branch information
Showing
12 changed files
with
275 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
[gd_scene load_steps=8 format=2] | ||
|
||
[ext_resource path="res://addons/libgdtl/classes/tl_label.gdns" type="Script" id=1] | ||
[ext_resource path="res://fonts/NotoSans-Bold.ttf" type="DynamicFontData" id=2] | ||
[ext_resource path="res://addons/libgdtl/classes/tl_line_edit.gdns" type="Script" id=3] | ||
[ext_resource path="res://fonts/NotoNastaliqUrdu-Regular.ttf" type="DynamicFontData" id=4] | ||
|
||
[sub_resource type="GDScript" id=1] | ||
script/source = "extends Control | ||
|
||
const TLFontFamily = preload(\"res://addons/libgdtl/classes/tl_font_family.gdns\") | ||
const TLDynamicFontFace = preload(\"res://addons/libgdtl/classes/tl_dynamic_font_face.gdns\") | ||
|
||
# Called when the node enters the scene tree for the first time. | ||
func _ready(): | ||
var face1 = TLDynamicFontFace.new() | ||
face1.load(\"res://fonts/NotoSans-Bold.ttf\") | ||
|
||
var font1 = TLFontFamily.new() | ||
font1.add_face(\"Default\", face1) | ||
|
||
$TLLabel.set_base_font(font1) | ||
$TLLabel.set_base_font_style(\"Default\") | ||
$TLLabel.set_base_font_size(12) | ||
|
||
var face2 = TLDynamicFontFace.new() | ||
face2.load(\"res://fonts/NotoNastaliqUrdu-Regular.ttf\") | ||
|
||
var font2 = TLFontFamily.new() | ||
font2.add_face(\"Default\", face2) | ||
|
||
$TLLineEdit.set_base_font(font2) | ||
$TLLineEdit.set_base_font_style(\"Default\") | ||
$TLLineEdit.set_base_font_size(12) | ||
" | ||
[sub_resource type="DynamicFont" id=2] | ||
size = 12 | ||
font_data = ExtResource( 2 ) | ||
[sub_resource type="DynamicFont" id=3] | ||
size = 12 | ||
font_data = ExtResource( 4 ) | ||
[node name="Control" type="Control"] | ||
anchor_right = 1.0 | ||
anchor_bottom = 1.0 | ||
margin_left = 1.0 | ||
margin_top = -1.0 | ||
margin_right = 1.0 | ||
margin_bottom = -1.0 | ||
script = SubResource( 1 ) | ||
[node name="TLLabel" type="Control" parent="."] | ||
margin_left = 111.0 | ||
margin_top = 35.0 | ||
margin_right = 320.0 | ||
margin_bottom = 145.0 | ||
rect_min_size = Vector2( 209, 110 ) | ||
mouse_filter = 2 | ||
size_flags_vertical = 4 | ||
script = ExtResource( 1 ) | ||
text = "test232 | ||
Godot Label" | ||
[node name="Label" type="Label" parent="."] | ||
margin_left = 401.0 | ||
margin_top = 37.0 | ||
margin_right = 611.0 | ||
margin_bottom = 151.0 | ||
rect_min_size = Vector2( 210, 114 ) | ||
custom_fonts/font = SubResource( 2 ) | ||
text = "test232 | ||
Godot Label" | ||
[node name="TLLineEdit" type="Control" parent="."] | ||
margin_left = 100.0 | ||
margin_top = 159.0 | ||
margin_right = 322.0 | ||
margin_bottom = 200.0 | ||
rect_min_size = Vector2( 222, 41 ) | ||
focus_mode = 2 | ||
mouse_default_cursor_shape = 1 | ||
script = ExtResource( 3 ) | ||
text = "اور بازار سے لے آئے اگر ٹوٹ گیا" | ||
secret_character = "*" | ||
[node name="LineEdit" type="LineEdit" parent="."] | ||
margin_left = 390.0 | ||
margin_top = 159.0 | ||
margin_right = 612.0 | ||
margin_bottom = 200.0 | ||
rect_min_size = Vector2( 222, 41 ) | ||
custom_fonts/font = SubResource( 3 ) | ||
text = "اور بازار سے لے آئے اگر ٹوٹ گیا" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../../libgdtl |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
[gd_resource type="Environment" load_steps=2 format=2] | ||
|
||
[sub_resource type="ProceduralSky" id=1] | ||
|
||
[resource] | ||
background_mode = 2 | ||
background_sky = SubResource( 1 ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../common/fonts |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
; 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="gdtl backported controls (builtin)" | ||
run/main_scene="res://Control.tscn" | ||
config/icon="res://icon.png" | ||
|
||
[autoload] | ||
|
||
TLConstants="*res://addons/libgdtl/constants.gd" | ||
|
||
[editor_plugins] | ||
|
||
enabled=PoolStringArray( "libgdtl" ) | ||
|
||
[rendering] | ||
|
||
environment/default_environment="res://default_env.tres" |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.