Skip to content

Commit

Permalink
added promo shot option to make cooler gifs
Browse files Browse the repository at this point in the history
  • Loading branch information
themangomago committed Dec 19, 2020
1 parent 6e78126 commit 580fa69
Show file tree
Hide file tree
Showing 9 changed files with 123 additions and 15 deletions.
Binary file added Assets/HUD/PromoSteam.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/HUD/PromoSteam.png.import
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
[remap]

importer="texture"
type="StreamTexture"
path="res://.import/PromoSteam.png-77ca20ab7cb05f958ef0a8c06a1cc6b4.stex"
metadata={
"vram_texture": false
}

[deps]

source_file="res://Assets/HUD/PromoSteam.png"
dest_files=[ "res://.import/PromoSteam.png-77ca20ab7cb05f958ef0a8c06a1cc6b4.stex" ]

[params]

compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=0
flags/filter=false
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0
Binary file added Assets/HUD/PromoTitle.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/HUD/PromoTitle.png.import
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
[remap]

importer="texture"
type="StreamTexture"
path="res://.import/PromoTitle.png-08ccc05cb0be3e8afe44e697f90cbebe.stex"
metadata={
"vram_texture": false
}

[deps]

source_file="res://Assets/HUD/PromoTitle.png"
dest_files=[ "res://.import/PromoTitle.png-08ccc05cb0be3e8afe44e697f90cbebe.stex" ]

[params]

compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=0
flags/filter=false
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0
17 changes: 17 additions & 0 deletions Src/HUD/HUD.gd
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,11 @@ func _ready():
for node in $Upgrades/Grid.get_children():
node.connect("Upgrade_Button_Pressed", self, "upgradeSelect")

if Global.DEBUG:
$IngameMenu/DebugPromo.show()
else:
$IngameMenu/DebugPromo.hide()

var cat = Debug.addCategory("HUD")
Debug.addOption(cat, "ShaderToggle", funcref(self, "debugShaderToggle"), null)
Debug.addOption(cat, "HudToggle", funcref(self, "debugHudToggle"), null)
Expand Down Expand Up @@ -500,3 +505,15 @@ func _on_MusicSlider_value_changed(value):
func _on_SoundSlider_value_changed(value):
$IngameMenu/Menu/SoundSlider/Percentage.set_text(str(value*10)+"%")
Events.emit_signal("sound_set_volume", value)


func _on_DebugPromo_button_up():
debugHudToggle(null)
debugShaderToggle(null)
if $PromoSteam.visible:
$PromoSteam.hide()
$PromoTitel.hide()
else:
$PromoSteam.show()
$PromoTitel.show()

22 changes: 21 additions & 1 deletion Src/HUD/HUD.tscn
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[gd_scene load_steps=42 format=2]
[gd_scene load_steps=44 format=2]

[ext_resource path="res://Src/HUD/HUD.gd" type="Script" id=1]
[ext_resource path="res://Assets/HUD/LightIndicator.png" type="Texture" id=2]
Expand All @@ -23,6 +23,8 @@
[ext_resource path="res://Src/HUD/Dialog.gd" type="Script" id=21]
[ext_resource path="res://Src/Menu/Slider.tscn" type="PackedScene" id=22]
[ext_resource path="res://Assets/Portraits/Portraits.png" type="Texture" id=23]
[ext_resource path="res://Assets/HUD/PromoTitle.png" type="Texture" id=24]
[ext_resource path="res://Assets/HUD/PromoSteam.png" type="Texture" id=25]

[sub_resource type="Animation" id=1]
resource_name = "detection"
Expand Down Expand Up @@ -829,6 +831,23 @@ margin_right = 40.0
margin_bottom = 6.0
custom_fonts/font = ExtResource( 10 )
text = "Sound"

[node name="DebugPromo" type="Button" parent="IngameMenu"]
margin_left = 272.0
margin_top = 56.0
margin_right = 371.0
margin_bottom = 76.0
text = "Toggle Promo"

[node name="PromoTitel" type="Sprite" parent="."]
visible = false
position = Vector2( 320, 320 )
texture = ExtResource( 24 )

[node name="PromoSteam" type="Sprite" parent="."]
visible = false
position = Vector2( 568, 320 )
texture = ExtResource( 25 )
[connection signal="button_up" from="Upgrades/InfoBox/UpgradeButton" to="." method="_on_UpgradeButton_button_up"]
[connection signal="button_up" from="SaveGame/Menu/ButtonReturn" to="." method="_on_ButtonReturn_button_up"]
[connection signal="button_up" from="SaveGame/Menu/ButtonSave1" to="." method="_on_ButtonSave1_button_up"]
Expand All @@ -849,3 +868,4 @@ text = "Sound"
[connection signal="button_up" from="IngameMenu/Menu/ButtonQuit" to="." method="_on_ButtonQuit_button_up"]
[connection signal="value_changed" from="IngameMenu/Menu/MusicSlider" to="." method="_on_MusicSlider_value_changed"]
[connection signal="value_changed" from="IngameMenu/Menu/SoundSlider" to="." method="_on_SoundSlider_value_changed"]
[connection signal="button_up" from="IngameMenu/DebugPromo" to="." method="_on_DebugPromo_button_up"]
5 changes: 4 additions & 1 deletion Src/HUD/MissionBriefing.gd
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,10 @@ const text = [

func setLevel(id):
# subtract 1 because of hq level
$BriefingLabel.bbcode_text = text[id - 1]
if id - 1 < text.size():
$BriefingLabel.bbcode_text = text[id - 1]
else:
print("Briefing Text out of Range")

if id < 3:
$MapSprite.frame = 0
Expand Down
25 changes: 12 additions & 13 deletions Src/Menu/Menu.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -17,26 +17,26 @@
[ext_resource path="res://Assets/Menu/Slider/tick.png" type="Texture" id=15]
[ext_resource path="res://Assets/Menu/Slider/grabber-item-selected.png" type="Texture" id=16]

[sub_resource type="DynamicFont" id=4]
[sub_resource type="DynamicFont" id=1]
font_data = ExtResource( 10 )

[sub_resource type="StyleBoxTexture" id=1]
[sub_resource type="StyleBoxTexture" id=2]
texture = ExtResource( 13 )
region_rect = Rect2( 0, 0, 12, 6 )
margin_left = 2.0
margin_right = 2.0
margin_top = 2.0
margin_bottom = 2.0

[sub_resource type="StyleBoxTexture" id=2]
[sub_resource type="StyleBoxTexture" id=3]
texture = ExtResource( 12 )
region_rect = Rect2( 0, 0, 12, 6 )
margin_left = 2.0
margin_right = 2.0
margin_top = 2.0
margin_bottom = 2.0

[sub_resource type="StyleBoxTexture" id=3]
[sub_resource type="StyleBoxTexture" id=4]
texture = ExtResource( 6 )
region_rect = Rect2( 0, 0, 12, 6 )
margin_left = 2.0
Expand All @@ -61,7 +61,6 @@ texture = ExtResource( 2 )
expand = true

[node name="Main" type="Control" parent="."]
visible = false
anchor_right = 1.0
anchor_bottom = 1.0
__meta__ = {
Expand Down Expand Up @@ -93,7 +92,7 @@ margin_left = 4.0
margin_top = 4.0
margin_right = -4.0
margin_bottom = -4.0
custom_fonts/mono_font = SubResource( 4 )
custom_fonts/mono_font = SubResource( 1 )
custom_fonts/bold_font = ExtResource( 7 )
custom_fonts/normal_font = ExtResource( 9 )
bbcode_text = "Loading DevLog...
Expand All @@ -102,7 +101,6 @@ text = "Loading DevLog...
"

[node name="LevelSelect" type="OptionButton" parent="Main"]
visible = false
margin_left = 8.0
margin_top = 24.0
margin_right = 152.0
Expand Down Expand Up @@ -152,6 +150,7 @@ margin_bottom = 328.0
label = "Exit"

[node name="Settings" type="Control" parent="."]
visible = false
anchor_right = 1.0
anchor_bottom = 1.0
__meta__ = {
Expand Down Expand Up @@ -181,9 +180,9 @@ margin_bottom = 136.0
custom_icons/tick = ExtResource( 15 )
custom_icons/grabber_highlight = ExtResource( 16 )
custom_icons/grabber = ExtResource( 14 )
custom_styles/slider = SubResource( 1 )
custom_styles/grabber_area_highlight = SubResource( 2 )
custom_styles/grabber_area = SubResource( 3 )
custom_styles/slider = SubResource( 2 )
custom_styles/grabber_area_highlight = SubResource( 3 )
custom_styles/grabber_area = SubResource( 4 )
max_value = 10.0
value = 5.0
tick_count = 10
Expand Down Expand Up @@ -216,9 +215,9 @@ margin_bottom = 168.0
custom_icons/tick = ExtResource( 15 )
custom_icons/grabber_highlight = ExtResource( 16 )
custom_icons/grabber = ExtResource( 14 )
custom_styles/slider = SubResource( 1 )
custom_styles/grabber_area_highlight = SubResource( 2 )
custom_styles/grabber_area = SubResource( 3 )
custom_styles/slider = SubResource( 2 )
custom_styles/grabber_area_highlight = SubResource( 3 )
custom_styles/grabber_area = SubResource( 4 )
max_value = 10.0
value = 5.0
tick_count = 10
Expand Down
1 change: 1 addition & 0 deletions project.godot
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@ Debug="*res://Src/_Autoloads/Debug.gd"

[debug]

gdscript/warnings/unused_argument=false
gdscript/warnings/return_value_discarded=false

[display]
Expand Down

0 comments on commit 580fa69

Please sign in to comment.