# WBP_MainMenu — Asset Implementation

> **UE5 Asset:** `/Game/Framework/UI/WBP_MainMenu`
> **Parent Class:** `UserWidget`

---

## Create This Widget

1. Content Browser → `Content/Framework/UI/`
2. Right-click → **User Interface → Widget Blueprint**
3. Name: `WBP_MainMenu`

---

## Designer Canvas

```
Canvas Panel
  └─ Vertical Box (centered)
       ├─ Image (game logo)       "LogoImage"
       ├─ Spacer
       ├─ Button "btn_NewGame"    "New Game"
       ├─ Button "btn_Continue"   "Continue"
       ├─ Button "btn_LoadGame"   "Load Game"
       ├─ Button "btn_Settings"   "Settings"
       ├─ Button "btn_Credits"    "Credits"
       └─ Button "btn_Quit"       "Quit Game"
  └─ TextBlock "VersionText"      (bottom-right) "v1.0.0"
```

---

## What to Wire

### Event: Event Construct
```
[Event Construct]
  ├─ Get GameInstance → Cast to GI_GameFramework
  ├─ Get SaveManager → GetSlotManifest()
  ├─ Branch: Any slot has data?
  │   True → btn_Continue.SetIsEnabled(true)
  │   False → btn_Continue.SetIsEnabled(false)
  └─ Set Input Mode: UI + Show Cursor
```

### Button Handlers
```
btn_NewGame.OnClicked:
  ├─ Call GI_GameFramework.ClearAllSessionFlags()
  ├─ Call GI_GameFramework.SetActiveSlot(new slot index)
  ├─ Call OpenLevel (first chapter map)
  └─ Set Input Mode: Game

btn_Continue.OnClicked:
  ├─ Call SaveManager.QuickLoad()
  └─ OnLoadComplete → OpenLevel (saved chapter)

btn_LoadGame.OnClicked:
  └─ Push WBP_LoadGameMenu to SS_UIManager stack

btn_Settings.OnClicked:
  └─ Push WBP_SettingsMenu

btn_Quit.OnClicked:
  └─ Quit Game (or ConsoleCommand "quit")
```

---

## Test It
- [ ] Game opens at main menu → cursor visible
- [ ] No save data → Continue grayed out
- [ ] Click New Game → level loads → cursor hidden
- [ ] Click Quit → game exits
