Skip to content

Commit

Permalink
Updated main menu
Browse files Browse the repository at this point in the history
Added music credits, changed colour scheme, change description label size.
  • Loading branch information
bedder committed Nov 28, 2014
1 parent 9e095d3 commit e63a85e
Show file tree
Hide file tree
Showing 2 changed files with 71 additions and 4 deletions.
65 changes: 62 additions & 3 deletions Assets/Scenes/DeliverableLevels/MainMenu.unity
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ Camera:
m_Enabled: 1
serializedVersion: 2
m_ClearFlags: 1
m_BackGroundColor: {r: .192156866, g: .301960796, b: .474509805, a: .0196078438}
m_BackGroundColor: {r: 0, g: 0, b: 0, a: .0196078438}
m_NormalizedViewPortRect:
serializedVersion: 2
x: 0
Expand Down Expand Up @@ -248,7 +248,7 @@ MonoBehaviour:
m_Name:
m_Normal:
m_Background: {fileID: 0}
m_TextColor: {r: 0, g: 0, b: 0, a: 1}
m_TextColor: {r: 1, g: 1, b: 1, a: 1}
m_Hover:
m_Background: {fileID: 0}
m_TextColor: {r: 0, g: 0, b: 0, a: 1}
Expand Down Expand Up @@ -366,7 +366,7 @@ MonoBehaviour:
m_Name:
m_Normal:
m_Background: {fileID: 0}
m_TextColor: {r: 0, g: 0, b: 0, a: 1}
m_TextColor: {r: 1, g: 1, b: 1, a: 1}
m_Hover:
m_Background: {fileID: 0}
m_TextColor: {r: 0, g: 0, b: 0, a: 1}
Expand Down Expand Up @@ -421,6 +421,65 @@ MonoBehaviour:
m_FixedHeight: 0
m_StretchWidth: 1
m_StretchHeight: 0
musicCreditsStyle:
m_Name:
m_Normal:
m_Background: {fileID: 0}
m_TextColor: {r: 1, g: 1, b: 1, a: 1}
m_Hover:
m_Background: {fileID: 0}
m_TextColor: {r: 0, g: 0, b: 0, a: 1}
m_Active:
m_Background: {fileID: 0}
m_TextColor: {r: 0, g: 0, b: 0, a: 1}
m_Focused:
m_Background: {fileID: 0}
m_TextColor: {r: 0, g: 0, b: 0, a: 1}
m_OnNormal:
m_Background: {fileID: 0}
m_TextColor: {r: 0, g: 0, b: 0, a: 1}
m_OnHover:
m_Background: {fileID: 0}
m_TextColor: {r: 0, g: 0, b: 0, a: 1}
m_OnActive:
m_Background: {fileID: 0}
m_TextColor: {r: 0, g: 0, b: 0, a: 1}
m_OnFocused:
m_Background: {fileID: 0}
m_TextColor: {r: 0, g: 0, b: 0, a: 1}
m_Border:
m_Left: 0
m_Right: 0
m_Top: 0
m_Bottom: 0
m_Margin:
m_Left: 0
m_Right: 0
m_Top: 0
m_Bottom: 0
m_Padding:
m_Left: 0
m_Right: 0
m_Top: 0
m_Bottom: 0
m_Overflow:
m_Left: 0
m_Right: 0
m_Top: 0
m_Bottom: 0
m_Font: {fileID: 12800000, guid: a9f720194e0014e4583ef412eb6e56cf, type: 3}
m_FontSize: 8
m_FontStyle: 0
m_Alignment: 4
m_WordWrap: 0
m_RichText: 1
m_TextClipping: 0
m_ImagePosition: 0
m_ContentOffset: {x: 0, y: 0}
m_FixedWidth: 0
m_FixedHeight: 0
m_StretchWidth: 1
m_StretchHeight: 0
lightInfantryPrefab: {fileID: 100030, guid: 7fb45262613a7b84d895506282b1a970, type: 2}
heavyInfantryPrefab: {fileID: 100030, guid: 745fdeaa86e71ca449d8127d7db0a381, type: 2}
engineerPrefab: {fileID: 100030, guid: 0e96ecf5974c97340ac6a81cf5607a96, type: 2}
Expand Down
10 changes: 9 additions & 1 deletion Assets/Scripts/MainMenu.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ public class MainMenu : MonoBehaviour {
public GUIStyle buttonStyle;
public GUIStyle classNameStyle;
public GUIStyle classDescriptionStyle;
public GUIStyle musicCreditsStyle;

public GameObject lightInfantryPrefab;
public GameObject heavyInfantryPrefab;
Expand All @@ -16,7 +17,7 @@ public class MainMenu : MonoBehaviour {
private int padY = 5;
private int buttonWidth = 100;
private int classNameWidth = 300;
private int classDescriptionWidth = 300;
private int classDescriptionWidth = 350;
private int buttonHeight = 20;

public Texture2D logo;
Expand All @@ -41,6 +42,8 @@ public class MainMenu : MonoBehaviour {

private Rect startButton;

private Rect musicCredits;

private string[] classNames;
private string[] classDescriptions;

Expand Down Expand Up @@ -73,6 +76,8 @@ void Start () {
classNames = new string[4] { "Light Infantry", "Heavy Infantry", "Engineer", "Medic" };
classDescriptions = new string[4] { "Want to run around? The light infantry might be for you. He's not quite as heavily armoured as the other classes but he does have the ability to sprint. Handy with all these enemies around.",
"Everyone likes explosions, it's a fact of life, but the heavy infantry likes them a little bit more than the average person. Throw grenades without the enrgy cost by pressing the class key (Default: ENTER or F).", "In theory the engineer is able to slow down the teleportation timer, meaning that you can control the flow of the game a bit better. But engineering is hard, and this feature is still in the process of being implemented.", "Medics are great for multiplayer as they allow you to heal your allies. Multiplayer is a stretch-goal on our kickstarter. So in reality the medic is just a worse infantryman." };

musicCredits = new Rect(0, Screen.height - 20, Screen.width, 20);
}

void OnGUI() {
Expand Down Expand Up @@ -121,5 +126,8 @@ void OnGUI() {
}
GUI.EndGroup();
}
if (GUI.Button(musicCredits, "Music by Rakohus (www.rakoh.us)", musicCreditsStyle)) {
Application.OpenURL("http://www.rakoh.us");
}
}
}

0 comments on commit e63a85e

Please sign in to comment.