private void InitializeGui() { backgroundColor = new Color(0, 110, 0); int resx = Program.LoadIntSetting("resx"); int resy = Program.LoadIntSetting("resy"); int buttonWidth = Program.LoadIntSetting("buttonWidth"); int buttonHeight = Program.LoadIntSetting("buttonHeight"); text = new CuteText("", new Vector2f(50, 50)); text.setString("IP: "); btnToMenu = new Button(buttonWidth, buttonHeight); btnToMenu.setPosition(new Vector2f(40, resy - buttonHeight - 40)); btnToMenu.ButtonText = "Back"; btnPasteIP = new Button(buttonWidth * 1.6f, buttonHeight); btnPasteIP.setPosition(new Vector2f(resx - buttonWidth * 1.6f - 50, 120)); btnPasteIP.ButtonText = "Paste IP address"; btnConnectToGame = new Button(buttonWidth, buttonHeight); btnConnectToGame.setPosition(new Vector2f(resx - buttonWidth - 40, resy - buttonHeight - 40)); btnConnectToGame.ButtonText = "Connect"; mouseInteractionList.Add(btnToMenu); mouseInteractionList.Add(btnPasteIP); mouseInteractionList.Add(btnConnectToGame); }
private void InitializeGui() { backgroundColor = new Color(130, 20, 80); int resx = Program.LoadIntSetting("resx"); int resy = Program.LoadIntSetting("resy"); int buttonWidth = Program.LoadIntSetting("buttonWidth"); int buttonHeight = Program.LoadIntSetting("buttonHeight"); btnBack = new Button(buttonWidth, buttonHeight); btnBack.setPosition(new Vector2f(40, resy - buttonHeight - 40)); btnBack.ButtonText = "Back"; mouseInteractionList.Add(btnBack); authors = new List <CuteText>(); authors.Add(new CuteText("Wojciech Płatek")); authors.Add(new CuteText("Grzegorz Sołdatowski")); authors.Add(new CuteText("Maciej Wesołowski")); int space = 0; authors.ForEach(a => a.Position = new Vector2f(resx / 2, resy / 3 + (space += 60))); credits = new CuteText("CREDITS:", new Vector2f(resx / 2, resy / 3 - 20)); }
private void InitializeGui() { backgroundColor = new Color(40, 50, 90); int resx = Program.LoadIntSetting("resx"); int resy = Program.LoadIntSetting("resy"); int buttonWidth = Program.LoadIntSetting("buttonWidth"); int buttonHeight = Program.LoadIntSetting("buttonHeight"); btnBack = new Button(buttonWidth, buttonHeight); btnBack.setPosition(new Vector2f(40, resy - buttonHeight - 40)); btnBack.ButtonText = "Back"; btnEndOfTurn = new Button(buttonWidth, buttonHeight); btnEndOfTurn.setPosition(new Vector2f(resx - buttonWidth - 20, resy - buttonHeight - 160)); btnEndOfTurn.ButtonText = "End Turn"; yourTurnCuteText = new CuteText("", new Vector2f(resx - 160, 60)); yourTurnCuteText.setString("Your\r\nTurn"); notCuteText = new CuteText("", new Vector2f(resx - 160, 25)); notCuteText.setString("Not"); mouseInteractionList.Add(btnBack); mouseInteractionList.Add(btnEndOfTurn); }
private void InitializeGui() { backgroundColor = new Color(30, 110, 60); int resx = Program.LoadIntSetting("resx"); int resy = Program.LoadIntSetting("resy"); int buttonWidth = Program.LoadIntSetting("buttonWidth"); int buttonHeight = Program.LoadIntSetting("buttonHeight"); textSettings = new CuteText("", new Vector2f(50, 50)); textSettings.setString("IP: "); btnToMenu = new Button(buttonWidth, buttonHeight); btnToMenu.setPosition(new Vector2f(40, resy - buttonHeight - 40)); btnToMenu.ButtonText = "Back"; mouseInteractionList.Add(btnToMenu); }
private void InitializeGui() { backgroundColor = new Color(110, 0, 0); int resx = Program.LoadIntSetting("resx"); int resy = Program.LoadIntSetting("resy"); int buttonWidth = Program.LoadIntSetting("buttonWidth"); int buttonHeight = Program.LoadIntSetting("buttonHeight"); int buttonSpace = 20; toLobby = new Button(buttonWidth, buttonHeight); toLobby.ButtonText = "toLobby"; toSettings = new Button(buttonWidth, buttonHeight); toSettings.ButtonText = "toSettings"; toCredits = new Button(buttonWidth, buttonHeight); toCredits.ButtonText = "toCredits"; toGame = new Button(buttonWidth, buttonHeight); toGame.ButtonText = "toGame"; exit = new Button(buttonWidth, buttonHeight); exit.ButtonText = "Exit!"; mouseInteractionList.Add(toLobby); mouseInteractionList.Add(toSettings); mouseInteractionList.Add(toCredits); mouseInteractionList.Add(toGame); mouseInteractionList.Add(exit); for (int i = 0; i < mouseInteractionList.Count; i++) { ((Button)mouseInteractionList[i]).setPosition(new Vector2f(resx / 2 - buttonWidth / 2, resy / 3 + (i + 1) * (buttonHeight + buttonSpace))); } dice = new CuteText("DiceWars!"); dice.Position = new Vector2f(resx / 2, resy / 3); }