-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4db9d33
commit 5bf7aa6
Showing
16 changed files
with
221 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# Normalize EOL for all files that Git considers text files. | ||
* text=auto eol=lf |
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,2 @@ | ||
# Godot 4+ specific ignores | ||
.godot/ |
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,12 @@ | ||
<Project Sdk="Godot.NET.Sdk/4.2.2"> | ||
<PropertyGroup> | ||
<TargetFramework>net6.0</TargetFramework> | ||
<TargetFramework Condition=" '$(GodotTargetPlatform)' == 'android' ">net7.0</TargetFramework> | ||
<TargetFramework Condition=" '$(GodotTargetPlatform)' == 'ios' ">net8.0</TargetFramework> | ||
<EnableDynamicLoading>true</EnableDynamicLoading> | ||
</PropertyGroup> | ||
|
||
<Target Name="PreBuild" BeforeTargets="PreBuildEvent"> | ||
<Exec Command="bash ./prebuild.sh" /> | ||
</Target> | ||
</Project> |
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,19 @@ | ||
Microsoft Visual Studio Solution File, Format Version 12.00 | ||
# Visual Studio 2012 | ||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Demo", "Demo.csproj", "{5AA4B03C-670D-42F8-8D28-7DD078ECE472}" | ||
EndProject | ||
Global | ||
GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||
Debug|Any CPU = Debug|Any CPU | ||
ExportDebug|Any CPU = ExportDebug|Any CPU | ||
ExportRelease|Any CPU = ExportRelease|Any CPU | ||
EndGlobalSection | ||
GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||
{5AA4B03C-670D-42F8-8D28-7DD078ECE472}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{5AA4B03C-670D-42F8-8D28-7DD078ECE472}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{5AA4B03C-670D-42F8-8D28-7DD078ECE472}.ExportDebug|Any CPU.ActiveCfg = ExportDebug|Any CPU | ||
{5AA4B03C-670D-42F8-8D28-7DD078ECE472}.ExportDebug|Any CPU.Build.0 = ExportDebug|Any CPU | ||
{5AA4B03C-670D-42F8-8D28-7DD078ECE472}.ExportRelease|Any CPU.ActiveCfg = ExportRelease|Any CPU | ||
{5AA4B03C-670D-42F8-8D28-7DD078ECE472}.ExportRelease|Any CPU.Build.0 = ExportRelease|Any CPU | ||
EndGlobalSection | ||
EndGlobal |
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,11 @@ | ||
using Godot; | ||
|
||
public partial class Main : Control | ||
{ | ||
public override void _Ready() | ||
{ | ||
var container = new MyContainer(new MyEditor()); | ||
|
||
AddChild(container); | ||
} | ||
} |
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,12 @@ | ||
using Godot; | ||
|
||
public partial class MyContainer | ||
{ | ||
public MyContainer(Control place1) | ||
{ | ||
this.Ready += () => | ||
{ | ||
this.editor1.ReplaceBy(place1); | ||
}; | ||
} | ||
} |
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,23 @@ | ||
using Godot; | ||
public partial class MyContainer : TabContainer | ||
{ | ||
public Control editor1; | ||
public MyEditor editor2; | ||
public override void _Ready() | ||
{ | ||
var root_0 = this; | ||
var node_0 = new Control(); | ||
this.editor1 = node_0; | ||
root_0.AddChild(node_0); | ||
var root_1 = node_0; | ||
var node_1 = new MyEditor(); | ||
this.editor2 = node_1; | ||
node_1.Name = "Editor2"; | ||
root_0.AddChild(node_1); | ||
var root_2 = node_1; | ||
} | ||
public TabContainer GetRoot() | ||
{ | ||
return this.GetChild<TabContainer>(0); | ||
} | ||
} |
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,23 @@ | ||
using Godot; | ||
public partial class MyEditor : VBoxContainer | ||
{ | ||
public override void _Ready() | ||
{ | ||
var root_0 = this; | ||
this.Name = "Editor"; | ||
var node_0 = new TextEdit(); | ||
node_0.PlaceholderText = "Enter your text here"; | ||
node_0.CustomMinimumSize = new Vector2(320, 320); | ||
node_0.DrawSpaces = true; | ||
root_0.AddChild(node_0); | ||
var root_1 = node_0; | ||
var node_1 = new Button(); | ||
node_1.Text = "Enter"; | ||
root_0.AddChild(node_1); | ||
var root_2 = node_1; | ||
} | ||
public VBoxContainer GetRoot() | ||
{ | ||
return this.GetChild<VBoxContainer>(0); | ||
} | ||
} |
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,4 @@ | ||
<TabContainer> | ||
<Control id="editor1"/> | ||
<MyEditor id="editor2" Name="Editor2"/> | ||
</TabContainer> |
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,8 @@ | ||
<VBoxContainer Name="Editor"> | ||
<TextEdit | ||
PlaceholderText="Enter your text here" | ||
CustomMinimumSize="(320, 320)" | ||
DrawSpaces="true" | ||
/> | ||
<Button Text="Enter"/> | ||
</VBoxContainer> |
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,37 @@ | ||
[remap] | ||
|
||
importer="texture" | ||
type="CompressedTexture2D" | ||
uid="uid://dabnncvij05gt" | ||
path="res://.godot/imported/icon.svg-218a8f2b3041327d8a5756f3a245f83b.ctex" | ||
metadata={ | ||
"vram_texture": false | ||
} | ||
|
||
[deps] | ||
|
||
source_file="res://icon.svg" | ||
dest_files=["res://.godot/imported/icon.svg-218a8f2b3041327d8a5756f3a245f83b.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 |
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,12 @@ | ||
[gd_scene load_steps=2 format=3 uid="uid://d0dk476aqn77j"] | ||
|
||
[ext_resource type="Script" path="res://Sources/Main.cs" id="1_a6a0s"] | ||
|
||
[node name="Main" type="Control"] | ||
layout_mode = 3 | ||
anchors_preset = 15 | ||
anchor_right = 1.0 | ||
anchor_bottom = 1.0 | ||
grow_horizontal = 2 | ||
grow_vertical = 2 | ||
script = ExtResource("1_a6a0s") |
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,29 @@ | ||
#!/usr/env/bin bash | ||
|
||
TARGET_DIR="$(realpath ./UI)" | ||
OUT_DIR="./SourcesGenerated" | ||
|
||
PROJECT_PATH="$(realpath ../)" | ||
|
||
if [ ! -d "${OUT_DIR}" ]; then | ||
mkdir "${OUT_DIR}" | ||
fi | ||
|
||
OUT_DIR="$(realpath ${OUT_DIR})" | ||
|
||
pushd "${OUT_DIR}" | ||
|
||
# Remove all generated files | ||
|
||
for f in $(find ${OUT_DIR} -name '*.generated.cs'); do | ||
rm $f | ||
done | ||
|
||
# Build the project | ||
|
||
for f in $(find ${TARGET_DIR} -name '*.xml'); do | ||
echo "Processing $f file..." | ||
${PROJECT_PATH}/bin/Debug/net8.0/GodotUIXml "$f" | ||
done | ||
|
||
popd |
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,25 @@ | ||
; 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=5 | ||
|
||
[application] | ||
|
||
config/name="Demo" | ||
run/main_scene="res://main.tscn" | ||
config/features=PackedStringArray("4.2", "C#", "GL Compatibility") | ||
config/icon="res://icon.svg" | ||
|
||
[dotnet] | ||
|
||
project/assembly_name="Demo" | ||
|
||
[rendering] | ||
|
||
renderer/rendering_method="gl_compatibility" | ||
renderer/rendering_method.mobile="gl_compatibility" |
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 |
---|---|---|
|
@@ -10,6 +10,7 @@ | |
|
||
<ItemGroup> | ||
<Compile Remove="examples\**\*.cs" /> | ||
<Compile Remove="Demo\**\*.cs" /> | ||
</ItemGroup> | ||
|
||
</Project> |