mirror of
https://github.com/whoahq/whoa.git
synced 2026-02-01 00:02:45 +03:00
feat(glue): implement Script_SetCharCustomizeFrame
This commit is contained in:
parent
28752c69da
commit
e3f4322ae3
3
src/glue/CCharacterCreation.cpp
Normal file
3
src/glue/CCharacterCreation.cpp
Normal file
@ -0,0 +1,3 @@
|
||||
#include "glue/CCharacterCreation.hpp"
|
||||
|
||||
CSimpleModelFFX* CCharacterCreation::s_charCustomizeFrame;
|
||||
12
src/glue/CCharacterCreation.hpp
Normal file
12
src/glue/CCharacterCreation.hpp
Normal file
@ -0,0 +1,12 @@
|
||||
#ifndef GLUE_C_CHARACTER_CREATION_HPP
|
||||
#define GLUE_C_CHARACTER_CREATION_HPP
|
||||
|
||||
class CSimpleModelFFX;
|
||||
|
||||
class CCharacterCreation {
|
||||
public:
|
||||
// Static variables
|
||||
static CSimpleModelFFX* s_charCustomizeFrame;
|
||||
};
|
||||
|
||||
#endif
|
||||
@ -1,12 +1,26 @@
|
||||
#include "glue/CCharacterCreationScript.hpp"
|
||||
#include "glue/CCharacterCreation.hpp"
|
||||
#include "ui/FrameScript.hpp"
|
||||
#include "ui/Types.hpp"
|
||||
#include "ui/simple/CSimpleModelFFX.hpp"
|
||||
#include "util/Lua.hpp"
|
||||
#include "util/Unimplemented.hpp"
|
||||
#include <cstdint>
|
||||
|
||||
int32_t Script_SetCharCustomizeFrame(lua_State* L) {
|
||||
WHOA_UNIMPLEMENTED(0);
|
||||
if (!lua_isstring(L, 1)) {
|
||||
luaL_error(L, "Usage: SetCharCustomizeFrame(\"frameName\")");
|
||||
return 0;
|
||||
}
|
||||
|
||||
auto type = CSimpleModel::GetObjectType();
|
||||
auto frame = static_cast<CSimpleModelFFX*>(CScriptObject::GetScriptObjectByName(lua_tostring(L, 1), type));
|
||||
|
||||
if (frame) {
|
||||
CCharacterCreation::s_charCustomizeFrame = frame;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int32_t Script_SetCharCustomizeBackground(lua_State* L) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user