Export screen: widescreen frame, black sides, slots can be cleared
- cUI_Character (export) and cUI_Savegame draw inside the centred 1024x768 frame (viewport) with the render target beside it cleared black; the export screen's 3D heroes were stretched across the wide viewport, away from their labels and hit areas. - Export screen shows the game's erase button for an occupied slot and reloads the heroes after a delete. Overwriting was already the game's own path once clicks hit the right slot. - game/ui/control.h: shared show/hide for cUI_Control2. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
c875d7d6b9
commit
72525cd5ba
9 files changed
+272
-13
No files matched your search
@@ -0,0 +1,24 @@
|
||||
#pragma once
|
||||
// cUI_Control2: flags at +0x10 (bit 0: visible; a hidden control still
|
||||
// renders but handles no events).
|
||||
|
||||
#include <cstddef>
|
||||
#include <cstdint>
|
||||
|
||||
namespace game {
|
||||
|
||||
constexpr size_t kControlFlagsOffset = 0x10;
|
||||
constexpr uint32_t kControlFlagVisible = 1;
|
||||
|
||||
inline bool ControlShown(const void* control) {
|
||||
return (static_cast<const uint8_t*>(control)[kControlFlagsOffset] & kControlFlagVisible) != 0;
|
||||
}
|
||||
|
||||
// cUI_Control2::SetFlags (0x731e70) / ClearFlags (0x731ee0), thiscall (flags),
|
||||
// ret 4; setting the visible flag calls the control's vf24 (show).
|
||||
inline void SetControlShown(void* control, bool shown) {
|
||||
using FlagFn = void(__fastcall*)(void*, void*, uint32_t);
|
||||
reinterpret_cast<FlagFn>(shown ? 0x00731e70 : 0x00731ee0)(control, nullptr, kControlFlagVisible);
|
||||
}
|
||||
|
||||
} // namespace game
|
||||
Reference in new issue
Block a user