Could you make this part of the code menu look way better? // Define GUI window…
- User
Could you make this part of the code menu look way better?
// Define GUI window properties Microsoft.Xna.Framework.Rectangle guiWindowRect = new Microsoft.Xna.Framework.Rectangle((int)windowX, (int)windowY, (int)fixedWindowWidth, (int)fixedWindowHeight); int borderWidth = 4; Microsoft.Xna.Framework.Rectangle borderRect = new Microsoft.Xna.Framework.Rectangle(guiWindowRect.X - borderWidth, guiWindowRect.Y - borderWidth, guiWindowRect.Width + 2 * borderWidth, guiWindowRect.Height + 2 * borderWidth); Microsoft.Xna.Framework.Color borderColor = new Microsoft.Xna.Framework.Color(50, 50, 50); // Dark gray border color
code// Draw window border this.m_spriteBatch.Draw(this.pixelTexture, borderRect, borderColor); // Draw window background Microsoft.Xna.Framework.Color windowBackgroundColor = new Microsoft.Xna.Framework.Color(20, 20, 20); // Dark background color this.m_spriteBatch.Draw(this.pixelTexture, guiWindowRect, windowBackgroundColor); // Draw GUI elements string guiMessage = "MadeByHowque || Mouse2 to drag!"; Vector2 guiMessageSize = Constants.FontSimple.MeasureString(guiMessage); Vector2 guiMessagePosition = new Vector2((float)(guiWindowRect.X + 20), (float)(guiWindowRect.Y + 20)); this.m_spriteBatch.DrawString(Constants.FontSimple, guiMessage, guiMessagePosition, Microsoft.Xna.Framework.Color.White); // White text color // Draw checkboxes string[] checkboxTexts = { "SpeedHack", "FlyHack", "AlwaysRechargeEnergy", "NoCooldowns", "InfiniteEnergy", "LadderDiveExploit", "FakelagExploit", "EletricBulletHit", "Test2", "Test3" }; float leftOffset = 20f; Vector2 checkboxPosition = new Vector2((float)guiWindowRect.X + leftOffset, guiMessagePosition.Y + guiMessageSize.Y + 7f); float checkboxSpacing = 30f; for (int i = 0; i < checkboxTexts.Length; i++) { string checkboxText = checkboxTexts[i]; bool checkboxState = checkboxStates[i]; Microsoft.Xna.Framework.Color checkboxColor = checkboxState ? Microsoft.Xna.Framework.Color.Green : Microsoft.Xna.Framework.Color.Red; this.m_spriteBatch.Draw(this.pixelTexture, new Microsoft.Xna.Framework.Rectangle((int)checkboxPosition.X, (int)checkboxPosition.Y, 20, 20), checkboxColor); this.m_spriteBatch.DrawString(Constants.FontSimple, checkboxText, new Vector2(checkboxPosition.X + 30f, checkboxPosition.Y), Microsoft.Xna.Framework.Color.White); checkboxPosition.Y += checkboxSpacing; } - Assistant