mennu
This commit is contained in:
parent
05e704e3d7
commit
e0dc6f75f0
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
|
47
menu/start_game_menu.cs
Normal file
47
menu/start_game_menu.cs
Normal file
@ -0,0 +1,47 @@
|
||||
using Godot;
|
||||
using System;
|
||||
|
||||
public partial class start_game_menu : Control
|
||||
{
|
||||
private const string _path = "/root/StartGameMenu/";
|
||||
private Button _localMulti, _single, _LANMulti, _join, _host;
|
||||
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";
|
||||
}
|
||||
|
||||
}
|
100
menu/start_game_menu.tscn
Normal file
100
menu/start_game_menu.tscn
Normal file
@ -0,0 +1,100 @@
|
||||
[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 = 159.0
|
||||
offset_top = -1.0
|
||||
offset_right = 1072.0
|
||||
offset_bottom = 397.0
|
||||
text = "M.A.D"
|
||||
label_settings = SubResource("LabelSettings_n38oc")
|
||||
|
||||
[node name="Btn_LocalMulti" type="Button" parent="."]
|
||||
layout_mode = 0
|
||||
offset_left = 490.0
|
||||
offset_top = 406.0
|
||||
offset_right = 673.0
|
||||
offset_bottom = 439.0
|
||||
text = "Local Multiplayer"
|
||||
|
||||
[node name="Btn_Single" type="Button" parent="."]
|
||||
layout_mode = 0
|
||||
offset_left = 244.0
|
||||
offset_top = 406.0
|
||||
offset_right = 427.0
|
||||
offset_bottom = 441.0
|
||||
shortcut = SubResource("Shortcut_pweny")
|
||||
text = "Single Player
|
||||
"
|
||||
|
||||
[node name="Btn_LANMulti" type="Button" parent="."]
|
||||
layout_mode = 0
|
||||
offset_left = 724.0
|
||||
offset_top = 399.0
|
||||
offset_right = 906.0
|
||||
offset_bottom = 437.0
|
||||
text = "LAN Multiplayer"
|
||||
|
||||
[node name="Btn_Host" type="Button" parent="."]
|
||||
layout_mode = 0
|
||||
offset_left = 241.0
|
||||
offset_top = 446.0
|
||||
offset_right = 912.0
|
||||
offset_bottom = 477.0
|
||||
text = "Host"
|
||||
|
||||
[node name="Btn_Join" type="Button" parent="."]
|
||||
layout_mode = 0
|
||||
offset_left = 240.0
|
||||
offset_top = 484.0
|
||||
offset_right = 452.0
|
||||
offset_bottom = 515.0
|
||||
text = "Join
|
||||
"
|
||||
|
||||
[node name="txt_IP" type="TextEdit" parent="."]
|
||||
layout_mode = 0
|
||||
offset_left = 661.0
|
||||
offset_top = 485.0
|
||||
offset_right = 913.0
|
||||
offset_bottom = 515.0
|
||||
|
||||
[node name="lbl_IP" type="Label" parent="."]
|
||||
layout_mode = 0
|
||||
offset_left = 462.0
|
||||
offset_top = 486.0
|
||||
offset_right = 652.0
|
||||
offset_bottom = 512.0
|
||||
text = "Remote Host IP Address:"
|
||||
|
||||
[node name="lbl_err" type="Label" parent="."]
|
||||
layout_mode = 0
|
||||
offset_left = 242.0
|
||||
offset_top = 524.0
|
||||
offset_right = 908.0
|
||||
offset_bottom = 547.0
|
@ -11,7 +11,7 @@ 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"
|
||||
|
||||
[dotnet]
|
||||
|
Loading…
Reference in New Issue
Block a user