feat(ui): implement Script_GetActionBarPage
Some checks are pending
Push / ${{ matrix.build.system_name }} / ${{ matrix.build.build_type }} / ${{ matrix.build.compiler_name }} (map[build_type:Release cc:cl compiler_name:MSVC cxx:cl os:windows-latest system_name:Windows test_path:WhoaTest]) (push) Waiting to run
Push / ${{ matrix.build.system_name }} / ${{ matrix.build.build_type }} / ${{ matrix.build.compiler_name }} (map[build_type:Release cc:clang compiler_name:Clang cxx:clang++ os:macos-latest system_name:macOS test_path:WhoaTest]) (push) Waiting to run
Push / ${{ matrix.build.system_name }} / ${{ matrix.build.build_type }} / ${{ matrix.build.compiler_name }} (map[build_type:Release cc:gcc compiler_name:GCC cxx:g++ os:ubuntu-latest system_name:Linux test_path:WhoaTest]) (push) Waiting to run

This commit is contained in:
fallenoak 2026-02-03 17:11:18 -06:00
parent d34336cd7e
commit 7d911e453d
No known key found for this signature in database
GPG Key ID: 7628F8E61AEA070D
3 changed files with 26 additions and 1 deletions

View File

@ -1,5 +1,7 @@
#include "ui/game/ActionBarScript.hpp" #include "ui/game/ActionBarScript.hpp"
#include "ui/FrameScript.hpp" #include "ui/FrameScript.hpp"
#include "ui/game/CGActionBar.hpp"
#include "util/Lua.hpp"
#include "util/Unimplemented.hpp" #include "util/Unimplemented.hpp"
namespace { namespace {
@ -93,7 +95,13 @@ int32_t Script_ChangeActionBarPage(lua_State* L) {
} }
int32_t Script_GetActionBarPage(lua_State* L) { int32_t Script_GetActionBarPage(lua_State* L) {
WHOA_UNIMPLEMENTED(0); if (CGActionBar::s_tempPageActiveFlags) {
lua_pushinteger(L, 1);
} else {
lua_pushinteger(L, CGActionBar::s_currentPage + 1);
}
return 1;
} }
int32_t Script_GetActionBarToggles(lua_State* L) { int32_t Script_GetActionBarToggles(lua_State* L) {

View File

@ -0,0 +1,4 @@
#include "ui/game/CGActionBar.hpp"
uint32_t CGActionBar::s_currentPage;
uint32_t CGActionBar::s_tempPageActiveFlags;

View File

@ -0,0 +1,13 @@
#ifndef UI_GAME_C_G_ACTION_BAR_HPP
#define UI_GAME_C_G_ACTION_BAR_HPP
#include <cstdint>
class CGActionBar {
public:
// Static variables
static uint32_t s_currentPage;
static uint32_t s_tempPageActiveFlags;
};
#endif