UI / Menus
Changed
- Button image and text alignment
- Button alignment on Main Menu and Pause Menu
Added
- Button hover and unhover animations
- Controls Menu that opens when the Controls button is clicked on the Main Menu or Pause Menu
- Settings Menu opens when the Settings button is clicked on the Main Menu or Pause Menu
- Settings Menu sub-buttons open placeholder settings panels
- Settings Menu Close button dismisses the menu
- Volume sliders with live text blocks displaying current slider values; audio slider functionality implemented in code
- Placeholder entries in the Graphics Settings menu
Fixed
- Bug where multiple Controls Menus could be spawned if the Controls button was clicked while the Controls Menu was already open
- Bug where the Controls Menu button hover and click sounds increased in volume each time the menu was closed and reopened
- Bug where buttons on the Pause Menu or Main Menu could be clicked while the Controls or Settings menus were open
- Duplicate audio file that was overlooked during dynamic audio system setup in the CodeTesting map
Audio
Added
- Card flip sound implemented and routed through the Audio Manager
PlaySimpleSoundmethod - Audio system configured for Settings Menu and Pause Menu; pauses current music track and plays the relevant menu audio track
Changed
- Default volume levels restored for both music tracks; default volumes can still be adjusted without breaking code
- Volume slider state saving implemented; audio settings are persisted to a text file using two new save/load functions called across appropriate locations
Gameplay — War Card Game
Fixed
- Click/round flow fix and card reveal timing rework:
- Cards now spawn face-down (
bStartFaceUp = false) on bothPlayerDeckandEnemyDeck HandlePlayerCardClickedrejects clicks whilebRoundInProgressis truePlayBattleRoundnow callsRevealCardon both top cards before comparing ranks, fixing premature or missing reveals- War tie loop correctly burns
WarBurnCountcards per deck into the Pot and re-reveals new top cards each pass SetSelectable(true)is applied to the next player top card immediately afterAddCardsToBottom, removing the 1.5s click-block windowCleanupRoundremoves the strayRevealCardcall that was pre-flipping the enemy's next card before the player's clickGetCardRankchanged from a hardcoded 52-entryRankTable[]to arithmetic:(CardID % 13) + 2, eliminating risk of mistyped table entries
- Cards now spawn face-down (
- Bug where Z-fighting caused mouse input to detect buried card actors instead of the true top card:
SetSelectable()now toggles collision (QueryOnly + Visibilitywhen selectable,NoCollisionotherwise); only the top card of each deck is interactable
- Timing bug where
RevealCard()and the hide/move step ran in the same frame, making flipped cards invisible to the player:- Added
RevealDelaySeconds(default1.0s) timer between card reveal and hiding/moving cards to the winner's pile
- Added
- Biased card shuffle corrected:
WarPigsDefaultGameModeandDeckActorboth updated from a full-rangeRandRange(0, Num()-1)to proper Fisher-Yates usingRandRange(0, i)(counting down), producing a uniform distribution and reducing abnormal War frequency
Added
- Player can now choose between AI or Player-controlled enemy
Changed
- Slide Down animation on card buttons now plays only after the Slide Up animation fully completes
Player Controller & Pause System
Changed
- Replaced
BindKeywith Action Mappings - Implemented proper pause/resume toggle on
P - Added
UPauseMenuforward declaration andCurrentPauseMenupointer - Fixed compile errors related to missing type references
- Corrected module dependency from
PaperZDtoPaper2D - Cleaned up input mode handling and pause menu creation
WarPigsPlayerController.h: Restored correct include order soWarPigsPlayerController.generated.his last, fixing UHT errors; addedUPauseMenu* CurrentPauseMenuandbool bIsGamePausedByControllermembersWarPigsPlayerController.cpp: Updated constructor to initialize new members; reworkedHandlePauseto own pause behavior — onPpress, pauses game, loadsWBP_PauseMenu, adds to viewport with Game+UI input and visible mouse cursor; tracks state viabIsGamePausedByControllerPauseMenu.cpp: Rewired buttons (Main Menu → CodeGameInstance::LoadMainMenu,Resume → ResumeGame,Controls → OpenControlsMenu); reimplementedTogglePauseMenu,PauseGame, andResumeGameto delegate unpause toAWarPigsPlayerController::HandlePause, restoringGameOnlyinput on resume; updatedOpenControlsMenuto use typedLoadClass
Config & Packaging
Added
Config/DefaultGame.ini:- Added
GameInstanceClass=/Script/wegaming.CodeGameInstanceunder[/Script/EngineSettings.GameMapsSettings] - Added
[/Script/UnrealEd.ProjectPackagingSettings]with+DirectoriesToAlwaysCook=(Path="/Game/UI")to ensurePauseMenuandControlsMenuare cooked into the build executable
- Added
HUD
Added
- C++
WarPigsHUDwidget class - Gameplay HUD displaying player card count, enemy card count, and round result text
- Timed clearing of round result text after each battle
- Pulsing animation on gameplay hint text
- Automatic hint text removal after five seconds
Changed
- Connected
WarPigsDefaultGameModeto update HUD after every completed round - Connected
WarPigsPlayerControllerto create and display the gameplay HUD - Reparented
WBP_TempHudto theWarPigsHUDC++ class - Converted HUD root to a Canvas Panel for improved positioning and future expansion
- Updated
WBP_TempHudanchors and layout to scale correctly with viewport size - Adjusted hint pulse scale and pivot for a cleaner stationary animation
- Improved placement of player card count, enemy card count, and round result labels
Fixed
- Gameplay HUD not updating card counts during rounds
- Round result text remaining on screen indefinitely
- HUD widget bindings mismatched with C++ implementation
- HUD elements shifting to incorrect positions on window resize
- Hint text appearing to drift/move while pulsing
- Hint text remaining visible for the entire game session
