basic setup
This commit is contained in:
parent
57c4b27db5
commit
8653ab0d2b
11 changed files with 305 additions and 15 deletions
4
.gitattributes
vendored
4
.gitattributes
vendored
|
|
@ -1,2 +1,2 @@
|
|||
# Auto detect text files and perform LF normalization
|
||||
* text=auto
|
||||
# Normalize EOL for all files that Git considers text files.
|
||||
* text=auto eol=lf
|
||||
|
|
|
|||
14
.gitignore
vendored
14
.gitignore
vendored
|
|
@ -1,15 +1,3 @@
|
|||
# Godot 4+ specific ignores
|
||||
.godot/
|
||||
|
||||
# Godot-specific ignores
|
||||
.import/
|
||||
export.cfg
|
||||
export_presets.cfg
|
||||
|
||||
# Imported translations (automatically generated from CSV files)
|
||||
*.translation
|
||||
|
||||
# Mono-specific ignores
|
||||
.mono/
|
||||
data_*/
|
||||
mono_crash.*.json
|
||||
/android/
|
||||
|
|
|
|||
1
icon.svg
Normal file
1
icon.svg
Normal file
|
|
@ -0,0 +1 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" width="128" height="128"><rect width="124" height="124" x="2" y="2" fill="#363d52" stroke="#212532" stroke-width="4" rx="14"/><g fill="#fff" transform="translate(12.322 12.322)scale(.101)"><path d="M105 673v33q407 354 814 0v-33z"/><path fill="#478cbf" d="m105 673 152 14q12 1 15 14l4 67 132 10 8-61q2-11 15-15h162q13 4 15 15l8 61 132-10 4-67q3-13 15-14l152-14V427q30-39 56-81-35-59-83-108-43 20-82 47-40-37-88-64 7-51 8-102-59-28-123-42-26 43-46 89-49-7-98 0-20-46-46-89-64 14-123 42 1 51 8 102-48 27-88 64-39-27-82-47-48 49-83 108 26 42 56 81zm0 33v39c0 276 813 276 814 0v-39l-134 12-5 69q-2 10-14 13l-162 11q-12 0-16-11l-10-65H446l-10 65q-4 11-16 11l-162-11q-12-3-14-13l-5-69z"/><path d="M483 600c0 34 58 34 58 0v-86c0-34-58-34-58 0z"/><circle cx="725" cy="526" r="90"/><circle cx="299" cy="526" r="90"/></g><g fill="#414042" transform="translate(12.322 12.322)scale(.101)"><circle cx="307" cy="532" r="60"/><circle cx="717" cy="532" r="60"/></g></svg>
|
||||
|
After Width: | Height: | Size: 994 B |
37
icon.svg.import
Normal file
37
icon.svg.import
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://dweu560gyqjqy"
|
||||
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
|
||||
44
project.godot
Normal file
44
project.godot
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
; 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="GoSlides"
|
||||
run/main_scene="res://tools/presentation.tscn"
|
||||
config/features=PackedStringArray("4.3", "GL Compatibility")
|
||||
config/icon="res://icon.svg"
|
||||
|
||||
[display]
|
||||
|
||||
window/size/viewport_width=1920
|
||||
window/size/viewport_height=1080
|
||||
|
||||
[input]
|
||||
|
||||
next={
|
||||
"deadzone": 0.5,
|
||||
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194321,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
|
||||
]
|
||||
}
|
||||
previous={
|
||||
"deadzone": 0.5,
|
||||
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194319,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
|
||||
]
|
||||
}
|
||||
exit={
|
||||
"deadzone": 0.5,
|
||||
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194305,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
|
||||
]
|
||||
}
|
||||
|
||||
[rendering]
|
||||
|
||||
renderer/rendering_method="gl_compatibility"
|
||||
renderer/rendering_method.mobile="gl_compatibility"
|
||||
15
slides/standard.tscn
Normal file
15
slides/standard.tscn
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
[gd_scene load_steps=2 format=3 uid="uid://ccokwij05tg74"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://b3hn5sbsngqud" path="res://widgets/header.tscn" id="1_bhwne"]
|
||||
|
||||
[node name="BaseSlide" type="VBoxContainer"]
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
|
||||
[node name="Header" parent="." instance=ExtResource("1_bhwne")]
|
||||
layout_mode = 2
|
||||
title = "Welcome to Godot!"
|
||||
subtitle = "It's a really cool engine!"
|
||||
62
tools/Presentation.gd
Normal file
62
tools/Presentation.gd
Normal file
|
|
@ -0,0 +1,62 @@
|
|||
extends Node
|
||||
#class_name
|
||||
#Authored by Tom. Please consult for any modifications or major feature requests.
|
||||
|
||||
#region Variables
|
||||
#Signals
|
||||
|
||||
#Enums
|
||||
|
||||
#Constants
|
||||
|
||||
#Exported Variables
|
||||
#@export_group("Group")
|
||||
#@export_subgroup("Subgroup")
|
||||
@export var slides_node : Control
|
||||
|
||||
#Onready Variables
|
||||
|
||||
#Other Variables (please try to separate and organise!)
|
||||
var slides : Array[Node]
|
||||
var current_slide : int = 0
|
||||
var total_slides : int
|
||||
|
||||
#endregion
|
||||
|
||||
#region Godot methods
|
||||
func _ready():
|
||||
slides = slides_node.get_children()
|
||||
total_slides = slides_node.get_child_count()
|
||||
for slide in slides:
|
||||
slide.hide()
|
||||
slides[current_slide].show()
|
||||
pass
|
||||
|
||||
func _process(delta):
|
||||
if(Input.is_action_just_pressed("next")):
|
||||
if current_slide < total_slides-1:
|
||||
show_next_slide()
|
||||
elif(Input.is_action_just_pressed("previous")):
|
||||
if current_slide > 0:
|
||||
show_previous_slide()
|
||||
#endregion
|
||||
|
||||
#region Signal methods
|
||||
|
||||
#endregion
|
||||
|
||||
#region Other methods (please try to separate and organise!)
|
||||
|
||||
func show_next_slide():
|
||||
slides[current_slide].hide()
|
||||
current_slide += 1
|
||||
slides[current_slide].show()
|
||||
|
||||
|
||||
func show_previous_slide():
|
||||
slides[current_slide].hide()
|
||||
current_slide -= 1
|
||||
slides[current_slide].show()
|
||||
|
||||
|
||||
#endregion
|
||||
8
tools/base_slide.tscn
Normal file
8
tools/base_slide.tscn
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
[gd_scene format=3 uid="uid://xxqqqjgt1vmc"]
|
||||
|
||||
[node name="BaseSlide" type="VBoxContainer"]
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
37
tools/presentation.tscn
Normal file
37
tools/presentation.tscn
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
[gd_scene load_steps=5 format=3 uid="uid://c7f5wae7pdjt2"]
|
||||
|
||||
[ext_resource type="Script" path="res://tools/Presentation.gd" id="1_qta7b"]
|
||||
[ext_resource type="PackedScene" uid="uid://xxqqqjgt1vmc" path="res://tools/base_slide.tscn" id="2_aqnf4"]
|
||||
|
||||
[sub_resource type="Gradient" id="Gradient_7sx77"]
|
||||
colors = PackedColorArray(0.15482, 0.358303, 0.295465, 1, 0, 0.391486, 0.564688, 1)
|
||||
|
||||
[sub_resource type="GradientTexture2D" id="GradientTexture2D_dod57"]
|
||||
gradient = SubResource("Gradient_7sx77")
|
||||
fill_from = Vector2(0, 1)
|
||||
|
||||
[node name="Presentation" type="Node" node_paths=PackedStringArray("slides_node")]
|
||||
script = ExtResource("1_qta7b")
|
||||
slides_node = NodePath("Slides")
|
||||
|
||||
[node name="PresentationBackground" type="TextureRect" parent="."]
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
texture = SubResource("GradientTexture2D_dod57")
|
||||
|
||||
[node name="Slides" type="Control" parent="."]
|
||||
layout_mode = 3
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
|
||||
[node name="BaseSlide" parent="Slides" instance=ExtResource("2_aqnf4")]
|
||||
layout_mode = 0
|
||||
anchors_preset = 0
|
||||
58
widgets/header.gd
Normal file
58
widgets/header.gd
Normal file
|
|
@ -0,0 +1,58 @@
|
|||
@tool
|
||||
extends PanelContainer
|
||||
#class_name
|
||||
#Authored by Tom. Please consult for any modifications or major feature requests.
|
||||
|
||||
#region Variables
|
||||
#Signals
|
||||
|
||||
#Enums
|
||||
|
||||
#Constants
|
||||
|
||||
#Exported Variables
|
||||
#@export_group("Group")
|
||||
#@export_subgroup("Subgroup")
|
||||
@export var title : String:
|
||||
set(value) :
|
||||
title = value
|
||||
title_node.text = title
|
||||
@export var subtitle : String:
|
||||
set(value) :
|
||||
subtitle = value
|
||||
subtitle_node.text = subtitle
|
||||
subtitle_node.visible = subtitle_node.text != ""
|
||||
@export_group("Node References")
|
||||
@export var title_node : Label
|
||||
@export var subtitle_node : Label
|
||||
|
||||
#Onready Variables
|
||||
|
||||
#Other Variables (please try to separate and organise!)
|
||||
|
||||
#endregion
|
||||
|
||||
#region Godot methods
|
||||
func _ready():
|
||||
#Runs when all children have entered the tree
|
||||
pass
|
||||
|
||||
func _process(delta):
|
||||
#Runs per frame
|
||||
pass
|
||||
#endregion
|
||||
|
||||
#region Signal methods
|
||||
|
||||
#endregion
|
||||
|
||||
#region Other methods (please try to separate and organise!)
|
||||
#func set_title(text : String):
|
||||
#title = text
|
||||
#title_node.text = title
|
||||
#
|
||||
#func set_subtitle(text : String):
|
||||
#subtitle = text
|
||||
#subtitle_node.text = title
|
||||
#subtitle_node.visible = subtitle_node.text != ""
|
||||
#endregion
|
||||
40
widgets/header.tscn
Normal file
40
widgets/header.tscn
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
[gd_scene load_steps=6 format=3 uid="uid://b3hn5sbsngqud"]
|
||||
|
||||
[ext_resource type="Script" path="res://widgets/header.gd" id="1_h4khk"]
|
||||
|
||||
[sub_resource type="Gradient" id="Gradient_o7xwa"]
|
||||
colors = PackedColorArray(0.46429, 0.00206019, 0.726487, 1, 0.305082, 0.490299, 1, 1)
|
||||
|
||||
[sub_resource type="GradientTexture2D" id="GradientTexture2D_vfh7v"]
|
||||
gradient = SubResource("Gradient_o7xwa")
|
||||
fill_from = Vector2(0, 1)
|
||||
|
||||
[sub_resource type="LabelSettings" id="LabelSettings_mjry0"]
|
||||
font_size = 66
|
||||
|
||||
[sub_resource type="LabelSettings" id="LabelSettings_2kr3f"]
|
||||
font_size = 36
|
||||
|
||||
[node name="Header" type="PanelContainer" node_paths=PackedStringArray("title_node", "subtitle_node")]
|
||||
script = ExtResource("1_h4khk")
|
||||
title_node = NodePath("VBoxContainer/Title")
|
||||
subtitle_node = NodePath("VBoxContainer/Subtitle")
|
||||
|
||||
[node name="Gradient" type="TextureRect" parent="."]
|
||||
layout_mode = 2
|
||||
texture = SubResource("GradientTexture2D_vfh7v")
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="."]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="Title" type="Label" parent="VBoxContainer"]
|
||||
layout_mode = 2
|
||||
text = "Title"
|
||||
label_settings = SubResource("LabelSettings_mjry0")
|
||||
horizontal_alignment = 1
|
||||
|
||||
[node name="Subtitle" type="Label" parent="VBoxContainer"]
|
||||
layout_mode = 2
|
||||
text = "Title"
|
||||
label_settings = SubResource("LabelSettings_2kr3f")
|
||||
horizontal_alignment = 1
|
||||
Loading…
Add table
Add a link
Reference in a new issue