Files
coah80-LegacyVulkEdition/docs/wave1-settings-layout.md

17 KiB

Wave 1: Settings, HUD, and Menu Layout Documentation

Research report comparing the original game's UI system (Minecraft.Client/Common/UI/) with the current Nuklear cross-platform reimplementation (Minecraft.Client/CrossPlatform/Nk*.cpp).


1. Background System (Panorama vs Dirt Tiles)

Original Game Behavior

Every menu scene's updateComponents() follows an identical pattern:

if (NOT in game):
    show Panorama = true
    show Logo     = true
else (in game):
    show Panorama = false
    show Logo     = true (single player only)

This applies to ALL settings-related menus (SettingsMenu, SettingsOptionsMenu, SettingsAudioMenu, SettingsControlMenu, SettingsGraphicsMenu, SettingsUIMenu, HelpAndOptionsMenu).

The Pause Menu is the exception:

  • eUIComponent_Panorama = false (no panorama)
  • eUIComponent_MenuBackground = true (this is the dirt tile overlay behind game)
  • Logo = true (single player only)

Summary: When Each Background Is Used

Context Background Source
Main Menu Panorama (blurred) UIScene_MainMenu::updateComponents
Help & Options (from main menu) Panorama + Logo UIScene_HelpAndOptionsMenu::updateComponents
Settings Hub (from main menu) Panorama + Logo UIScene_SettingsMenu::updateComponents
All settings sub-menus (from main menu) Panorama + Logo Each sub-menu's updateComponents
Pause Menu (in-game) Dirt tile overlay (eUIComponent_MenuBackground) + Logo UIScene_PauseMenu::updateComponents
Help & Options (in-game) NO Panorama, Logo only (single player) UIScene_HelpAndOptionsMenu::updateComponents
Settings Hub (in-game) NO Panorama, Logo only (single player) UIScene_SettingsMenu::updateComponents
All settings sub-menus (in-game) NO Panorama, Logo only (single player) Each sub-menu's updateComponents

Current NkSettingsMenus.cpp Behavior

WRONG: Every settings screen calls drawDirtBg() unconditionally. There is no panorama drawn, no context-awareness for in-game vs main menu.


2. Settings Hub (Main Settings Menu)

Original (UIScene_SettingsMenu.cpp / .h)

  • Movie path: "SettingsMenu" (or "SettingsMenuSplit" for splitscreen)
  • 6 buttons mapped to Flash movie elements Button1 through Button6:
    • Button1 = "Options" (BUTTON_ALL_OPTIONS = 0)
    • Button2 = "Audio" (BUTTON_ALL_AUDIO = 1)
    • Button3 = "Control" (BUTTON_ALL_CONTROL = 2)
    • Button4 = "Graphics" (BUTTON_ALL_GRAPHICS = 4)
    • Button5 = "User Interface" (BUTTON_ALL_UI = 5)
    • Button6 = "Reset to Defaults" (BUTTON_ALL_RESETTODEFAULTS = 6)
  • Note: Indices 0,1,2,4,5,6 -- index 3 is skipped (likely a removed button)
  • Non-primary players have Audio and Graphics buttons removed at runtime
  • Tooltips: "A Select" / "B Back"
  • Button sizing: Determined by the Flash movie (Iggy/SWF), not by C++ code. The screenshot shows buttons approximately 900px wide at 1920x1080.

Current (NkSettingsMenus.cpp renderSettingsHub)

  • 6 buttons, same labels: Options, Audio, Control, Graphics, User Interface, Reset to Defaults
  • Layout constants (at 1280x720 base):
    • BUTTON_X = 415.0f (left edge)
    • BUTTON_W = 450.0f (width)
    • BUTTON_H = 40.0f (height)
    • BUTTON_Y_START = 200.0f (first button top)
    • BUTTON_Y_STEP = 50.0f (spacing between buttons)
  • Buttons are centered at X=415 with W=450, so they span 415-865 at 1280 base
  • At 1920x1080: buttons would be ~675px wide (450 * 1.5), starting at X=622

Differences from Original

Aspect Original Current Nuklear Fix Needed
Background Panorama (not in game) or none (in game) Always dirt tiles YES - major
Logo Shown at top Not drawn (only text title "Settings") YES - major
Button width ~900px at 1080p (from Flash layout) ~675px at 1080p YES - buttons too narrow
Button highlight Blue/highlighted tint on selected button Hover-based (mouse only) YES - need controller selection
Controller prompts "A Select" "B Back" at bottom-left None YES - missing
Non-primary audio/graphics removal Buttons removed for non-primary players Not implemented YES - missing
Reset to Defaults Shows confirmation dialog Not implemented (action dispatched but no handler) YES - missing
Title text None (logo serves as header) "Settings" text drawn Remove - original has logo, not text title
Splitscreen layout Separate SettingsMenuSplit movie Not implemented Future work

3. Settings Sub-Menus

3a. Options Menu

Original (UIScene_SettingsOptionsMenu.cpp / .h)

  • Movie path: "SettingsOptionsMenu"
  • Controls (top to bottom):
    1. Checkbox: View Bobbing (eControl_ViewBob)
    2. Checkbox: Hints (eControl_ShowHints)
    3. Checkbox: In-Game Tooltips (eControl_ShowTooltips)
    4. Checkbox: In-Game Gamertags (eControl_InGameGamertags)
    5. Checkbox: Unhide Mash-Up Worlds (eControl_ShowMashUpWorlds) -- conditional
    6. Slider: Autosave Interval 0-8 (OFF, 15min, 30min, ..., 120min) (eControl_Autosave)
    7. Slider: Difficulty 0-3 (Peaceful/Easy/Normal/Hard) (eControl_Difficulty)
    8. Label: Difficulty description text
  • Conditional removal:
    • Mash-up worlds checkbox: only if mash-up pack worlds exist and not in game
    • Autosave: removed on Xbox One and PS4
    • Difficulty: removed for non-primary players or when in-game
    • In-Game Gamertags: removed for non-primary or when in-game as non-host
  • Tooltips: "A Select" / "B Back"

Current Nuklear (renderSettingsOptions)

  • Controls:
    1. Checkbox: View Bobbing
    2. Checkbox: Hints
    3. Checkbox: In-Game Tooltips
    4. Checkbox: In-Game Gamertags
    5. Slider: Autosave Interval (0-8)
    6. Slider: Difficulty (0-3)
  • Missing: Mash-up Worlds checkbox, difficulty description label
  • Missing: All conditional visibility logic
  • Missing: Settings are not read from or written to game state (uses static local vars)

3b. Audio Menu

Original (UIScene_SettingsAudioMenu.cpp / .h)

  • Movie path: "SettingsAudioMenu"
  • Controls:
    1. Slider: Music Volume 0-100% (eControl_Music)
    2. Slider: Sound Volume 0-100% (eControl_Sound)
  • Reads/writes eGameSetting_MusicVolume and eGameSetting_SoundFXVolume

Current Nuklear (renderSettingsAudio)

  • Same 2 sliders, same range. Static local vars, no game state integration.

3c. Control Menu

Original (UIScene_SettingsControlMenu.cpp / .h)

  • Movie path: "SettingsControlMenu"
  • Controls:
    1. Slider: Game Sensitivity 0-200% (eControl_SensitivityInGame)
    2. Slider: Interface Sensitivity 0-200% (eControl_SensitivityInMenu)
  • Reads/writes eGameSetting_Sensitivity_InGame and eGameSetting_Sensitivity_InMenu

Current Nuklear (renderSettingsControl)

  • Same 2 sliders, same range. Static local vars.

3d. Graphics Menu

Original (UIScene_SettingsGraphicsMenu.cpp / .h)

  • Movie path: "SettingsGraphicsMenu"
  • Controls:
    1. Checkbox: Render Clouds (eControl_Clouds)
    2. Checkbox: Bedrock Fog (eControl_BedrockFog)
    3. Checkbox: Custom Skin Animation (eControl_CustomSkinAnim)
    4. Checkbox: Fullscreen (eControl_Fullscreen) -- added for Windows
    5. Slider: Gamma 0-100% (eControl_Gamma)
    6. Slider: Interface Opacity 0-100% (eControl_InterfaceOpacity)
    7. Slider: FOV 40-120 (eControl_FOV)
  • Conditional removal:
    • Bedrock Fog: removed for non-primary or non-host in game
    • Custom Skin Anim: removed for non-primary in game

Current Nuklear (renderSettingsGraphics)

  • Controls:
    1. Checkbox: Render Clouds
    2. Checkbox: Bedrock Fog
    3. Checkbox: Custom Skin Animation
    4. Slider: Gamma 0-100%
    5. Slider: Interface Opacity 0-100%
  • Missing: Fullscreen checkbox, FOV slider
  • Missing: Conditional removal logic

3e. User Interface Menu

Original (UIScene_SettingsUIMenu.cpp / .h)

  • Movie path: "SettingsUIMenu"
  • Controls:
    1. Checkbox: Display HUD (eControl_DisplayHUD)
    2. Checkbox: Display Hand (eControl_DisplayHand)
    3. Checkbox: Death Messages (eControl_DisplayDeathMessages)
    4. Checkbox: Animated Character (eControl_DisplayAnimatedCharacter)
    5. Checkbox: 2 Player Split-screen Vertical (eControl_Splitscreen)
    6. Checkbox: Splitscreen Gamertags (eControl_ShowSplitscreenGamertags)
    7. Slider: HUD Size 1-3 (eControl_UISize)
    8. Slider: HUD Size (Splitscreen) 1-3 (eControl_UISizeSplitscreen)
  • Conditional removal:
    • Splitscreen and Splitscreen Gamertags: removed for non-primary in game
  • Slider callback updates eGameSetting_UISize (stored as value-1) and calls ui.UpdateSelectedItemPos()

Current Nuklear (renderSettingsUI)

  • All 6 checkboxes and 2 sliders present, same labels and ranges
  • Missing: Conditional removal, game state read/write, UpdateSelectedItemPos call

4. Help & Options Menu

Original (UIScene_HelpAndOptionsMenu.cpp / .h)

  • Movie path: "HelpAndOptionsMenu" (or "HelpAndOptionsMenuSplit")
  • Buttons:
    1. Change Skin (BUTTON_HAO_CHANGESKIN)
    2. How to Play (BUTTON_HAO_HOWTOPLAY)
    3. Controls (BUTTON_HAO_CONTROLS)
    4. Settings (BUTTON_HAO_SETTINGS)
    5. Credits (BUTTON_HAO_CREDITS)
    6. Reinstall Content (BUTTON_HAO_REINSTALL) -- always removed in current build
    7. Debug (BUTTON_HAO_DEBUG) -- final build only
  • Conditional removal:
    • Change Skin: removed if not full version
    • Credits: removed in splitscreen
    • Reinstall: removed unless primary player and not in game
    • Debug: removed in final builds
  • Background: Panorama + Logo (not in game), Logo only (in game)
  • Tooltips: "A Select" / "B Back"

Current Nuklear (renderHelpAndOptions in NkSettingsMenus.cpp)

  • 5 buttons: Change Skin, How to Play, Controls, Settings, Credits
  • Uses dirt background, not panorama
  • Missing: Conditional button removal, Debug button

5. Main Menu

Original (UIScene_MainMenu.cpp / .h)

  • Movie path: "MainMenu"
  • Background: Panorama (always) + Logo (always)
  • Buttons:
    1. Play Game
    2. Leaderboards
    3. Achievements
    4. Help & Options
    5. Downloadable Content (or "Unlock Full Game" for trial)
    6. Exit Game (or "Xbox Help" on Durango)
  • Conditional removal:
    • Exit: removed on PS3/PS4/Vita (use system button)
    • Achievements: removed on PS3/PS4/Vita/Xbox One
  • Splash text: Loaded from splashes.txt, rotated/scaled with sine animation at -17 degree rotation
  • Version string: bottom-right; Copyright: bottom-left

Current Nuklear (NkCoreMenus.cpp renderMainMenu)

  • Panorama background + Logo: correct
  • 6 buttons with same labels
  • Version string: "TU75 / 1.83 - Legacy Vulk Edition" -- correct
  • Copyright string at bottom-left -- correct
  • Missing: Splash text, conditional button removal, splash animation

6. Pause Menu

Original (UIScene_PauseMenu.cpp / .h)

  • Movie path: "PauseMenu" (or "PauseMenuSplit")
  • Background: eUIComponent_MenuBackground (dirt tiles, NOT panorama) + Logo (single player)
  • Buttons:
    1. Resume Game
    2. Help & Options
    3. Leaderboards
    4. Achievements (or Xbox Help on Durango)
    5. Save Game (or "Disable Autosave" on Xbox One/PS4)
    6. Exit Game
  • Conditional removal:
    • Leaderboards/Achievements: removed in splitscreen or for non-primary
    • Save Game: removed for non-host or non-primary
  • Tooltips: "A Select" / "B Back" / "X Change Device" (if host) / "Y Share" or "Game Invites"

Current Nuklear (NkCoreMenus.cpp renderPauseMenu)

  • Background: dirt tiles + logo -- CORRECT (matches original!)
  • 6 buttons with same labels
  • Missing: Conditional button removal, save/disable autosave toggle, tooltip bar

7. HUD Layout

Current Nuklear (NkHUD.cpp)

All positioned relative to a 1280x720 base, scaled by HUD_SCALE = 3.0.

Element Position (base coords) Size (native px)
Crosshair Center of screen 15x15 native, scaled 3x
Holder origin (366, 480) --
Health row Holder + (0, 30) 9x9 icons, 8px spacing, 10 icons
Food row Holder + (303, 30) 9x9 icons, 8px spacing, 10 icons (mirrored)
Armor row Holder + (0, 0) 9x9 icons, 8px spacing, 10 icons
Air bubbles Holder + (303, 0) 9x9 icons, 8px spacing, 10 icons (mirrored)
XP bar Holder + (0, 60) 182x5 native
Hotbar Holder + (-3, 75) 182x22 native
Hotbar selected slot-relative 24x24 native
Hotbar slot pitch -- 20px spacing

Textures loaded from ../Assets/ui/skinHDGraphicsHud/:

  • 27_HUD_Crosshair.png
  • 29_hotbar_item_back.png, 28_hotbar_item_selected.png
  • 34_Health_Full.png, 30_Health_Half.png, 38_Health_Background.png
  • 44_HUD_Food_Full.png, 40_HUD_Food_Half.png, 48_HUD_Food_Background.png
  • 54_HUD_Armour_Full.png, 53_HUD_Armour_Half.png, 55_HUD_Armour_Empty.png
  • 57_HUD_Air_Bubble.png, 56_HUD_Air_Pop.png
  • 51_experience_bar_full.png, 52_experience_bar_empty.png

Note: HUD currently uses hardcoded placeholder values (health=20, food=20, armor=20, xp=0.45/level 7). No game state integration.


8. Slider and Checkbox Dimensions (Nuklear)

Sliders (NkSettingsMenus.cpp)

Property Value (1280x720 base)
Position Same as buttons: X=415, W=450, H=40
Thumb width 16px (SLIDER_THUMB_W)
Track inset 6px each side (SLIDER_TRACK_INSET)
Track fill Inner area minus insets on both sides
Textures 182_FJ_Slider_Background.png, 99_Slider_Track_TintActive.png, 100_Slider_Track_TintInactive.png, 181_Slider_Graphic.png

Checkboxes (NkSettingsMenus.cpp)

Property Value
Size 75% of row height (= 0.75 * 40 = 30px at base)
Position Left-aligned at row X, vertically centered in row
Label offset 8px right of checkbox
Textures 178_FJ_Tickbox_Background.png, 176_Tickbox_Over.png, 177_Tick.png

9. Texture Assets Used

Menu Textures (loaded in MenuScreens.cpp init)

Slot File Purpose
dirtTile skinHDGraphics/164_Dirt_Tile.png Tiled background for pause/sub-menus
logo skinHDWin/180_MenuTitle.png Minecraft Legacy Console logo
buttonNormal skinHDGraphics/191_FJ_MainMenuButton_Norm.png Stone button (default state)
buttonHover skinHDGraphics/189_MainMenuButton_Over.png Stone button (hovered/selected)
panorama skinHDWin/205_Panorama_Background_S.jpg Blurred panorama background
sliderTrackActive skinHDGraphics/99_Slider_Track_TintActive.png Green filled portion
sliderTrackInactive skinHDGraphics/100_Slider_Track_TintInactive.png Gray unfilled portion
sliderThumb skinHDGraphics/181_Slider_Graphic.png Slider handle
sliderBackground skinHDGraphics/182_FJ_Slider_Background.png Slider track outer border
checkboxBackground skinHDGraphics/178_FJ_Tickbox_Background.png Checkbox border
checkboxHover skinHDGraphics/176_Tickbox_Over.png Checkbox hover highlight
checkboxTick skinHDGraphics/177_Tick.png Checkmark

10. Controller Navigation

Original System

  • The original uses Iggy (Flash/SWF) for UI rendering with built-in focus management
  • ACTION_MENU_UP/DOWN navigate between controls
  • ACTION_MENU_LEFT/RIGHT adjust sliders
  • ACTION_MENU_OK activates buttons/toggles checkboxes
  • ACTION_MENU_CANCEL backs out (saving settings on exit)
  • Tooltip bar shows context-sensitive controller prompts via ui.SetTooltips()

Current Nuklear

  • Mouse-only interaction (hover + click)
  • No keyboard/gamepad navigation between controls
  • No focus tracking or selection highlight
  • No tooltip/prompt bar at bottom

11. Critical Differences Summary (Priority Order)

P0 - Visually Wrong

  1. Settings background uses dirt tiles instead of panorama (when accessed from main menu)
  2. No logo drawn on settings/help screens (text title used instead)
  3. Buttons too narrow -- 450px at 1280 base vs original ~600px at 1280 base (900px at 1080p)
  4. No controller selection highlight -- hovered button gets textured highlight, but no focus tracking for gamepad

P1 - Functionally Missing

  1. Settings not connected to game state -- all values are static locals, changes are lost
  2. No controller/keyboard navigation -- mouse only
  3. No tooltip/prompt bar at bottom of screen
  4. No conditional button/control removal based on player role, game state, or platform

P2 - Missing Features

  1. Splash text on main menu (animation, rotation, sine-wave scaling)
  2. Fullscreen checkbox and FOV slider missing from Graphics
  3. Mash-up Worlds checkbox missing from Options
  4. Difficulty description label missing from Options
  5. Reset to Defaults confirmation dialog not implemented
  6. Splitscreen layout variants not implemented

12. Button Width Investigation

The original game's button widths were defined by the Flash/SWF movie layouts, not C++ code. The C++ code only initializes button text and maps them to named movie elements. From the user's screenshot showing ~900px buttons at 1920x1080:

  • At 1280x720 base, that's approximately 600px wide (900 / 1.5)
  • Current Nuklear uses 450px at 1280 base = only 75% of the original width
  • Recommendation: Change BUTTON_W from 450 to 600, and BUTTON_X from 415 to 340 to re-center