Skip to content
This repository has been archived by the owner on Oct 17, 2024. It is now read-only.

Commit

Permalink
Initial POC commit
Browse files Browse the repository at this point in the history
  • Loading branch information
WallK committed Sep 23, 2023
1 parent 657f62f commit b5c2749
Show file tree
Hide file tree
Showing 11 changed files with 242 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitattributes
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
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Godot 4+ specific ignores
.godot/
export/
14 changes: 14 additions & 0 deletions Button.gd
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
extends Button

func _ready():
self.pressed.connect(self._button_pressed)

func _button_pressed():
var output = []
# var exit_code = OS.execute("ls", ["-l", "/"], output, true)
var exit_code = OS.execute("touch", ["godot_configurator_hardcoded"], output)
print("exit code: ", exit_code)
print("output: ", output)



11 changes: 11 additions & 0 deletions Button2.gd
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
extends Button

func _ready():
self.pressed.connect(self._button_pressed)

func _button_pressed():
var output = []
# var exit_code = OS.execute("ls", ["-l", "/"], output, true)
var exit_code = OS.execute("bash", ["touch_external.sh"], output)
print("exit code: ", exit_code)
print("output: ", output)
39 changes: 39 additions & 0 deletions export_presets.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
[preset.0]

name="Linux/X11"
platform="Linux/X11"
runnable=true
dedicated_server=false
custom_features=""
export_filter="all_resources"
include_filter=""
exclude_filter=""
export_path="./export/RetroDECK_Configurator_Godot.x86_64"
encryption_include_filters=""
encryption_exclude_filters=""
encrypt_pck=false
encrypt_directory=false

[preset.0.options]

custom_template/debug=""
custom_template/release=""
debug/export_console_wrapper=1
binary_format/embed_pck=false
texture_format/bptc=true
texture_format/s3tc=true
texture_format/etc=false
texture_format/etc2=false
binary_format/architecture="x86_64"
ssh_remote_deploy/enabled=false
ssh_remote_deploy/host="user@host_ip"
ssh_remote_deploy/port="22"
ssh_remote_deploy/extra_args_ssh=""
ssh_remote_deploy/extra_args_scp=""
ssh_remote_deploy/run_script="#!/usr/bin/env bash
export DISPLAY=:0
unzip -o -q \"{temp_dir}/{archive_name}\" -d \"{temp_dir}\"
\"{temp_dir}/{exe_name}\" {cmd_args}"
ssh_remote_deploy/cleanup_script="#!/usr/bin/env bash
kill $(pgrep -x -f \"{temp_dir}/{exe_name} {cmd_args}\")
rm -rf \"{temp_dir}\""
18 changes: 18 additions & 0 deletions icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
37 changes: 37 additions & 0 deletions icon.svg.import
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
[remap]

importer="texture"
type="CompressedTexture2D"
uid="uid://bv6vh33cnfaw4"
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
4 changes: 4 additions & 0 deletions main.gd
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
extends Control

func _ready():
$VBoxContainer/Button.grab_focus()
76 changes: 76 additions & 0 deletions main.tscn
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
[gd_scene load_steps=6 format=3 uid="uid://qk2gw74anwlq"]

[ext_resource type="Texture2D" uid="uid://bv6vh33cnfaw4" path="res://icon.svg" id="1_axfei"]
[ext_resource type="Script" path="res://main.gd" id="1_obpq7"]
[ext_resource type="Script" path="res://Button.gd" id="3_aenvv"]
[ext_resource type="Script" path="res://Button2.gd" id="4_u2f14"]

[sub_resource type="LabelSettings" id="LabelSettings_b77hh"]
font_size = 24

[node name="Control" 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_obpq7")

[node name="ColorRect" type="ColorRect" parent="."]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
color = Color(0.20871, 0.20871, 0.20871, 1)

[node name="Icon" type="Sprite2D" parent="."]
position = Vector2(76, 66)
scale = Vector2(0.25, 0.25)
texture = ExtResource("1_axfei")

[node name="Label" type="Label" parent="."]
layout_mode = 1
anchors_preset = 5
anchor_left = 0.5
anchor_right = 0.5
offset_left = -208.5
offset_top = 50.0
offset_right = 208.5
offset_bottom = 87.0
grow_horizontal = 2
text = "Welcome to RetroDECK configurator"
label_settings = SubResource("LabelSettings_b77hh")
horizontal_alignment = 1

[node name="VBoxContainer" type="VBoxContainer" parent="."]
layout_mode = 1
anchors_preset = 8
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
offset_left = -70.5
offset_top = -33.0
offset_right = 70.5
offset_bottom = 33.0
grow_horizontal = 2
grow_vertical = 2

[node name="Button" type="Button" parent="VBoxContainer"]
layout_mode = 2
size_flags_horizontal = 4
focus_neighbor_top = NodePath("../Button2")
focus_neighbor_bottom = NodePath("../Button2")
text = "Hardcoded script"
script = ExtResource("3_aenvv")

[node name="Button2" type="Button" parent="VBoxContainer"]
layout_mode = 2
size_flags_horizontal = 4
focus_neighbor_top = NodePath("../Button")
focus_neighbor_bottom = NodePath("../Button")
text = "External script"
script = ExtResource("4_u2f14")
37 changes: 37 additions & 0 deletions project.godot
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
; 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="RetroDECK_Configurator_Godot"
run/main_scene="res://main.tscn"
config/features=PackedStringArray("4.1", "GL Compatibility")
config/icon="res://icon.svg"

[display]

window/size/viewport_width=960
window/size/viewport_height=540

[input]

ui_accept={
"deadzone": 0.5,
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":4194309,"physical_keycode":0,"key_label":0,"unicode":0,"echo":false,"script":null)
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":4194310,"physical_keycode":0,"key_label":0,"unicode":0,"echo":false,"script":null)
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":32,"physical_keycode":0,"key_label":0,"unicode":32,"echo":false,"script":null)
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"button_index":0,"pressure":0.0,"pressed":false,"script":null)
]
}

[rendering]

renderer/rendering_method="gl_compatibility"
renderer/rendering_method.mobile="gl_compatibility"
1 change: 1 addition & 0 deletions touch_external.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
touch godot_configurator_external

0 comments on commit b5c2749

Please sign in to comment.