Merge branch 'main' of https://github.com/MarcEricMartel/MAD
This commit is contained in:
commit
e702784f63
1
.gitignore
vendored
1
.gitignore
vendored
@ -2,6 +2,7 @@
|
||||
.godot/
|
||||
|
||||
# Godot-specific ignores
|
||||
*.import
|
||||
.import/
|
||||
export.cfg
|
||||
export_presets.cfg
|
||||
|
6
Mad.csproj
Normal file
6
Mad.csproj
Normal file
@ -0,0 +1,6 @@
|
||||
<Project Sdk="Godot.NET.Sdk/4.0.3">
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<EnableDynamicLoading>true</EnableDynamicLoading>
|
||||
</PropertyGroup>
|
||||
</Project>
|
19
Mad.sln
Normal file
19
Mad.sln
Normal file
@ -0,0 +1,19 @@
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 2012
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Mad", "Mad.csproj", "{79DB0A7D-6964-4631-A7E4-1C955796B6CA}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
ExportDebug|Any CPU = ExportDebug|Any CPU
|
||||
ExportRelease|Any CPU = ExportRelease|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{79DB0A7D-6964-4631-A7E4-1C955796B6CA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{79DB0A7D-6964-4631-A7E4-1C955796B6CA}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{79DB0A7D-6964-4631-A7E4-1C955796B6CA}.ExportDebug|Any CPU.ActiveCfg = ExportDebug|Any CPU
|
||||
{79DB0A7D-6964-4631-A7E4-1C955796B6CA}.ExportDebug|Any CPU.Build.0 = ExportDebug|Any CPU
|
||||
{79DB0A7D-6964-4631-A7E4-1C955796B6CA}.ExportRelease|Any CPU.ActiveCfg = ExportRelease|Any CPU
|
||||
{79DB0A7D-6964-4631-A7E4-1C955796B6CA}.ExportRelease|Any CPU.Build.0 = ExportRelease|Any CPU
|
||||
EndGlobalSection
|
||||
EndGlobal
|
48
menu/start_game_menu.cs
Normal file
48
menu/start_game_menu.cs
Normal file
@ -0,0 +1,48 @@
|
||||
using Godot;
|
||||
using System;
|
||||
|
||||
public partial class start_game_menu : Control
|
||||
{
|
||||
private const string _path = "/root/StartGameMenu/";
|
||||
private Button _localMulti, _single, _LANMulti, _join, _host, _cancel, _quit, _yes, _no;
|
||||
private Label _error;
|
||||
|
||||
private string Error {
|
||||
set { _error.Set("text", value); }
|
||||
}
|
||||
|
||||
// Called when the node enters the scene tree for the first time.
|
||||
public override void _Ready()
|
||||
{
|
||||
_single = GetNode<Button>(_path + "Btn_Single");
|
||||
_localMulti = GetNode<Button>(_path + "Btn_LocalMulti");
|
||||
_LANMulti = GetNode<Button>(_path + "Btn_LANMulti");
|
||||
|
||||
_error = GetNode<Label>(_path + "lbl_err");
|
||||
_single.Pressed += () => startSingleGame();
|
||||
_localMulti.Pressed += () => startLocalMultiGame();
|
||||
_LANMulti.Pressed += () => selectLANMultiGame();
|
||||
_host.Pressed += () => startLANMultiGame();
|
||||
_join.Pressed += () => startLANMultiGame(false);
|
||||
}
|
||||
|
||||
// Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
public override void _Process(double delta)
|
||||
{
|
||||
}
|
||||
|
||||
private void startSingleGame() {
|
||||
Error = "single";
|
||||
}
|
||||
private void startLocalMultiGame() {
|
||||
Error = "localmulti";
|
||||
}
|
||||
private void startLANMultiGame(bool isHost = true) {
|
||||
|
||||
}
|
||||
|
||||
private void selectLANMultiGame() {
|
||||
Error = "lanmulti";
|
||||
}
|
||||
|
||||
}
|
138
menu/start_game_menu.tscn
Normal file
138
menu/start_game_menu.tscn
Normal file
@ -0,0 +1,138 @@
|
||||
[gd_scene load_steps=6 format=3 uid="uid://4tym1auav4yv"]
|
||||
|
||||
[ext_resource type="Script" path="res://menu/start_game_menu.cs" id="1_0k2xm"]
|
||||
|
||||
[sub_resource type="LabelSettings" id="LabelSettings_n38oc"]
|
||||
font_size = 290
|
||||
|
||||
[sub_resource type="InputEventKey" id="InputEventKey_x36ok"]
|
||||
pressed = true
|
||||
keycode = 4194309
|
||||
|
||||
[sub_resource type="InputEventKey" id="InputEventKey_hjkcu"]
|
||||
pressed = true
|
||||
keycode = 4194310
|
||||
|
||||
[sub_resource type="Shortcut" id="Shortcut_pweny"]
|
||||
events = [SubResource("InputEventKey_x36ok"), SubResource("InputEventKey_hjkcu")]
|
||||
|
||||
[node name="StartGameMenu" 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_0k2xm")
|
||||
|
||||
[node name="Lbl_Title" type="Label" parent="."]
|
||||
layout_mode = 0
|
||||
offset_left = 547.0
|
||||
offset_top = 224.0
|
||||
offset_right = 1460.0
|
||||
offset_bottom = 622.0
|
||||
text = "M.A.D"
|
||||
label_settings = SubResource("LabelSettings_n38oc")
|
||||
|
||||
[node name="Btn_LocalMulti" type="Button" parent="."]
|
||||
layout_mode = 0
|
||||
offset_left = 863.0
|
||||
offset_top = 672.0
|
||||
offset_right = 1046.0
|
||||
offset_bottom = 703.0
|
||||
text = "Local Multiplayer"
|
||||
|
||||
[node name="Btn_Single" type="Button" parent="."]
|
||||
layout_mode = 0
|
||||
offset_left = 617.0
|
||||
offset_top = 674.0
|
||||
offset_right = 800.0
|
||||
offset_bottom = 705.0
|
||||
shortcut = SubResource("Shortcut_pweny")
|
||||
text = "Single Player
|
||||
"
|
||||
|
||||
[node name="Btn_LANMulti" type="Button" parent="."]
|
||||
layout_mode = 0
|
||||
offset_left = 1097.0
|
||||
offset_top = 670.0
|
||||
offset_right = 1279.0
|
||||
offset_bottom = 701.0
|
||||
text = "LAN Multiplayer"
|
||||
|
||||
[node name="Btn_Host" type="Button" parent="."]
|
||||
layout_mode = 0
|
||||
offset_left = 614.0
|
||||
offset_top = 710.0
|
||||
offset_right = 1285.0
|
||||
offset_bottom = 741.0
|
||||
text = "Host"
|
||||
|
||||
[node name="Btn_Join" type="Button" parent="."]
|
||||
layout_mode = 0
|
||||
offset_left = 613.0
|
||||
offset_top = 748.0
|
||||
offset_right = 825.0
|
||||
offset_bottom = 779.0
|
||||
text = "Join
|
||||
"
|
||||
|
||||
[node name="Btn_Cancel" type="Button" parent="."]
|
||||
layout_mode = 0
|
||||
offset_left = 615.0
|
||||
offset_top = 787.0
|
||||
offset_right = 939.0
|
||||
offset_bottom = 818.0
|
||||
text = "Cancel"
|
||||
|
||||
[node name="Btn_Quit" type="Button" parent="."]
|
||||
layout_mode = 0
|
||||
offset_left = 949.0
|
||||
offset_top = 786.0
|
||||
offset_right = 1283.0
|
||||
offset_bottom = 817.0
|
||||
text = "Quit Game"
|
||||
|
||||
[node name="Btn_Yes" type="Button" parent="."]
|
||||
layout_mode = 0
|
||||
offset_left = 614.0
|
||||
offset_top = 635.0
|
||||
offset_right = 939.0
|
||||
offset_bottom = 666.0
|
||||
text = "Yes"
|
||||
|
||||
[node name="Btn_No" type="Button" parent="."]
|
||||
layout_mode = 0
|
||||
offset_left = 949.0
|
||||
offset_top = 634.0
|
||||
offset_right = 1283.0
|
||||
offset_bottom = 665.0
|
||||
text = "No"
|
||||
|
||||
[node name="txt_IP" type="TextEdit" parent="."]
|
||||
layout_mode = 0
|
||||
offset_left = 1034.0
|
||||
offset_top = 749.0
|
||||
offset_right = 1286.0
|
||||
offset_bottom = 779.0
|
||||
|
||||
[node name="lbl_IP" type="Label" parent="."]
|
||||
layout_mode = 0
|
||||
offset_left = 835.0
|
||||
offset_top = 750.0
|
||||
offset_right = 1025.0
|
||||
offset_bottom = 776.0
|
||||
text = "Remote Host IP Address:"
|
||||
|
||||
[node name="lbl_err" type="Label" parent="."]
|
||||
layout_mode = 1
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
offset_left = 627.0
|
||||
offset_top = 580.0
|
||||
offset_right = -644.0
|
||||
offset_bottom = -461.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
horizontal_alignment = 1
|
@ -11,9 +11,15 @@ config_version=5
|
||||
[application]
|
||||
|
||||
config/name="Mad"
|
||||
config/features=PackedStringArray("4.0", "Forward Plus")
|
||||
config/features=PackedStringArray("4.0", "C#", "Forward Plus")
|
||||
config/icon="res://icon.svg"
|
||||
|
||||
[display]
|
||||
|
||||
window/size/viewport_width=1920
|
||||
window/size/viewport_height=1080
|
||||
window/size/mode=3
|
||||
|
||||
[dotnet]
|
||||
|
||||
project/assembly_name="Mad"
|
||||
|
Loading…
Reference in New Issue
Block a user