mirror of
https://github.com/whoahq/whoa.git
synced 2026-03-05 15:42:17 +03:00
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
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:
parent
d34336cd7e
commit
7d911e453d
@ -1,5 +1,7 @@
|
||||
#include "ui/game/ActionBarScript.hpp"
|
||||
#include "ui/FrameScript.hpp"
|
||||
#include "ui/game/CGActionBar.hpp"
|
||||
#include "util/Lua.hpp"
|
||||
#include "util/Unimplemented.hpp"
|
||||
|
||||
namespace {
|
||||
@ -93,7 +95,13 @@ int32_t Script_ChangeActionBarPage(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) {
|
||||
|
||||
4
src/ui/game/CGActionBar.cpp
Normal file
4
src/ui/game/CGActionBar.cpp
Normal file
@ -0,0 +1,4 @@
|
||||
#include "ui/game/CGActionBar.hpp"
|
||||
|
||||
uint32_t CGActionBar::s_currentPage;
|
||||
uint32_t CGActionBar::s_tempPageActiveFlags;
|
||||
13
src/ui/game/CGActionBar.hpp
Normal file
13
src/ui/game/CGActionBar.hpp
Normal 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
|
||||
Loading…
Reference in New Issue
Block a user