Skip to content

Commit

Permalink
Merge pull request #205 from C7-Game/Carthage-Background
Browse files Browse the repository at this point in the history
Add a Carthage background
  • Loading branch information
QuintillusCFC authored Apr 9, 2022
2 parents 905f090 + 603fdbc commit 2ba80fb
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 13 deletions.
27 changes: 15 additions & 12 deletions C7/MainMenu.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ public class MainMenu : Node2D
Util.Civ3FileDialog LoadScenarioDialog;
GlobalSingleton Global;

readonly int MENU_OFFSET_FROM_TOP = 180;
readonly int MENU_OFFSET_FROM_LEFT = 180;

// Called when the node enters the scene tree for the first time.
public override void _Ready()
{
Expand Down Expand Up @@ -46,16 +49,16 @@ private void DisplayTitleScreen()
InactiveButton = Util.LoadTextureFromPCX("Art/buttonsFINAL.pcx", 1, 1, 20, 20);
HoverButton = Util.LoadTextureFromPCX("Art/buttonsFINAL.pcx", 22, 1, 20, 20);

AddButton("New Game", 160, "StartGame");
AddButton("Quick Start", 195, "StartGame");
AddButton("Tutorial", 230, "StartGame");
AddButton("Load Game", 265, "LoadGame");
AddButton("Load Scenario", 300, "LoadScenario");
AddButton("Hall of Fame", 335, "HallOfFame");
AddButton("Preferences", 370, "Preferences");
AddButton("Audio Preferences", 405, "Preferences");
AddButton("Credits", 440, "showCredits");
AddButton("Exit", 475, "_on_Exit_pressed");
AddButton("New Game", 0, "StartGame");
AddButton("Quick Start", 35, "StartGame");
AddButton("Tutorial", 70, "StartGame");
AddButton("Load Game", 105, "LoadGame");
AddButton("Load Scenario", 140, "LoadScenario");
AddButton("Hall of Fame", 175, "HallOfFame");
AddButton("Preferences", 210, "Preferences");
AddButton("Audio Preferences", 245, "Preferences");
AddButton("Credits", 280, "showCredits");
AddButton("Exit", 315, "_on_Exit_pressed");

// Hide select home folder if valid path is present as proven by reaching this point in code
SetCiv3Home.Visible = false;
Expand All @@ -81,14 +84,14 @@ private void AddButton(string label, int verticalPosition, string actionName)
TextureButton newButton = new TextureButton();
newButton.TextureNormal = InactiveButton;
newButton.TextureHover = HoverButton;
newButton.SetPosition(new Vector2(40, verticalPosition));
newButton.SetPosition(new Vector2(MENU_OFFSET_FROM_LEFT, MENU_OFFSET_FROM_TOP + verticalPosition));
MainMenuBackground.AddChild(newButton);
newButton.Connect("pressed", this, actionName);

Button newButtonLabel = new Button();
newButtonLabel.Text = label;

newButtonLabel.SetPosition(new Vector2(65, verticalPosition + BUTTON_LABEL_OFFSET));
newButtonLabel.SetPosition(new Vector2(MENU_OFFSET_FROM_LEFT + 25, MENU_OFFSET_FROM_TOP + verticalPosition + BUTTON_LABEL_OFFSET));
MainMenuBackground.AddChild(newButtonLabel);
newButtonLabel.Connect("pressed", this, actionName);
}
Expand Down
Binary file modified C7/Title_Screen.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 2 additions & 1 deletion C7/credits.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[color=black][center]
[b]C7 0.1 "Babylon"[/b]
[b]C7 0.2 "Carthage" Preview 1[/b]
[url]c7-game.github.io[/url]

[b]An open source project by the
Expand All @@ -9,6 +9,7 @@ made with Godot Engine[/b]

[b]Developers[/b]

Armageddon1
Caro-Kann
Flintlock / maxpetul
JimOfLeisure
Expand Down

0 comments on commit 2ba80fb

Please sign in to comment.