Skip to content

Commit

Permalink
Merge pull request #153 from digital-apple/dev
Browse files Browse the repository at this point in the history
feat: implement ConfirmLevelUpAttributeCallback, RE MessageBoxData
  • Loading branch information
powerof3 authored Dec 8, 2024
2 parents 4afa34a + 3a9c696 commit 3d71e53
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 14 deletions.
26 changes: 22 additions & 4 deletions include/RE/L/LevelUpMenu.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#pragma once

#include "RE/I/IMenu.h"
#include "RE/I/IMessageBoxCallback.h"

namespace RE
{
Expand All @@ -14,16 +15,33 @@ namespace RE
inline static constexpr auto RTTI = RTTI_LevelUpMenu;
constexpr static std::string_view MENU_NAME = "LevelUp Menu";

class ConfirmLevelUpAttributeCallback : public IMessageBoxCallback
{
public:
inline static constexpr auto RTTI = RTTI___ConfirmLevelUpAttributeCallback;
inline static constexpr auto VTABLE = VTABLE___ConfirmLevelUpAttributeCallback;

~ConfirmLevelUpAttributeCallback() override; // 00

// override (IMessageBoxCallback)
void Run(Message a_msg) override; // 01

// members
LevelUpMenu* menu; // 10
RE::ActorValue actorValue; // 18
};
static_assert(sizeof(ConfirmLevelUpAttributeCallback) == 0x20);

~LevelUpMenu() override; // 00

// override (IMenu)
void Accept(CallbackProcessor* a_cbReg) override; // 01

// members
bool unk30; // 30
std::uint8_t pad31; // 31
std::uint16_t pad32; // 32
std::uint32_t pad34; // 34
bool playerLeveled; // 30
std::uint8_t pad31; // 31
std::uint16_t pad32; // 32
std::uint32_t pad34; // 34
};
static_assert(sizeof(LevelUpMenu) == 0x38);
}
20 changes: 10 additions & 10 deletions include/RE/M/MessageBoxData.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,16 @@ namespace RE
}

// members
BSString bodyText; // 10
BSTArray<BSString> buttonText; // 20
std::uint32_t unk38; // 38
std::int32_t unk3C; // 3C
BSTSmartPointer<IMessageBoxCallback> callback; // 40
std::uint32_t unk48; // 48
std::uint8_t unk4C; // 4C
std::uint8_t unk4D; // 4D
std::uint8_t unk4E; // 4E
std::uint8_t unk4F; // 4F
BSString bodyText; // 10
BSTArray<BSString> buttonText; // 20
std::uint32_t type; // 38 - some sort of identifier ranging from 0-29, being 25 the one with the "highest priority"
std::int32_t cancelOptionIndex; // 3C
BSTSmartPointer<IMessageBoxCallback> callback; // 40
std::uint32_t menuDepth; // 48
std::uint8_t optionIndexOffset; // 4C
bool useHtml; // 4D
bool verticalButtons; // 4E
bool isCancellable; // 4F
};
static_assert(sizeof(MessageBoxData) == 0x50);
}

0 comments on commit 3d71e53

Please sign in to comment.