Skip to content

Commit

Permalink
project setup, main control scene, optionButton
Browse files Browse the repository at this point in the history
for frame size selection
  • Loading branch information
BlankManifold committed Oct 21, 2022
1 parent 3cc00a7 commit f632f79
Show file tree
Hide file tree
Showing 9 changed files with 120 additions and 1 deletion.
5 changes: 5 additions & 0 deletions ComunqueIG_Tools.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<Project Sdk="Godot.NET.Sdk/3.3.0">
<PropertyGroup>
<TargetFramework>net472</TargetFramework>
</PropertyGroup>
</Project>
19 changes: 19 additions & 0 deletions ComunqueIG_Tools.sln
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}") = "ComunqueIG_Tools", "ComunqueIG_Tools.csproj", "{F23D0399-DBC0-4F52-BD32-D7DA0190F3A3}"
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
{F23D0399-DBC0-4F52-BD32-D7DA0190F3A3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F23D0399-DBC0-4F52-BD32-D7DA0190F3A3}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F23D0399-DBC0-4F52-BD32-D7DA0190F3A3}.ExportDebug|Any CPU.ActiveCfg = ExportDebug|Any CPU
{F23D0399-DBC0-4F52-BD32-D7DA0190F3A3}.ExportDebug|Any CPU.Build.0 = ExportDebug|Any CPU
{F23D0399-DBC0-4F52-BD32-D7DA0190F3A3}.ExportRelease|Any CPU.ActiveCfg = ExportRelease|Any CPU
{F23D0399-DBC0-4F52-BD32-D7DA0190F3A3}.ExportRelease|Any CPU.Build.0 = ExportRelease|Any CPU
EndGlobalSection
EndGlobal
Binary file added assets/Louis George Cafe Bold.ttf
Binary file not shown.
8 changes: 8 additions & 0 deletions assets/temp.tres
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[gd_resource type="DynamicFont" load_steps=2 format=2]

[sub_resource type="DynamicFontData" id=1]
font_path = "res://assets/Louis George Cafe Bold.ttf"

[resource]
size = 50
font_data = SubResource( 1 )
1 change: 0 additions & 1 deletion project.godot
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ config/icon="res://icon.png"

window/size/width=1080
window/size/height=1920
window/dpi/allow_hidpi=true
window/handheld/orientation="portrait"
window/stretch/mode="2d"
window/stretch/aspect="expand"
Expand Down
34 changes: 34 additions & 0 deletions scenes/MainControl.tscn
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
[gd_scene load_steps=4 format=2]

[ext_resource path="res://scenes/ToolsUI.tscn" type="PackedScene" id=1]
[ext_resource path="res://scenes/PreviewUI.tscn" type="PackedScene" id=2]
[ext_resource path="res://scripts/PreviewUI.cs" type="Script" id=3]

[node name="MainControl" type="Control"]
anchor_right = 1.0
anchor_bottom = 1.0

[node name="ToolsUI" parent="." instance=ExtResource( 1 )]

[node name="CenterContainer" type="CenterContainer" parent="."]
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
margin_left = -469.0
margin_top = -585.0
margin_right = 469.0
margin_bottom = 585.0
grow_horizontal = 2
grow_vertical = 2
size_flags_horizontal = 3
size_flags_vertical = 3

[node name="PreviewUI" parent="CenterContainer" instance=ExtResource( 2 )]
anchor_right = 0.0
anchor_bottom = 0.0
margin_left = 469.0
margin_top = 585.0
margin_right = 469.0
margin_bottom = 585.0
script = ExtResource( 3 )
17 changes: 17 additions & 0 deletions scenes/PreviewUI.tscn
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
[gd_scene format=2]

[node name="PreviewUI" type="Control"]
anchor_right = 1.0
anchor_bottom = 1.0
mouse_filter = 2

[node name="BackgroundRect" type="ColorRect" parent="."]
unique_name_in_owner = true
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
margin_left = -200.0
margin_top = -200.0
margin_right = 200.0
margin_bottom = 200.0
23 changes: 23 additions & 0 deletions scenes/ToolsUI.tscn
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
[gd_scene load_steps=3 format=2]

[ext_resource path="res://assets/temp.tres" type="DynamicFont" id=1]

[sub_resource type="Theme" id=1]
default_font = ExtResource( 1 )
OptionButton/fonts/font = ExtResource( 1 )

[node name="ToolsUI" type="Control"]
anchor_right = 1.0
anchor_bottom = 1.0
mouse_filter = 1

[node name="FrameSizeSelection" type="OptionButton" parent="."]
margin_left = 32.0
margin_top = 24.0
margin_right = 534.0
margin_bottom = 96.0
theme = SubResource( 1 )
custom_fonts/font = ExtResource( 1 )
text = "1:1 (1080x1080)"
items = [ "1:1 (1080x1080)", null, false, 0, null, "9:16 (1080x1920)", null, false, 1, null ]
selected = 0
14 changes: 14 additions & 0 deletions scripts/PreviewUI.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
using Godot;
using System;

public class PreviewUI : Control
{
private ColorRect _backgroundRect;
public override void _Ready()
{
_backgroundRect = GetNode<ColorRect>("%BackgroundRect");
}



}

0 comments on commit f632f79

Please sign in to comment.