Improve build, UI, and add GitHub issue templates
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
---
|
||||
name: 🐛 Bug Report
|
||||
about: Create a report to help us improve Pong Reloaded
|
||||
title: '[BUG] '
|
||||
labels: bug
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
**Describe the bug**
|
||||
A clear and concise description of what the bug is.
|
||||
|
||||
**To Reproduce**
|
||||
Steps to reproduce the behavior:
|
||||
1. Go to '...'
|
||||
2. Click on '...'
|
||||
3. Scroll down to '...'
|
||||
4. See error
|
||||
|
||||
**Expected behavior**
|
||||
A clear and concise description of what you expected to happen.
|
||||
|
||||
**Screenshots**
|
||||
If applicable, add screenshots to help explain your problem.
|
||||
|
||||
**Environment (please complete the following information):**
|
||||
- OS: [e.g. Windows 11]
|
||||
- Display Resolution: [e.g. 1920x1080]
|
||||
- Graphic Settings used: [e.g. Fullscreen, VSync, 60fps]
|
||||
|
||||
**Additional Context**
|
||||
Add any other context about the problem here (e.g. logs from the F7 Developer Console).
|
||||
@@ -0,0 +1,20 @@
|
||||
---
|
||||
name: ✨ Feature Request
|
||||
about: Suggest an idea or enhancement for Pong Reloaded
|
||||
title: '[FEATURE] '
|
||||
labels: enhancement
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
**Is your feature request related to a problem? Please describe.**
|
||||
A clear and concise description of what the problem is. Ex. I'm frustrated when [...]
|
||||
|
||||
**Describe the solution you'd like**
|
||||
A clear and concise description of what you want to happen.
|
||||
|
||||
**Describe alternatives you've considered**
|
||||
A clear and concise description of any alternative solutions or features you've considered.
|
||||
|
||||
**Additional context**
|
||||
Add any other context or screenshots about the feature request here.
|
||||
@@ -38,4 +38,10 @@ jobs:
|
||||
working-directory: ${{env.GITHUB_WORKSPACE}}
|
||||
# Add additional options to the MSBuild command line here (like platform or verbosity level).
|
||||
# See https://docs.microsoft.com/visualstudio/msbuild/msbuild-command-line-reference
|
||||
run: msbuild /m /p:Configuration=${{env.BUILD_CONFIGURATION}} ${{env.SOLUTION_FILE_PATH}}
|
||||
run: msbuild /m /p:Configuration=${{env.BUILD_CONFIGURATION}} /p:Platform=x64 ${{env.SOLUTION_FILE_PATH}}
|
||||
|
||||
- name: Upload Build Artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: pong-reloaded-exe
|
||||
path: x64/Release/pong-reloaded.exe
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) [year] [fullname]
|
||||
Copyright (c) 2026 Dr20Ervin
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
||||
+10
-5
@@ -3,13 +3,14 @@
|
||||
#include "menu.h"
|
||||
#include "resource.h"
|
||||
|
||||
constexpr const char* gameVersion = "0.9.1";
|
||||
// Application Version Metadata
|
||||
constexpr const char* gameVersion = "1.0";
|
||||
|
||||
// Define global colors
|
||||
Color Green = Color{ 38, 185, 154, 255 };
|
||||
Color Dark_Green = Color{ 20, 160, 133, 255 };
|
||||
// Global Theme Color Configurations
|
||||
Color Green = Color{ 38, 185, 154, 255 };
|
||||
Color Dark_Green = Color{ 20, 160, 133, 255 };
|
||||
Color Light_Green = Color{ 129, 204, 184, 255 };
|
||||
Color Yellow = Color{ 243, 213, 91, 255 };
|
||||
Color Yellow = Color{ 243, 213, 91, 255 };
|
||||
|
||||
std::vector<std::string> logHistory;
|
||||
std::mutex logMutex;
|
||||
@@ -184,10 +185,14 @@ int main() {
|
||||
case GameState::MainMenu:
|
||||
{
|
||||
mainMenu.Draw();
|
||||
|
||||
// Render navigation controls hint
|
||||
int menuHintWidth = MeasureText("Use UP/DOWN to navigate | ENTER to select", 20);
|
||||
DrawText("Use UP/DOWN to navigate | ENTER to select",
|
||||
screen_width / 2 - menuHintWidth / 2,
|
||||
screen_height - 80, 20, WHITE);
|
||||
|
||||
// Render version string in bottom-left corner
|
||||
DrawText(TextFormat("v%s", gameVersion), 20, screen_height - 40, 20, LIGHTGRAY);
|
||||
break;
|
||||
}
|
||||
|
||||
+27
-7
@@ -24,12 +24,28 @@ void Menu::Draw() {
|
||||
int screenWidth = GetScreenWidth();
|
||||
int screenHeight = GetScreenHeight();
|
||||
|
||||
// Menu title and elements rendering
|
||||
DrawText(title.c_str(), screenWidth / 2 - MeasureText(title.c_str(), 60) / 2, screenHeight / 4, 60, WHITE);
|
||||
// Render Menu Title (aligned down for balanced spacing)
|
||||
DrawText(title.c_str(), screenWidth / 2 - MeasureText(title.c_str(), 60) / 2, screenHeight / 4 + 20, 60, WHITE);
|
||||
|
||||
for (int i = 0; i < static_cast<int>(options.size()); i++) {
|
||||
int numOptions = static_cast<int>(options.size());
|
||||
int spacing = 60;
|
||||
|
||||
// Isolate "Back" buttons at the bottom; group all other menu items in the center
|
||||
bool separateLast = (!options.empty() && options.back() == "Back");
|
||||
int groupCount = separateLast ? (numOptions - 1) : numOptions;
|
||||
|
||||
// Center grouped options vertically
|
||||
int startY = (screenHeight / 2) - (((groupCount - 1) * spacing) / 2);
|
||||
|
||||
for (int i = 0; i < numOptions; i++) {
|
||||
Color textColor = (i == selectedIndex) ? YELLOW : WHITE;
|
||||
DrawText(options[i].c_str(), screenWidth / 2 - MeasureText(options[i].c_str(), 40) / 2, screenHeight / 2 + (i * 60), 40, textColor);
|
||||
if (separateLast && i == numOptions - 1) {
|
||||
// Render separated "Back" action button at the bottom of the screen
|
||||
DrawText(options[i].c_str(), screenWidth / 2 - MeasureText(options[i].c_str(), 40) / 2, screenHeight - 120, 40, textColor);
|
||||
} else {
|
||||
// Render standard grouped options in the center
|
||||
DrawText(options[i].c_str(), screenWidth / 2 - MeasureText(options[i].c_str(), 40) / 2, startY + (i * spacing), 40, textColor);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -195,7 +211,7 @@ void UpdateSettingsState(GameContext& ctx, Ball& ball, Paddle& player, CpuPaddle
|
||||
|
||||
void DrawSettingsState(const GameContext& ctx, int screenWidth, int screenHeight) {
|
||||
int titleWidth = MeasureText("SETTINGS", 60);
|
||||
DrawText("SETTINGS", screenWidth / 2 - titleWidth / 2, screenHeight / 4 - 40, 60, WHITE);
|
||||
DrawText("SETTINGS", screenWidth / 2 - titleWidth / 2, screenHeight / 4 + 20, 60, WHITE);
|
||||
|
||||
// Option labels formatting
|
||||
std::string resStr = "Resolution: ";
|
||||
@@ -247,7 +263,8 @@ void DrawSettingsState(const GameContext& ctx, int screenWidth, int screenHeight
|
||||
Color paddleColor = (ctx.config.selectedSettingLine == 7) ? YELLOW : WHITE;
|
||||
Color backColor = (ctx.config.selectedSettingLine == 8) ? YELLOW : WHITE;
|
||||
|
||||
int startY = screenHeight / 2 - 80;
|
||||
// Render settings toggles centered in the middle of the screen
|
||||
int startY = 300;
|
||||
DrawText(resStr.c_str(), screenWidth / 2 - MeasureText(resStr.c_str(), 30) / 2, startY, 30, resColor);
|
||||
DrawText(fpsStr.c_str(), screenWidth / 2 - MeasureText(fpsStr.c_str(), 30) / 2, startY + 40, 30, fpsColor);
|
||||
DrawText(modeStr.c_str(), screenWidth / 2 - MeasureText(modeStr.c_str(), 30) / 2, startY + 80, 30, modeColor);
|
||||
@@ -256,8 +273,11 @@ void DrawSettingsState(const GameContext& ctx, int screenWidth, int screenHeight
|
||||
DrawText(spaceThemeStr.c_str(), screenWidth / 2 - MeasureText(spaceThemeStr.c_str(), 30) / 2, startY + 200, 30, spaceColor);
|
||||
DrawText(ballThemeStr.c_str(), screenWidth / 2 - MeasureText(ballThemeStr.c_str(), 30) / 2, startY + 240, 30, ballColor);
|
||||
DrawText(paddleThemeStr.c_str(), screenWidth / 2 - MeasureText(paddleThemeStr.c_str(), 30) / 2, startY + 280, 30, paddleColor);
|
||||
DrawText("Back", screenWidth / 2 - MeasureText("Back", 30) / 2, startY + 320, 30, backColor);
|
||||
|
||||
// Render separated "Back" action button at the bottom of the screen
|
||||
DrawText("Back", screenWidth / 2 - MeasureText("Back", 30) / 2, screenHeight - 120, 30, backColor);
|
||||
|
||||
// Render bottom hint for settings controls
|
||||
int settingsHintWidth = MeasureText("UP/DOWN to navigate | LEFT/RIGHT to change settings | ENTER to select", 20);
|
||||
DrawText("UP/DOWN to navigate | LEFT/RIGHT to change settings | ENTER to select",
|
||||
screenWidth / 2 - settingsHintWidth / 2,
|
||||
|
||||
Reference in New Issue
Block a user