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

Commit

Permalink
change intro animation + add setup screen
Browse files Browse the repository at this point in the history
  • Loading branch information
int-72h committed Jun 9, 2024
1 parent 143134d commit c83108e
Show file tree
Hide file tree
Showing 8 changed files with 174 additions and 17 deletions.
Binary file added assets/adastral.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
34 changes: 34 additions & 0 deletions assets/adastral.png.import
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
[remap]

importer="texture"
type="CompressedTexture2D"
uid="uid://dylpmivsu37k8"
path="res://.godot/imported/adastral.png-7554715c26cf7308a7759caa370ebfd8.ctex"
metadata={
"vram_texture": false
}

[deps]

source_file="res://assets/adastral.png"
dest_files=["res://.godot/imported/adastral.png-7554715c26cf7308a7759caa370ebfd8.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
1 change: 1 addition & 0 deletions boot.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ offset_left = 232.0
offset_top = 143.0
offset_right = 594.0
offset_bottom = 196.0
theme_override_colors/font_color = Color(1, 1, 1, 1)
theme_override_fonts/font = ExtResource("4_6hwq1")
theme_override_font_sizes/font_size = 40
text = "Adastral Initialising..."
Expand Down
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://c5kdgsphlw0bn"
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
11 changes: 8 additions & 3 deletions init.gd
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ func do_stuff():
move_child($Control,0)
$Control/Main.s = s
$Control/Main.ready_after_sutton()
$Control.position = Vector2(0,349)
#$Control.position = Vector2(0,349)
$Control.modulate = Color.TRANSPARENT
do_the_shiny_thing()


Expand Down Expand Up @@ -49,15 +50,19 @@ func do_the_shiny_thing():
tween.tween_property(x,"pivot_offset",Vector2(100,100),t).set_trans(trans).set_ease(ease)
spin_tween.tween_property(x,"rotation_degrees",360.0+180,t).set_trans(Tween.TRANS_SINE).set_ease(Tween.EASE_OUT)
tween.tween_property(x,"modulate",Color.WHITE,t).set_trans(trans).set_ease(Tween.EASE_IN)
await get_tree().create_timer(t+0.2).timeout
await get_tree().create_timer(t-0.5).timeout
tween = create_tween().set_parallel()
tween.tween_property($Control,"modulate",Color.WHITE,0.5).set_trans(Tween.TRANS_LINEAR)
await get_tree().create_timer(0.5).timeout
$TextureRect2.hide()
$TextureRect3.hide()
$TextureRect4.hide()
$TextureRect5.hide()
$TextureRect6.hide()
$Label3.reparent($Control/Main)
tween = create_tween().set_parallel()
tween.tween_property($Control,"position",Vector2(0,0),0.5).set_trans(Tween.TRANS_ELASTIC).set_ease(Tween.EASE_OUT)
#tween.tween_property($Control,"position",Vector2(0,0),0.5).set_trans(Tween.TRANS_ELASTIC).set_ease(Tween.EASE_OUT)

await get_tree().create_timer(0.5).timeout
$TextureRect.reparent($Control/Main,false)

Expand Down
26 changes: 15 additions & 11 deletions main.gd
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ extends Control
var pallete
var theme_json = {"adastral":
{"id":"adastral","dark":"#00000000","light": "#f8f3ee",
"main": "#005c9d",
"main": "#0064ad",
"accent": "#b76300",
"lightfg": "#8d847b",
"click":"#ffdd63",
"click_t":"#000000",
"bg": "res://assets/bg.png",
"star": "res://assets/adastral.svg"}}
"star": "res://assets/adastral.png"}}
var games: Dictionary
var s : binding
var current_screen : String # use an enum damnit!!!!
Expand Down Expand Up @@ -37,6 +37,7 @@ func _on_HomeButton_pressed():
apply_theme("adastral")

func _on_game_verified(status,game):
print("[Belmont/GameVerified] %s verified" % [game])
call_deferred("t_game_verified",game)

func _on_game_updated(status,game):
Expand All @@ -53,6 +54,7 @@ func _on_install_pressed():
tween.tween_property($ProgressBar,"modulate",Color.WHITE,0.2)

func _on_verify_pressed():
print("[Belmont/VerifyPressed] Verifying %s" % [current_game])
s.verify_game(current_game)
$Install.disabled = true
$Verify.text = "Verifying..."
Expand Down Expand Up @@ -107,7 +109,7 @@ func add_side_icons():
new.ignore_texture_size = true
new.stretch_mode = TextureButton.STRETCH_SCALE
new.custom_minimum_size= Vector2(42,42)
new.size_flags_horizontal = Control.SIZE_SHRINK_CENTER
new.size_flags_horizontal = Control.SIZE_SHRINK_CENTER
new.size_flags_vertical = Control.SIZE_SHRINK_CENTER
new.texture_normal = load_image(x["icon"])
$HBoxContainer.add_child(new)
Expand All @@ -121,20 +123,22 @@ func t_progress_update(game,progress):

func t_game_verified(game):
set_buttons(game)
var tween = get_tree().create_tween()
tween.tween_property($ProgressBar,"modulate",Color.TRANSPARENT,0.2)
games[game]["progress"] = 0
await get_tree().create_timer(0.2).timeout
$ProgressBar.hide()
if current_game == game:
var tween = get_tree().create_tween()
tween.tween_property($ProgressBar,"modulate",Color.TRANSPARENT,0.2)
await get_tree().create_timer(0.2).timeout
$ProgressBar.hide()

func t_game_updated(game):
set_buttons(game)
$InstalledVersion.text = "[left]Installed Version: [b]%s[/b]" % s.get_installed_version(game)
var tween = get_tree().create_tween()
tween.tween_property($ProgressBar,"modulate",Color.TRANSPARENT,0.2)
games[game]["progress"] = 0
await get_tree().create_timer(0.2).timeout
$ProgressBar.hide()
if current_game == game:
var tween = get_tree().create_tween()
tween.tween_property($ProgressBar,"modulate",Color.TRANSPARENT,0.2)
await get_tree().create_timer(0.2).timeout
$ProgressBar.hide()



Expand Down
7 changes: 4 additions & 3 deletions main.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
[ext_resource type="FontVariation" uid="uid://th0tjv2xcuen" path="res://fonts/main_font.tres" id="3_qwbhy"]
[ext_resource type="Shader" path="res://tween.gdshader" id="4_5diq2"]
[ext_resource type="Texture2D" uid="uid://diee7uq3voana" path="res://assets/adastral-256.svg" id="4_5x6qi"]
[ext_resource type="Texture2D" uid="uid://ccbrk3xcvf5gv" path="res://icon.svg" id="4_epacs"]
[ext_resource type="Texture2D" uid="uid://c5kdgsphlw0bn" path="res://icon.svg" id="4_epacs"]
[ext_resource type="Script" path="res://main.gd" id="6"]
[ext_resource type="Shader" path="res://rounded.gdshader" id="9_ife38"]
[ext_resource type="Texture2D" uid="uid://b21fcl1p2qpc8" path="res://assets/settings.png" id="10"]
Expand All @@ -23,7 +23,7 @@ shader_parameter/weight = null
shader_parameter/alpha = 1.0

[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_fdqvn"]
bg_color = Color(0, 0.360784, 0.615686, 1)
bg_color = Color(0, 0.392157, 0.678431, 1)
corner_radius_top_left = 16
corner_radius_top_right = 16
corner_radius_bottom_right = 16
Expand Down Expand Up @@ -179,7 +179,8 @@ theme_override_colors/font_color = Color(1, 1, 1, 1)
theme_override_fonts/font = SubResource("FontVariation_sxnxf")
theme_override_font_sizes/font_size = 100
text = "Adastral"
visible_ratio = -0.125
visible_characters = 0
visible_ratio = 0.0

[node name="Label" type="Label" parent="Main/AboutInfo"]
layout_mode = 0
Expand Down
75 changes: 75 additions & 0 deletions setup.tscn
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
[gd_scene load_steps=2 format=3 uid="uid://dsp33e8s172n5"]

[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_37v2i"]
bg_color = Color(0, 0.392157, 0.678431, 1)

[node name="Setup" type="Control"]
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2

[node name="Panel" type="Panel" parent="."]
layout_mode = 0
offset_right = 3080.0
offset_bottom = 350.0
theme_override_styles/panel = SubResource("StyleBoxFlat_37v2i")

[node name="Camera2D" type="Camera2D" parent="."]
offset = Vector2(770, 0)
anchor_mode = 0

[node name="Label" type="Label" parent="."]
layout_mode = 0
offset_right = 40.0
offset_bottom = 23.0
text = "Welcome to Adastral.
let's get you set up!"

[node name="Button" type="Button" parent="."]
layout_mode = 0
offset_left = 721.0
offset_top = 144.0
offset_right = 758.0
offset_bottom = 185.0

[node name="Button" type="Button" parent="Button"]
layout_mode = 0
offset_left = 770.0
offset_right = 807.0
offset_bottom = 41.0

[node name="Label2" type="Label" parent="."]
layout_mode = 0
offset_left = 773.0
offset_top = 4.0
offset_right = 890.0
offset_bottom = 28.0
text = "We've detected Steam at:"

[node name="Label4" type="Label" parent="."]
layout_mode = 0
offset_left = 775.0
offset_top = 112.0
offset_right = 1321.0
offset_bottom = 136.0
text = "You've already got this installed!"

[node name="Label3" type="Label" parent="."]
layout_mode = 0
offset_left = 774.0
offset_top = 66.0
offset_right = 1320.0
offset_bottom = 90.0
text = "For some games, you need the Source SDK 2013 (Multiplayer) installed.
"

[node name="Label5" type="Label" parent="."]
layout_mode = 0
offset_left = 777.0
offset_top = 169.0
offset_right = 1323.0
offset_bottom = 193.0
text = "For a few games, you also need TF2 installed. "

0 comments on commit c83108e

Please sign in to comment.