Skip to content
This repository was archived by the owner on May 8, 2022. It is now read-only.
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .import/combat.svg-330cedff7866d8046d53870e9578b4bc.md5
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
source_md5="272177dcc86949b0d6a987dcf04c362b"
dest_md5="bac091e0d109587c6d519c69aa2a1b17"

Binary file not shown.
3 changes: 2 additions & 1 deletion audio/audio_scene_singleton.gd
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
class_name AudioSceneSingleton
extends Node


onready var click_sound = $AudioStackingClick


func play_click():
if click_sound != null:
click_sound.play_sound()
2 changes: 1 addition & 1 deletion gui/circular_button.gd
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ func _draw_texture():
var center = rect_size / 2.0
var middle_angle = deg2rad(angle_start + angle_end) / 2.0
var position = get_vector_radial(middle_angle, (radius_out + radius_in) / 2.0 * rect_size / 2.0)
var rect_rexture = Rect2(center - texture_size / 2.0 + position,texture_size)
var rect_rexture = Rect2(center - texture_size / 2.0 + position, texture_size)
draw_texture_rect(texture,rect_rexture,false)


Expand Down
11 changes: 11 additions & 0 deletions hud/hud_menu.gd
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ onready var button_container_right = $HBoxContainer/ButtonContainerRight
onready var menu_button = $HBoxContainer/ButtonContainerRight/SelectablePanelContainerMenu
onready var popup_menu = $HBoxContainer/ButtonContainerRight/SelectablePanelContainerMenu/PopupMenu
onready var finance_button = $HBoxContainer/ButtonContainerRight/SelectablePanelContainerFinance
onready var combat_button = $HBoxContainer/ButtonContainerRight/CombatReport


func _ready():
Expand All @@ -24,6 +25,7 @@ func _ready():
popup_menu.connect("id_pressed", self, "_on_id_pressed")
texture_rect.texture = _game_data.player.faction.banner
finance_button.connect("pressed", self, "_on_finance_menu_pressed")
combat_button.connect("pressed", self, "_on_combat_button_pressed")


func set_menu_layer(node):
Expand Down Expand Up @@ -83,3 +85,12 @@ func _on_finance_menu_pressed():
func _on_menu_layer_menu_closed(menu_name):
if menu_name == "menu_finance":
finance_button.is_selected = false
elif menu_name == "menu_combat_report":
combat_button.is_selected = false


func _on_combat_button_pressed():
if combat_button.is_selected:
menu_layer.request_menu("menu_combat_report")
else:
menu_layer.close_menu("menu_combat_report")
71 changes: 53 additions & 18 deletions hud/hud_menu.tscn
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
[gd_scene load_steps=11 format=2]
[gd_scene load_steps=12 format=2]

[ext_resource path="res://hud/hud_menu.gd" type="Script" id=1]
[ext_resource path="res://.import/banner.png-74e88a02fde8130f5f843aba121c4815.res" type="Texture" id=2]
[ext_resource path="res://gui/selectable_panel_container.gd" type="Script" id=3]
[ext_resource path="res://hud/rounded_selectable_panel_left.gd" type="Script" id=4]
[ext_resource path="res://hud/rounded_selectable_panel_right.gd" type="Script" id=5]

[sub_resource type="Image" id=6]
[sub_resource type="Image" id=7]
data = {
"data": PoolByteArray( 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ),
"format": "LumAlpha8",
Expand All @@ -18,7 +18,7 @@ data = {
[sub_resource type="ImageTexture" id=2]
flags = 4
flags = 4
image = SubResource( 6 )
image = SubResource( 7 )
size = Vector2( 16, 16 )

[sub_resource type="StyleBoxTexture" id=3]
Expand All @@ -31,10 +31,14 @@ margin_bottom = 2.0

[sub_resource type="StreamTexture" id=4]
flags = 4
load_path = "res://.import/money_64px.png-14695073b2b7bd4dbc437a5f1f5458b7.stex"
load_path = "res://.import/combat.svg-330cedff7866d8046d53870e9578b4bc.stex"

[sub_resource type="StreamTexture" id=5]
flags = 4
load_path = "res://.import/money_64px.png-14695073b2b7bd4dbc437a5f1f5458b7.stex"

[sub_resource type="StreamTexture" id=6]
flags = 4
load_path = "res://.import/G_P_Logout_64px.png-96df486bc5e14ad2595297b93d598753.stex"

[node name="HudMenu" type="VBoxContainer"]
Expand Down Expand Up @@ -69,10 +73,6 @@ margin_bottom = 54.0
size_flags_horizontal = 3
custom_styles/panel = SubResource( 3 )
script = ExtResource( 4 )
base_style = null
hover_style = null
selected_style = null
focus_style = null

[node name="SelectablePanelContainer" type="PanelContainer" parent="HBoxContainer/ButtonContainerLeft"]
margin_left = 260.0
Expand Down Expand Up @@ -101,8 +101,43 @@ mouse_filter = 2
size_flags_horizontal = 3
custom_constants/separation = 1

[node name="CombatReport" type="PanelContainer" parent="HBoxContainer/ButtonContainerRight"]
margin_right = 172.0
margin_bottom = 54.0
size_flags_horizontal = 3
custom_styles/panel = SubResource( 3 )
script = ExtResource( 3 )

[node name="MarginContainer" type="MarginContainer" parent="HBoxContainer/ButtonContainerRight/CombatReport"]
margin_left = 2.0
margin_top = 2.0
margin_right = 170.0
margin_bottom = 52.0
mouse_filter = 2
custom_constants/margin_right = 10
custom_constants/margin_top = 10
custom_constants/margin_left = 10
custom_constants/margin_bottom = 10

[node name="HBoxContainer" type="HBoxContainer" parent="HBoxContainer/ButtonContainerRight/CombatReport/MarginContainer"]
margin_left = 10.0
margin_top = 10.0
margin_right = 158.0
margin_bottom = 40.0
mouse_filter = 2
alignment = 1

[node name="TextureRect" type="TextureRect" parent="HBoxContainer/ButtonContainerRight/CombatReport/MarginContainer/HBoxContainer"]
margin_right = 148.0
margin_bottom = 30.0
size_flags_horizontal = 3
texture = SubResource( 4 )
expand = true
stretch_mode = 6

[node name="SelectablePanelContainerFinance" type="PanelContainer" parent="HBoxContainer/ButtonContainerRight"]
margin_right = 259.0
margin_left = 173.0
margin_right = 346.0
margin_bottom = 54.0
size_flags_horizontal = 3
custom_styles/panel = SubResource( 3 )
Expand All @@ -111,7 +146,7 @@ script = ExtResource( 3 )
[node name="MarginContainer" type="MarginContainer" parent="HBoxContainer/ButtonContainerRight/SelectablePanelContainerFinance"]
margin_left = 2.0
margin_top = 2.0
margin_right = 257.0
margin_right = 171.0
margin_bottom = 52.0
mouse_filter = 2
custom_constants/margin_right = 10
Expand All @@ -122,21 +157,21 @@ custom_constants/margin_bottom = 10
[node name="HBoxContainer" type="HBoxContainer" parent="HBoxContainer/ButtonContainerRight/SelectablePanelContainerFinance/MarginContainer"]
margin_left = 10.0
margin_top = 10.0
margin_right = 245.0
margin_right = 159.0
margin_bottom = 40.0
mouse_filter = 2
alignment = 1

[node name="TextureRect" type="TextureRect" parent="HBoxContainer/ButtonContainerRight/SelectablePanelContainerFinance/MarginContainer/HBoxContainer"]
margin_right = 235.0
margin_right = 149.0
margin_bottom = 30.0
size_flags_horizontal = 3
texture = SubResource( 4 )
texture = SubResource( 5 )
expand = true
stretch_mode = 6

[node name="SelectablePanelContainerMenu" type="PanelContainer" parent="HBoxContainer/ButtonContainerRight"]
margin_left = 260.0
margin_left = 347.0
margin_right = 520.0
margin_bottom = 54.0
size_flags_horizontal = 3
Expand All @@ -150,7 +185,7 @@ focus_style = null
[node name="MarginContainer" type="MarginContainer" parent="HBoxContainer/ButtonContainerRight/SelectablePanelContainerMenu"]
margin_left = 2.0
margin_top = 2.0
margin_right = 258.0
margin_right = 171.0
margin_bottom = 52.0
mouse_filter = 2
custom_constants/margin_right = 10
Expand All @@ -161,16 +196,16 @@ custom_constants/margin_bottom = 10
[node name="HBoxContainer" type="HBoxContainer" parent="HBoxContainer/ButtonContainerRight/SelectablePanelContainerMenu/MarginContainer"]
margin_left = 10.0
margin_top = 10.0
margin_right = 246.0
margin_right = 159.0
margin_bottom = 40.0
mouse_filter = 2
alignment = 1

[node name="TextureRect" type="TextureRect" parent="HBoxContainer/ButtonContainerRight/SelectablePanelContainerMenu/MarginContainer/HBoxContainer"]
margin_right = 236.0
margin_right = 149.0
margin_bottom = 30.0
size_flags_horizontal = 3
texture = SubResource( 5 )
texture = SubResource( 6 )
expand = true
stretch_mode = 6

Expand Down
76 changes: 76 additions & 0 deletions hud/hud_menu/combat_report/combat_report.tscn
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
[gd_scene load_steps=8 format=2]

[ext_resource path="res://gui/menu/menu_container.gd" type="Script" id=1]
[ext_resource path="res://gui/menu/menu_header.tscn" type="PackedScene" id=2]
[ext_resource path="res://gui/menu/menu_header.gd" type="Script" id=3]
[ext_resource path="res://gui/menu/menu_body.gd" type="Script" id=4]

[sub_resource type="Image" id=4]
data = {
"data": PoolByteArray( 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,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0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ),
"format": "LumAlpha8",
"height": 16,
"mipmaps": false,
"width": 16
}

[sub_resource type="ImageTexture" id=2]
flags = 4
flags = 4
image = SubResource( 4 )
size = Vector2( 16, 16 )

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

[node name="CombatReportMenu" type="VBoxContainer"]
anchor_right = 1.0
anchor_bottom = 1.0
custom_constants/separation = 0
script = ExtResource( 1 )
__meta__ = {
"_edit_use_anchors_": false
}

[node name="MenuHeader" type="PanelContainer" parent="." instance=ExtResource( 2 )]
margin_right = 1920.0
margin_bottom = 31.0
rect_min_size = Vector2( 0, 31 )
custom_styles/panel = SubResource( 3 )
script = ExtResource( 3 )
__meta__ = {
"_edit_use_anchors_": false
}
text = "no_translate.menu_title"

[node name="MenuBody" type="PanelContainer" parent="."]
show_behind_parent = true
margin_top = 31.0
margin_right = 1920.0
margin_bottom = 1080.0
size_flags_vertical = 3
script = ExtResource( 4 )

[node name="Body" type="VBoxContainer" parent="MenuBody"]
margin_left = 7.0
margin_top = 7.0
margin_right = 1913.0
margin_bottom = 1042.0
size_flags_vertical = 3

[node name="ScrollContainer" type="ScrollContainer" parent="MenuBody/Body"]
margin_right = 1906.0
margin_bottom = 1035.0
size_flags_vertical = 3
scroll_horizontal_enabled = false

[node name="VBoxContainer" type="VBoxContainer" parent="MenuBody/Body/ScrollContainer"]
margin_right = 1906.0
margin_bottom = 1035.0
size_flags_horizontal = 3
size_flags_vertical = 3
50 changes: 50 additions & 0 deletions hud/hud_menu/combat_report/report.tscn
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
[gd_scene format=2]

[node name="Report" type="PanelContainer"]
anchor_right = 1.0
anchor_bottom = 1.0
__meta__ = {
"_edit_use_anchors_": false
}

[node name="MarginContainer" type="MarginContainer" parent="."]
margin_left = 7.0
margin_top = 7.0
margin_right = 1913.0
margin_bottom = 1073.0

[node name="Container" type="VBoxContainer" parent="MarginContainer"]
margin_right = 1906.0
margin_bottom = 1066.0

[node name="Header" type="PanelContainer" parent="MarginContainer/Container"]
margin_right = 1906.0
margin_bottom = 46.0

[node name="HBoxContainer" type="HBoxContainer" parent="MarginContainer/Container/Header"]
margin_left = 7.0
margin_top = 7.0
margin_right = 1899.0
margin_bottom = 39.0
alignment = 1

[node name="TextureRect" type="TextureRect" parent="MarginContainer/Container/Header/HBoxContainer"]
margin_right = 32.0
margin_bottom = 32.0
rect_min_size = Vector2( 32, 32 )
expand = true
stretch_mode = 6

[node name="Label" type="Label" parent="MarginContainer/Container/Header/HBoxContainer"]
margin_left = 36.0
margin_top = 9.0
margin_right = 1892.0
margin_bottom = 23.0
size_flags_horizontal = 3
align = 1
valign = 1

[node name="Body" type="VBoxContainer" parent="MarginContainer/Container"]
margin_top = 50.0
margin_right = 1906.0
margin_bottom = 50.0
2 changes: 2 additions & 0 deletions hud/menu_layer.gd
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,15 @@ const MENU_HANGAR = preload("res://hud/system/buildings/hangar.tscn")
const MENU_CONSTRUCTION = preload("res://hud/system/buildings/contruction/construction_menu.tscn")
const MENU_FINANCE = preload("res://hud/hud_menu/finance/finance_menu.tscn")
const MENU_OPTIONS = preload("res://hud/hud_menu/options/menu_option_hud.tscn")
const MENU_COMBAT_REPORT = preload("res://hud/hud_menu/combat_report/combat_report.tscn")

var menus = {
"menu_fleet" : MENU_FLEET.instance(),
"menu_shipyard" : MENU_HANGAR.instance(),
"menu_construction" : MENU_CONSTRUCTION.instance(),
"menu_finance" : MENU_FINANCE.instance(),
"menu_options" : MENU_OPTIONS.instance(),
"menu_combat_report" : MENU_COMBAT_REPORT.instance(),
}


Expand Down
6 changes: 6 additions & 0 deletions project.godot
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ _global_script_classes=[ {
"path": "res://audio/audio_resource.gd"
}, {
"base": "Node",
"class": "AudioSceneSingleton",
"language": "GDScript",
"path": "res://audio/audio_scene_singleton.gd"
}, {
"base": "Node",
"class": "AudioStacking",
"language": "GDScript",
"path": "res://audio/audio_stacking.gd"
Expand Down Expand Up @@ -296,6 +301,7 @@ _global_script_classes=[ {
} ]
_global_script_class_icons={
"AudioResource": "",
"AudioSceneSingleton": "",
"AudioStacking": "res://resources/editor/audio_stacking.svg",
"AudioStacking2D": "res://resources/editor/audio_stacking_2d.svg",
"AudioStacking3D": "res://resources/editor/audio_stacking_3d.svg",
Expand Down
Loading