Improve build, UI, and add GitHub issue templates

This commit is contained in:
2026-05-27 02:57:07 +03:00
parent f6749f80e1
commit 88a90fa7ac
6 changed files with 97 additions and 14 deletions
+32
View File
@@ -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).
+20
View File
@@ -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.
+7 -1
View File
@@ -38,4 +38,10 @@ jobs:
working-directory: ${{env.GITHUB_WORKSPACE}} working-directory: ${{env.GITHUB_WORKSPACE}}
# Add additional options to the MSBuild command line here (like platform or verbosity level). # 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 # 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
View File
@@ -1,6 +1,6 @@
MIT License MIT License
Copyright (c) [year] [fullname] Copyright (c) 2026 Dr20Ervin
Permission is hereby granted, free of charge, to any person obtaining a copy Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal of this software and associated documentation files (the "Software"), to deal
+7 -2
View File
@@ -3,9 +3,10 @@
#include "menu.h" #include "menu.h"
#include "resource.h" #include "resource.h"
constexpr const char* gameVersion = "0.9.1"; // Application Version Metadata
constexpr const char* gameVersion = "1.0";
// Define global colors // Global Theme Color Configurations
Color Green = Color{ 38, 185, 154, 255 }; Color Green = Color{ 38, 185, 154, 255 };
Color Dark_Green = Color{ 20, 160, 133, 255 }; Color Dark_Green = Color{ 20, 160, 133, 255 };
Color Light_Green = Color{ 129, 204, 184, 255 }; Color Light_Green = Color{ 129, 204, 184, 255 };
@@ -184,10 +185,14 @@ int main() {
case GameState::MainMenu: case GameState::MainMenu:
{ {
mainMenu.Draw(); mainMenu.Draw();
// Render navigation controls hint
int menuHintWidth = MeasureText("Use UP/DOWN to navigate | ENTER to select", 20); int menuHintWidth = MeasureText("Use UP/DOWN to navigate | ENTER to select", 20);
DrawText("Use UP/DOWN to navigate | ENTER to select", DrawText("Use UP/DOWN to navigate | ENTER to select",
screen_width / 2 - menuHintWidth / 2, screen_width / 2 - menuHintWidth / 2,
screen_height - 80, 20, WHITE); screen_height - 80, 20, WHITE);
// Render version string in bottom-left corner
DrawText(TextFormat("v%s", gameVersion), 20, screen_height - 40, 20, LIGHTGRAY); DrawText(TextFormat("v%s", gameVersion), 20, screen_height - 40, 20, LIGHTGRAY);
break; break;
} }
+27 -7
View File
@@ -24,12 +24,28 @@ void Menu::Draw() {
int screenWidth = GetScreenWidth(); int screenWidth = GetScreenWidth();
int screenHeight = GetScreenHeight(); int screenHeight = GetScreenHeight();
// Menu title and elements rendering // Render Menu Title (aligned down for balanced spacing)
DrawText(title.c_str(), screenWidth / 2 - MeasureText(title.c_str(), 60) / 2, screenHeight / 4, 60, WHITE); 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; 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) { void DrawSettingsState(const GameContext& ctx, int screenWidth, int screenHeight) {
int titleWidth = MeasureText("SETTINGS", 60); 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 // Option labels formatting
std::string resStr = "Resolution: "; 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 paddleColor = (ctx.config.selectedSettingLine == 7) ? YELLOW : WHITE;
Color backColor = (ctx.config.selectedSettingLine == 8) ? 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(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(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); 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(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(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(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); 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", DrawText("UP/DOWN to navigate | LEFT/RIGHT to change settings | ENTER to select",
screenWidth / 2 - settingsHintWidth / 2, screenWidth / 2 - settingsHintWidth / 2,