Menu screens: rock background, centred frame, logo, 3D hero
- Spielen hero panel shows the selected hero in 3D (cUI_NetGranny, game/ui/granny.h). - All menu screens draw on the options' rock wall; the main menu's 1024 frame is drawn centred over it, mouse and cursor shifted to match. - The main menu's and options' own pictures and the main menu's 3D scene are left out (textures hidden by surface, scene call redirected). - Logo top left: FX_SACREDLOGO.TGA, drawn added. - Game textures by name (game/ui/texture.h), textured and added quads. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
34a119433a
commit
db87e276bf
16 files changed
+620
-69
No files matched your search
+43
-5
@@ -2,8 +2,12 @@
|
||||
|
||||
Request (2026-10-20): the game's menu screens are laid out for 1024x768; we
|
||||
design our own UIs for them. There is no 16:9 artwork for the game, so the
|
||||
background is our own (option 3 of the ones discussed: dark, no picture), and
|
||||
the approach is shared by all menu screens. Target: 16:9, 1920x1080, which is
|
||||
background is our own, and the approach is shared by all menu screens. The
|
||||
background (user, 2026-10-20: "textured dark", the flat gradient looked
|
||||
black): the options window's rock wall, `GUI_OPTION_BACKGROUND<row><column>.TGA`
|
||||
(4 x 3 tiles of 256), scaled to cover the render target, tinted down,
|
||||
shaded towards the bottom and the sides. Game textures by name:
|
||||
`game/ui/texture.h`, drawn with `game::DrawTextured` (game/ui/draw.h). Target: 16:9, 1920x1080, which is
|
||||
1365x768 in UI units; wider screens only get more background at the sides
|
||||
(not designed for ultrawide).
|
||||
|
||||
@@ -16,9 +20,7 @@ the approach is shared by all menu screens. Target: 16:9, 1920x1080, which is
|
||||
layer's offset machinery with `Anchor::Canvas`; drawing, the cursor and the
|
||||
window's hit tests shifted alike). Mouse events go through `screen::Handle`
|
||||
(`hud::HandleCanvas`). Keys stay the window's.
|
||||
- In the main menu the game renders a classic 1024x768 frame (presented 4:3).
|
||||
While a screen's window is shown, `widescreen::SetWideMenuScreen` makes the
|
||||
menu thread render and present the full width.
|
||||
- The main menu thread renders the full width (no 4:3 frame any more).
|
||||
- Parts: `screen::Panel` (dark backdrop and the game's frame, `cUI_Frame`,
|
||||
game/ui/frame.h, made anew when its rect changes), `screen::Button` (a
|
||||
button of the game's with the look of one of the window's,
|
||||
@@ -33,6 +35,42 @@ the approach is shared by all menu screens. Target: 16:9, 1920x1080, which is
|
||||
- Inside the canvas scope the HUD layer does not stretch "full 1024 layout"
|
||||
quads (`g_canvasScope`).
|
||||
|
||||
## Main menu frame (2026-10-20)
|
||||
|
||||
Request: the background on all screens, the main menu's and the options
|
||||
window's own pictures removed.
|
||||
|
||||
- cUI_Manager's UI render (`0x7587b0`, hooked in mods/screen.cpp) on the
|
||||
menu thread: the background first, then `hud::RenderMenuFrame` runs the
|
||||
render with drawing shifted by (render width - 1024) / 2 and a viewport on
|
||||
the frame (3D parts). Windows inside draw in frame coordinates (their own
|
||||
HUD scopes are nested, so they do nothing).
|
||||
- Mouse positions are given to the game in frame coordinates: the
|
||||
borderless mod's `ToGame` subtracts `hud::MenuFrameOffsetX`. The cursor
|
||||
sprite (`cMouseCursor::DrawItem` 0x6555e0, drawn after the UI) is shifted
|
||||
by drawing only.
|
||||
- While a 16:9 screen is shown the frame is not shifted (offset 0): the
|
||||
screen draws itself across the width.
|
||||
- Full-screen windows in a game (options, `hud::RenderFramed`) get the
|
||||
background beside the frame instead of black.
|
||||
- The windows' pictures are left out by texture: the HUD layer tracks the
|
||||
texture bound to stage 0 (`SetTexture`, device vtable 35) and skips quads
|
||||
drawn with a hidden one (`hud::SetHiddenTextures`). Logged on the menu
|
||||
thread (texture ids requested from the cache, by caller; names by trying
|
||||
the names in the texture pak): main menu GUI_UW_OPTION1..12 + UI_MAIN_SKY,
|
||||
options UW_OPTION_1_01..12. This install uses the Underworld versions; the
|
||||
Ancaria ones (GUI_OPTION1..12, ...) were not seen and are not listed.
|
||||
- The main menu's 3D scene (sky UI_UW_MAIN_CENTER, water with the SACRED
|
||||
logo UI_MAIN_REF; render 0x75e620 on the scene object 0x75df10) is called
|
||||
from cUI_MainMenu::Render (0x7122c0) at 0x712bd9; that call is redirected
|
||||
to an empty function. cUI_Character (0x70f41b) still draws it.
|
||||
- Logo top left (2026-10-21), 48 from the edges, 124 high: FX_SACREDLOGO.TGA,
|
||||
the emblem (horns around a ring of runes) glowing blue on black without
|
||||
alpha, drawn added (blend ONE/ONE, `game::DrawTexturedAdded`) as the
|
||||
game's effects draw it. Other candidates: GUI_MAIN_LOGO (plain golden
|
||||
lettering), SACREDSYMBOL01/02 (model atlases), the emblem on the loading
|
||||
pictures (PAK\loading*.bmp, not in the paks). Screens may overlap it.
|
||||
|
||||
## Screens
|
||||
|
||||
- Spielen (the load window, cUI_Savegame): docs/characters.md, "Spielen
|
||||
|
||||
Reference in new issue
Block a user