whoa/src/ui/game/CGCooldown.cpp
fallenoak f19894ef12
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
feat(ui): add stub implementations of remaining game frame classes
2026-01-29 21:33:04 -06:00

38 lines
1.0 KiB
C++

#include "ui/game/CGCooldown.hpp"
#include "ui/game/CGCooldownScript.hpp"
int32_t CGCooldown::s_metatable;
int32_t CGCooldown::s_objectType;
CSimpleFrame* CGCooldown::Create(CSimpleFrame* parent) {
// TODO use CDataAllocator
return STORM_NEW(CGCooldown)(parent);
}
void CGCooldown::CreateScriptMetaTable() {
auto L = FrameScript_GetContext();
CGCooldown::s_metatable = FrameScript_Object::CreateScriptMetaTable(L, &CGCooldown::RegisterScriptMethods);
}
int32_t CGCooldown::GetObjectType() {
if (!CGCooldown::s_objectType) {
CGCooldown::s_objectType = ++FrameScript_Object::s_objectTypes;
}
return CGCooldown::s_objectType;
}
void CGCooldown::RegisterScriptMethods(lua_State* L) {
CSimpleFrame::RegisterScriptMethods(L);
FrameScript_Object::FillScriptMethodTable(L, CGCooldownMethods, NUM_CG_COOLDOWN_SCRIPT_METHODS);
}
CGCooldown::CGCooldown(CSimpleFrame* parent) : CSimpleFrame(parent) {
// TODO
}
int32_t CGCooldown::GetScriptMetaTable() {
return CGCooldown::s_metatable;
}