mirror of
https://github.com/whoahq/whoa.git
synced 2026-02-01 00:02:45 +03:00
Compare commits
6 Commits
66d29d87cb
...
95428e2d24
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
95428e2d24 | ||
|
|
91a4afd976 | ||
|
|
1cddac296c | ||
|
|
df177a40b0 | ||
|
|
f19894ef12 | ||
|
|
26522016e0 |
@ -8,6 +8,7 @@
|
|||||||
#include "ui/simple/CSimpleModel.hpp"
|
#include "ui/simple/CSimpleModel.hpp"
|
||||||
#include "ui/simple/CSimpleScrollFrame.hpp"
|
#include "ui/simple/CSimpleScrollFrame.hpp"
|
||||||
#include "ui/simple/CSimpleSlider.hpp"
|
#include "ui/simple/CSimpleSlider.hpp"
|
||||||
|
#include "ui/simple/CSimpleStatusBar.hpp"
|
||||||
#include "util/CStatus.hpp"
|
#include "util/CStatus.hpp"
|
||||||
#include "util/SFile.hpp"
|
#include "util/SFile.hpp"
|
||||||
#include <common/XML.hpp>
|
#include <common/XML.hpp>
|
||||||
@ -96,9 +97,9 @@ CSimpleFrame* Create_SimpleHTML(CSimpleFrame* parent) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
CSimpleFrame* Create_SimpleStatusBar(CSimpleFrame* parent) {
|
CSimpleFrame* Create_SimpleStatusBar(CSimpleFrame* parent) {
|
||||||
// TODO
|
// TODO CDataAllocator
|
||||||
|
|
||||||
return nullptr;
|
return STORM_NEW(CSimpleStatusBar(parent));
|
||||||
}
|
}
|
||||||
|
|
||||||
CSimpleFrame* Create_SimpleColorSelect(CSimpleFrame* parent) {
|
CSimpleFrame* Create_SimpleColorSelect(CSimpleFrame* parent) {
|
||||||
@ -541,19 +542,19 @@ int32_t FrameXML_RegisterFactory(const char* type, CSimpleFrame* (*factory)(CSim
|
|||||||
}
|
}
|
||||||
|
|
||||||
void FrameXML_RegisterDefault() {
|
void FrameXML_RegisterDefault() {
|
||||||
FrameXML_RegisterFactory("Button", &Create_SimpleButton, 0);
|
FrameXML_RegisterFactory("Button", &Create_SimpleButton, false);
|
||||||
FrameXML_RegisterFactory("CheckButton", &Create_SimpleCheckButton, 0);
|
FrameXML_RegisterFactory("CheckButton", &Create_SimpleCheckButton, false);
|
||||||
FrameXML_RegisterFactory("EditBox", &Create_SimpleEditBox, 0);
|
FrameXML_RegisterFactory("EditBox", &Create_SimpleEditBox, false);
|
||||||
FrameXML_RegisterFactory("Frame", &Create_SimpleFrame, 0);
|
FrameXML_RegisterFactory("Frame", &Create_SimpleFrame, false);
|
||||||
FrameXML_RegisterFactory("MessageFrame", &Create_SimpleMessageFrame, 0);
|
FrameXML_RegisterFactory("MessageFrame", &Create_SimpleMessageFrame, false);
|
||||||
FrameXML_RegisterFactory("Model", &Create_SimpleModel, 0);
|
FrameXML_RegisterFactory("Model", &Create_SimpleModel, false);
|
||||||
FrameXML_RegisterFactory("ScrollFrame", &Create_SimpleScrollFrame, 0);
|
FrameXML_RegisterFactory("ScrollFrame", &Create_SimpleScrollFrame, false);
|
||||||
FrameXML_RegisterFactory("ScrollingMessageFrame", &Create_SimpleScrollingMessageFrame, 0);
|
FrameXML_RegisterFactory("ScrollingMessageFrame", &Create_SimpleScrollingMessageFrame, false);
|
||||||
FrameXML_RegisterFactory("Slider", &Create_SimpleSlider, 0);
|
FrameXML_RegisterFactory("Slider", &Create_SimpleSlider, false);
|
||||||
FrameXML_RegisterFactory("SimpleHTML", &Create_SimpleHTML, 0);
|
FrameXML_RegisterFactory("SimpleHTML", &Create_SimpleHTML, false);
|
||||||
FrameXML_RegisterFactory("StatusBar", &Create_SimpleStatusBar, 0);
|
FrameXML_RegisterFactory("StatusBar", &Create_SimpleStatusBar, false);
|
||||||
FrameXML_RegisterFactory("ColorSelect", &Create_SimpleColorSelect, 0);
|
FrameXML_RegisterFactory("ColorSelect", &Create_SimpleColorSelect, false);
|
||||||
FrameXML_RegisterFactory("MovieFrame", &Create_SimpleMovieFrame, 0);
|
FrameXML_RegisterFactory("MovieFrame", &Create_SimpleMovieFrame, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
void FrameXML_ReleaseHashNode(const char* name) {
|
void FrameXML_ReleaseHashNode(const char* name) {
|
||||||
|
|||||||
37
src/ui/game/CGCharacterModelBase.cpp
Normal file
37
src/ui/game/CGCharacterModelBase.cpp
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
#include "ui/game/CGCharacterModelBase.hpp"
|
||||||
|
#include "ui/game/CGCharacterModelBaseScript.hpp"
|
||||||
|
|
||||||
|
int32_t CGCharacterModelBase::s_metatable;
|
||||||
|
int32_t CGCharacterModelBase::s_objectType;
|
||||||
|
|
||||||
|
CSimpleFrame* CGCharacterModelBase::Create(CSimpleFrame* parent) {
|
||||||
|
// TODO use CDataAllocator
|
||||||
|
|
||||||
|
return STORM_NEW(CGCharacterModelBase)(parent);
|
||||||
|
}
|
||||||
|
|
||||||
|
void CGCharacterModelBase::CreateScriptMetaTable() {
|
||||||
|
auto L = FrameScript_GetContext();
|
||||||
|
CGCharacterModelBase::s_metatable = FrameScript_Object::CreateScriptMetaTable(L, &CGCharacterModelBase::RegisterScriptMethods);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t CGCharacterModelBase::GetObjectType() {
|
||||||
|
if (!CGCharacterModelBase::s_objectType) {
|
||||||
|
CGCharacterModelBase::s_objectType = ++FrameScript_Object::s_objectTypes;
|
||||||
|
}
|
||||||
|
|
||||||
|
return CGCharacterModelBase::s_objectType;
|
||||||
|
}
|
||||||
|
|
||||||
|
void CGCharacterModelBase::RegisterScriptMethods(lua_State* L) {
|
||||||
|
CSimpleModel::RegisterScriptMethods(L);
|
||||||
|
FrameScript_Object::FillScriptMethodTable(L, CGCharacterModelBaseMethods, NUM_CG_CHARACTER_MODEL_BASE_SCRIPT_METHODS);
|
||||||
|
}
|
||||||
|
|
||||||
|
CGCharacterModelBase::CGCharacterModelBase(CSimpleFrame* parent) : CSimpleModel(parent) {
|
||||||
|
// TODO
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t CGCharacterModelBase::GetScriptMetaTable() {
|
||||||
|
return CGCharacterModelBase::s_metatable;
|
||||||
|
}
|
||||||
28
src/ui/game/CGCharacterModelBase.hpp
Normal file
28
src/ui/game/CGCharacterModelBase.hpp
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
#ifndef UI_GAME_C_G_CHARACTER_MODEL_BASE_HPP
|
||||||
|
#define UI_GAME_C_G_CHARACTER_MODEL_BASE_HPP
|
||||||
|
|
||||||
|
#include "ui/simple/CSimpleModel.hpp"
|
||||||
|
|
||||||
|
class CGCharacterModelBase : public CSimpleModel {
|
||||||
|
public:
|
||||||
|
// Static variables
|
||||||
|
static int32_t s_metatable;
|
||||||
|
static int32_t s_objectType;
|
||||||
|
|
||||||
|
// Static functions
|
||||||
|
static CSimpleFrame* Create(CSimpleFrame* parent);
|
||||||
|
static void CreateScriptMetaTable();
|
||||||
|
static int32_t GetObjectType();
|
||||||
|
static void RegisterScriptMethods(lua_State* L);
|
||||||
|
|
||||||
|
// Member variables
|
||||||
|
// TODO
|
||||||
|
|
||||||
|
// Virtual member functions
|
||||||
|
virtual int32_t GetScriptMetaTable();
|
||||||
|
|
||||||
|
// Member functions
|
||||||
|
CGCharacterModelBase(CSimpleFrame* parent);
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
||||||
30
src/ui/game/CGCharacterModelBaseScript.cpp
Normal file
30
src/ui/game/CGCharacterModelBaseScript.cpp
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
#include "ui/game/CGCharacterModelBaseScript.hpp"
|
||||||
|
#include "ui/FrameScript.hpp"
|
||||||
|
#include "util/Unimplemented.hpp"
|
||||||
|
|
||||||
|
namespace {
|
||||||
|
|
||||||
|
int32_t Script_SetUnit(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_SetCreature(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_RefreshUnit(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_SetRotation(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
FrameScript_Method CGCharacterModelBaseMethods[] = {
|
||||||
|
{ "SetUnit", &Script_SetUnit },
|
||||||
|
{ "SetCreature", &Script_SetCreature },
|
||||||
|
{ "RefreshUnit", &Script_RefreshUnit },
|
||||||
|
{ "SetRotation", &Script_SetRotation },
|
||||||
|
};
|
||||||
10
src/ui/game/CGCharacterModelBaseScript.hpp
Normal file
10
src/ui/game/CGCharacterModelBaseScript.hpp
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
#ifndef UI_GAME_C_G_CHARACTER_MODEL_BASE_SCRIPT_HPP
|
||||||
|
#define UI_GAME_C_G_CHARACTER_MODEL_BASE_SCRIPT_HPP
|
||||||
|
|
||||||
|
#include "ui/Types.hpp"
|
||||||
|
|
||||||
|
#define NUM_CG_CHARACTER_MODEL_BASE_SCRIPT_METHODS 4
|
||||||
|
|
||||||
|
extern FrameScript_Method CGCharacterModelBaseMethods[NUM_CG_CHARACTER_MODEL_BASE_SCRIPT_METHODS];
|
||||||
|
|
||||||
|
#endif
|
||||||
37
src/ui/game/CGCooldown.cpp
Normal file
37
src/ui/game/CGCooldown.cpp
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
#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;
|
||||||
|
}
|
||||||
28
src/ui/game/CGCooldown.hpp
Normal file
28
src/ui/game/CGCooldown.hpp
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
#ifndef UI_GAME_C_G_COOLDOWN_HPP
|
||||||
|
#define UI_GAME_C_G_COOLDOWN_HPP
|
||||||
|
|
||||||
|
#include "ui/simple/CSimpleFrame.hpp"
|
||||||
|
|
||||||
|
class CGCooldown : public CSimpleFrame {
|
||||||
|
public:
|
||||||
|
// Static variables
|
||||||
|
static int32_t s_metatable;
|
||||||
|
static int32_t s_objectType;
|
||||||
|
|
||||||
|
// Static functions
|
||||||
|
static CSimpleFrame* Create(CSimpleFrame* parent);
|
||||||
|
static void CreateScriptMetaTable();
|
||||||
|
static int32_t GetObjectType();
|
||||||
|
static void RegisterScriptMethods(lua_State* L);
|
||||||
|
|
||||||
|
// Member variables
|
||||||
|
// TODO
|
||||||
|
|
||||||
|
// Virtual member functions
|
||||||
|
virtual int32_t GetScriptMetaTable();
|
||||||
|
|
||||||
|
// Member functions
|
||||||
|
CGCooldown(CSimpleFrame* parent);
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
||||||
35
src/ui/game/CGCooldownScript.cpp
Normal file
35
src/ui/game/CGCooldownScript.cpp
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
#include "ui/game/CGCooldownScript.hpp"
|
||||||
|
#include "ui/FrameScript.hpp"
|
||||||
|
#include "util/Unimplemented.hpp"
|
||||||
|
|
||||||
|
namespace {
|
||||||
|
|
||||||
|
int32_t CGCooldown_SetCooldown(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t CGCooldown_SetReverse(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t CGCooldown_GetReverse(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t CGCooldown_SetDrawEdge(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t CGCooldown_GetDrawEdge(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
FrameScript_Method CGCooldownMethods[] = {
|
||||||
|
{ "SetCooldown", &CGCooldown_SetCooldown },
|
||||||
|
{ "SetReverse", &CGCooldown_SetReverse },
|
||||||
|
{ "GetReverse", &CGCooldown_GetReverse },
|
||||||
|
{ "SetDrawEdge", &CGCooldown_SetDrawEdge },
|
||||||
|
{ "GetDrawEdge", &CGCooldown_GetDrawEdge },
|
||||||
|
};
|
||||||
10
src/ui/game/CGCooldownScript.hpp
Normal file
10
src/ui/game/CGCooldownScript.hpp
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
#ifndef UI_GAME_C_G_COOLDOWN_SCRIPT_HPP
|
||||||
|
#define UI_GAME_C_G_COOLDOWN_SCRIPT_HPP
|
||||||
|
|
||||||
|
#include "ui/Types.hpp"
|
||||||
|
|
||||||
|
#define NUM_CG_COOLDOWN_SCRIPT_METHODS 5
|
||||||
|
|
||||||
|
extern FrameScript_Method CGCooldownMethods[NUM_CG_COOLDOWN_SCRIPT_METHODS];
|
||||||
|
|
||||||
|
#endif
|
||||||
37
src/ui/game/CGDressUpModelFrame.cpp
Normal file
37
src/ui/game/CGDressUpModelFrame.cpp
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
#include "ui/game/CGDressUpModelFrame.hpp"
|
||||||
|
#include "ui/game/CGDressUpModelFrameScript.hpp"
|
||||||
|
|
||||||
|
int32_t CGDressUpModelFrame::s_metatable;
|
||||||
|
int32_t CGDressUpModelFrame::s_objectType;
|
||||||
|
|
||||||
|
CSimpleFrame* CGDressUpModelFrame::Create(CSimpleFrame* parent) {
|
||||||
|
// TODO use CDataAllocator
|
||||||
|
|
||||||
|
return STORM_NEW(CGDressUpModelFrame)(parent);
|
||||||
|
}
|
||||||
|
|
||||||
|
void CGDressUpModelFrame::CreateScriptMetaTable() {
|
||||||
|
auto L = FrameScript_GetContext();
|
||||||
|
CGDressUpModelFrame::s_metatable = FrameScript_Object::CreateScriptMetaTable(L, &CGDressUpModelFrame::RegisterScriptMethods);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t CGDressUpModelFrame::GetObjectType() {
|
||||||
|
if (!CGDressUpModelFrame::s_objectType) {
|
||||||
|
CGDressUpModelFrame::s_objectType = ++FrameScript_Object::s_objectTypes;
|
||||||
|
}
|
||||||
|
|
||||||
|
return CGDressUpModelFrame::s_objectType;
|
||||||
|
}
|
||||||
|
|
||||||
|
void CGDressUpModelFrame::RegisterScriptMethods(lua_State* L) {
|
||||||
|
CGCharacterModelBase::RegisterScriptMethods(L);
|
||||||
|
FrameScript_Object::FillScriptMethodTable(L, CGDressUpModelFrameMethods, NUM_CG_DRESS_UP_MODEL_FRAME_SCRIPT_METHODS);
|
||||||
|
}
|
||||||
|
|
||||||
|
CGDressUpModelFrame::CGDressUpModelFrame(CSimpleFrame* parent) : CGCharacterModelBase(parent) {
|
||||||
|
// TODO
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t CGDressUpModelFrame::GetScriptMetaTable() {
|
||||||
|
return CGDressUpModelFrame::s_metatable;
|
||||||
|
}
|
||||||
28
src/ui/game/CGDressUpModelFrame.hpp
Normal file
28
src/ui/game/CGDressUpModelFrame.hpp
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
#ifndef UI_GAME_C_G_DRESS_UP_MODEL_FRAME_HPP
|
||||||
|
#define UI_GAME_C_G_DRESS_UP_MODEL_FRAME_HPP
|
||||||
|
|
||||||
|
#include "ui/game/CGCharacterModelBase.hpp"
|
||||||
|
|
||||||
|
class CGDressUpModelFrame : public CGCharacterModelBase {
|
||||||
|
public:
|
||||||
|
// Static variables
|
||||||
|
static int32_t s_metatable;
|
||||||
|
static int32_t s_objectType;
|
||||||
|
|
||||||
|
// Static functions
|
||||||
|
static CSimpleFrame* Create(CSimpleFrame* parent);
|
||||||
|
static void CreateScriptMetaTable();
|
||||||
|
static int32_t GetObjectType();
|
||||||
|
static void RegisterScriptMethods(lua_State* L);
|
||||||
|
|
||||||
|
// Member variables
|
||||||
|
// TODO
|
||||||
|
|
||||||
|
// Virtual member functions
|
||||||
|
virtual int32_t GetScriptMetaTable();
|
||||||
|
|
||||||
|
// Member functions
|
||||||
|
CGDressUpModelFrame(CSimpleFrame* parent);
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
||||||
25
src/ui/game/CGDressUpModelFrameScript.cpp
Normal file
25
src/ui/game/CGDressUpModelFrameScript.cpp
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
#include "ui/game/CGDressUpModelFrameScript.hpp"
|
||||||
|
#include "ui/FrameScript.hpp"
|
||||||
|
#include "util/Unimplemented.hpp"
|
||||||
|
|
||||||
|
namespace {
|
||||||
|
|
||||||
|
int32_t Script_Undress(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_Dress(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_TryOn(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
FrameScript_Method CGDressUpModelFrameMethods[] = {
|
||||||
|
{ "Undress", &Script_Undress },
|
||||||
|
{ "Dress", &Script_Dress },
|
||||||
|
{ "TryOn", &Script_TryOn },
|
||||||
|
};
|
||||||
10
src/ui/game/CGDressUpModelFrameScript.hpp
Normal file
10
src/ui/game/CGDressUpModelFrameScript.hpp
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
#ifndef UI_GAME_C_G_DRESS_UP_MODEL_FRAME_SCRIPT_HPP
|
||||||
|
#define UI_GAME_C_G_DRESS_UP_MODEL_FRAME_SCRIPT_HPP
|
||||||
|
|
||||||
|
#include "ui/Types.hpp"
|
||||||
|
|
||||||
|
#define NUM_CG_DRESS_UP_MODEL_FRAME_SCRIPT_METHODS 3
|
||||||
|
|
||||||
|
extern FrameScript_Method CGDressUpModelFrameMethods[NUM_CG_DRESS_UP_MODEL_FRAME_SCRIPT_METHODS];
|
||||||
|
|
||||||
|
#endif
|
||||||
@ -4,6 +4,12 @@
|
|||||||
#include "ui/FrameXML.hpp"
|
#include "ui/FrameXML.hpp"
|
||||||
#include "ui/Key.hpp"
|
#include "ui/Key.hpp"
|
||||||
#include "ui/game/BattlefieldInfoScript.hpp"
|
#include "ui/game/BattlefieldInfoScript.hpp"
|
||||||
|
#include "ui/game/CGCharacterModelBase.hpp"
|
||||||
|
#include "ui/game/CGCooldown.hpp"
|
||||||
|
#include "ui/game/CGDressUpModelFrame.hpp"
|
||||||
|
#include "ui/game/CGMinimapFrame.hpp"
|
||||||
|
#include "ui/game/CGQuestPOIFrame.hpp"
|
||||||
|
#include "ui/game/CGTabardModelFrame.hpp"
|
||||||
#include "ui/game/CGTooltip.hpp"
|
#include "ui/game/CGTooltip.hpp"
|
||||||
#include "ui/game/CGWorldFrame.hpp"
|
#include "ui/game/CGWorldFrame.hpp"
|
||||||
#include "ui/game/CharacterInfoScript.hpp"
|
#include "ui/game/CharacterInfoScript.hpp"
|
||||||
@ -22,8 +28,12 @@ void LoadScriptFunctions() {
|
|||||||
// TODO
|
// TODO
|
||||||
|
|
||||||
CGTooltip::CreateScriptMetaTable();
|
CGTooltip::CreateScriptMetaTable();
|
||||||
|
CGCooldown::CreateScriptMetaTable();
|
||||||
// TODO
|
CGMinimapFrame::CreateScriptMetaTable();
|
||||||
|
CGCharacterModelBase::CreateScriptMetaTable();
|
||||||
|
CGDressUpModelFrame::CreateScriptMetaTable();
|
||||||
|
CGTabardModelFrame::CreateScriptMetaTable();
|
||||||
|
CGQuestPOIFrame::CreateScriptMetaTable();
|
||||||
|
|
||||||
GameScriptRegisterFunctions();
|
GameScriptRegisterFunctions();
|
||||||
UIBindingsRegisterScriptFunctions();
|
UIBindingsRegisterScriptFunctions();
|
||||||
@ -137,6 +147,10 @@ void CGGameUI::InitializeGame() {
|
|||||||
void CGGameUI::RegisterFrameFactories() {
|
void CGGameUI::RegisterFrameFactories() {
|
||||||
FrameXML_RegisterFactory("WorldFrame", &CGWorldFrame::Create, true);
|
FrameXML_RegisterFactory("WorldFrame", &CGWorldFrame::Create, true);
|
||||||
FrameXML_RegisterFactory("GameTooltip", &CGTooltip::Create, false);
|
FrameXML_RegisterFactory("GameTooltip", &CGTooltip::Create, false);
|
||||||
|
FrameXML_RegisterFactory("Cooldown", &CGCooldown::Create, false);
|
||||||
// TODO register remaining factories
|
FrameXML_RegisterFactory("Minimap", &CGMinimapFrame::Create, false);
|
||||||
|
FrameXML_RegisterFactory("PlayerModel", &CGCharacterModelBase::Create, false);
|
||||||
|
FrameXML_RegisterFactory("DressUpModel", &CGDressUpModelFrame::Create, false);
|
||||||
|
FrameXML_RegisterFactory("TabardModel", &CGTabardModelFrame::Create, false);
|
||||||
|
FrameXML_RegisterFactory("QuestPOIFrame", &CGQuestPOIFrame::Create, false);
|
||||||
}
|
}
|
||||||
|
|||||||
37
src/ui/game/CGMinimapFrame.cpp
Normal file
37
src/ui/game/CGMinimapFrame.cpp
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
#include "ui/game/CGMinimapFrame.hpp"
|
||||||
|
#include "ui/game/CGMinimapFrameScript.hpp"
|
||||||
|
|
||||||
|
int32_t CGMinimapFrame::s_metatable;
|
||||||
|
int32_t CGMinimapFrame::s_objectType;
|
||||||
|
|
||||||
|
CSimpleFrame* CGMinimapFrame::Create(CSimpleFrame* parent) {
|
||||||
|
// TODO use CDataAllocator
|
||||||
|
|
||||||
|
return STORM_NEW(CGMinimapFrame)(parent);
|
||||||
|
}
|
||||||
|
|
||||||
|
void CGMinimapFrame::CreateScriptMetaTable() {
|
||||||
|
auto L = FrameScript_GetContext();
|
||||||
|
CGMinimapFrame::s_metatable = FrameScript_Object::CreateScriptMetaTable(L, &CGMinimapFrame::RegisterScriptMethods);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t CGMinimapFrame::GetObjectType() {
|
||||||
|
if (!CGMinimapFrame::s_objectType) {
|
||||||
|
CGMinimapFrame::s_objectType = ++FrameScript_Object::s_objectTypes;
|
||||||
|
}
|
||||||
|
|
||||||
|
return CGMinimapFrame::s_objectType;
|
||||||
|
}
|
||||||
|
|
||||||
|
void CGMinimapFrame::RegisterScriptMethods(lua_State* L) {
|
||||||
|
CSimpleFrame::RegisterScriptMethods(L);
|
||||||
|
FrameScript_Object::FillScriptMethodTable(L, CGMinimapFrameMethods, NUM_CG_MINIMAP_FRAME_SCRIPT_METHODS);
|
||||||
|
}
|
||||||
|
|
||||||
|
CGMinimapFrame::CGMinimapFrame(CSimpleFrame* parent) : CSimpleFrame(parent) {
|
||||||
|
// TODO
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t CGMinimapFrame::GetScriptMetaTable() {
|
||||||
|
return CGMinimapFrame::s_metatable;
|
||||||
|
}
|
||||||
28
src/ui/game/CGMinimapFrame.hpp
Normal file
28
src/ui/game/CGMinimapFrame.hpp
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
#ifndef UI_GAME_C_G_MINIMAP_FRAME_HPP
|
||||||
|
#define UI_GAME_C_G_MINIMAP_FRAME_HPP
|
||||||
|
|
||||||
|
#include "ui/simple/CSimpleFrame.hpp"
|
||||||
|
|
||||||
|
class CGMinimapFrame : public CSimpleFrame {
|
||||||
|
public:
|
||||||
|
// Static variables
|
||||||
|
static int32_t s_metatable;
|
||||||
|
static int32_t s_objectType;
|
||||||
|
|
||||||
|
// Static functions
|
||||||
|
static CSimpleFrame* Create(CSimpleFrame* parent);
|
||||||
|
static void CreateScriptMetaTable();
|
||||||
|
static int32_t GetObjectType();
|
||||||
|
static void RegisterScriptMethods(lua_State* L);
|
||||||
|
|
||||||
|
// Member variables
|
||||||
|
// TODO
|
||||||
|
|
||||||
|
// Virtual member functions
|
||||||
|
virtual int32_t GetScriptMetaTable();
|
||||||
|
|
||||||
|
// Member functions
|
||||||
|
CGMinimapFrame(CSimpleFrame* parent);
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
||||||
85
src/ui/game/CGMinimapFrameScript.cpp
Normal file
85
src/ui/game/CGMinimapFrameScript.cpp
Normal file
@ -0,0 +1,85 @@
|
|||||||
|
#include "ui/game/CGMinimapFrameScript.hpp"
|
||||||
|
#include "ui/FrameScript.hpp"
|
||||||
|
#include "util/Unimplemented.hpp"
|
||||||
|
|
||||||
|
namespace {
|
||||||
|
|
||||||
|
int32_t CGMinimapFrame_SetMaskTexture(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t CGMinimapFrame_SetIconTexture(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t CGMinimapFrame_SetBlipTexture(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t CGMinimapFrame_SetClassBlipTexture(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t CGMinimapFrame_SetPOIArrowTexture(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t CGMinimapFrame_SetStaticPOIArrowTexture(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t CGMinimapFrame_SetCorpsePOIArrowTexture(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t CGMinimapFrame_SetPlayerTexture(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t CGMinimapFrame_SetPlayerTextureHeight(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t CGMinimapFrame_SetPlayerTextureWidth(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t CGMinimapFrame_GetZoomLevels(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t CGMinimapFrame_GetZoom(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t CGMinimapFrame_SetZoom(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t CGMinimapFrame_PingLocation(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t CGMinimapFrame_GetPingPosition(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
FrameScript_Method CGMinimapFrameMethods[] = {
|
||||||
|
{ "SetMaskTexture", &CGMinimapFrame_SetMaskTexture },
|
||||||
|
{ "SetIconTexture", &CGMinimapFrame_SetIconTexture },
|
||||||
|
{ "SetBlipTexture", &CGMinimapFrame_SetBlipTexture },
|
||||||
|
{ "SetClassBlipTexture", &CGMinimapFrame_SetClassBlipTexture },
|
||||||
|
{ "SetPOIArrowTexture", &CGMinimapFrame_SetPOIArrowTexture },
|
||||||
|
{ "SetStaticPOIArrowTexture", &CGMinimapFrame_SetStaticPOIArrowTexture },
|
||||||
|
{ "SetCorpsePOIArrowTexture", &CGMinimapFrame_SetCorpsePOIArrowTexture },
|
||||||
|
{ "SetPlayerTexture", &CGMinimapFrame_SetPlayerTexture },
|
||||||
|
{ "SetPlayerTextureHeight", &CGMinimapFrame_SetPlayerTextureHeight },
|
||||||
|
{ "SetPlayerTextureWidth", &CGMinimapFrame_SetPlayerTextureWidth },
|
||||||
|
{ "GetZoomLevels", &CGMinimapFrame_GetZoomLevels },
|
||||||
|
{ "GetZoom", &CGMinimapFrame_GetZoom },
|
||||||
|
{ "SetZoom", &CGMinimapFrame_SetZoom },
|
||||||
|
{ "PingLocation", &CGMinimapFrame_PingLocation },
|
||||||
|
{ "GetPingPosition", &CGMinimapFrame_GetPingPosition },
|
||||||
|
};
|
||||||
10
src/ui/game/CGMinimapFrameScript.hpp
Normal file
10
src/ui/game/CGMinimapFrameScript.hpp
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
#ifndef UI_GAME_C_G_MINIMAP_FRAME_SCRIPT_HPP
|
||||||
|
#define UI_GAME_C_G_MINIMAP_FRAME_SCRIPT_HPP
|
||||||
|
|
||||||
|
#include "ui/Types.hpp"
|
||||||
|
|
||||||
|
#define NUM_CG_MINIMAP_FRAME_SCRIPT_METHODS 15
|
||||||
|
|
||||||
|
extern FrameScript_Method CGMinimapFrameMethods[NUM_CG_MINIMAP_FRAME_SCRIPT_METHODS];
|
||||||
|
|
||||||
|
#endif
|
||||||
38
src/ui/game/CGQuestPOIFrame.cpp
Normal file
38
src/ui/game/CGQuestPOIFrame.cpp
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
#include "ui/game/CGQuestPOIFrame.hpp"
|
||||||
|
#include "ui/game/CGQuestPOIFrameScript.hpp"
|
||||||
|
|
||||||
|
int32_t CGQuestPOIFrame::s_metatable;
|
||||||
|
int32_t CGQuestPOIFrame::s_objectType;
|
||||||
|
|
||||||
|
CSimpleFrame* CGQuestPOIFrame::Create(CSimpleFrame* parent) {
|
||||||
|
// TODO use CDataAllocator
|
||||||
|
|
||||||
|
return STORM_NEW(CGQuestPOIFrame)(parent);
|
||||||
|
}
|
||||||
|
|
||||||
|
void CGQuestPOIFrame::CreateScriptMetaTable() {
|
||||||
|
auto L = FrameScript_GetContext();
|
||||||
|
CGQuestPOIFrame::s_metatable = FrameScript_Object::CreateScriptMetaTable(L, &CGQuestPOIFrame::RegisterScriptMethods);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t CGQuestPOIFrame::GetObjectType() {
|
||||||
|
if (!CGQuestPOIFrame::s_objectType) {
|
||||||
|
CGQuestPOIFrame::s_objectType = ++FrameScript_Object::s_objectTypes;
|
||||||
|
}
|
||||||
|
|
||||||
|
return CGQuestPOIFrame::s_objectType;
|
||||||
|
}
|
||||||
|
|
||||||
|
void CGQuestPOIFrame::RegisterScriptMethods(lua_State* L) {
|
||||||
|
CSimpleFrame::RegisterScriptMethods(L);
|
||||||
|
FrameScript_Object::FillScriptMethodTable(L, CGQuestPOIFrameMethods, NUM_CG_QUEST_POI_FRAME_SCRIPT_METHODS);
|
||||||
|
}
|
||||||
|
|
||||||
|
CGQuestPOIFrame::CGQuestPOIFrame(CSimpleFrame* parent) : CSimpleFrame(parent) {
|
||||||
|
// TODO
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t CGQuestPOIFrame::GetScriptMetaTable() {
|
||||||
|
return CGQuestPOIFrame::s_metatable;
|
||||||
|
}
|
||||||
|
|
||||||
28
src/ui/game/CGQuestPOIFrame.hpp
Normal file
28
src/ui/game/CGQuestPOIFrame.hpp
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
#ifndef UI_GAME_C_G_QUEST_POI_FRAME_HPP
|
||||||
|
#define UI_GAME_C_G_QUEST_POI_FRAME_HPP
|
||||||
|
|
||||||
|
#include "ui/simple/CSimpleFrame.hpp"
|
||||||
|
|
||||||
|
class CGQuestPOIFrame : public CSimpleFrame {
|
||||||
|
public:
|
||||||
|
// Static variables
|
||||||
|
static int32_t s_metatable;
|
||||||
|
static int32_t s_objectType;
|
||||||
|
|
||||||
|
// Static functions
|
||||||
|
static CSimpleFrame* Create(CSimpleFrame* parent);
|
||||||
|
static void CreateScriptMetaTable();
|
||||||
|
static int32_t GetObjectType();
|
||||||
|
static void RegisterScriptMethods(lua_State* L);
|
||||||
|
|
||||||
|
// Member variables
|
||||||
|
// TODO
|
||||||
|
|
||||||
|
// Virtual member functions
|
||||||
|
virtual int32_t GetScriptMetaTable();
|
||||||
|
|
||||||
|
// Member functions
|
||||||
|
CGQuestPOIFrame(CSimpleFrame* parent);
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
||||||
80
src/ui/game/CGQuestPOIFrameScript.cpp
Normal file
80
src/ui/game/CGQuestPOIFrameScript.cpp
Normal file
@ -0,0 +1,80 @@
|
|||||||
|
#include "ui/game/CGQuestPOIFrameScript.hpp"
|
||||||
|
#include "ui/FrameScript.hpp"
|
||||||
|
#include "util/Unimplemented.hpp"
|
||||||
|
|
||||||
|
namespace {
|
||||||
|
|
||||||
|
int32_t CGQuestPOIFrame_SetFillTexture(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t CGQuestPOIFrame_SetFillAlpha(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t CGQuestPOIFrame_SetBorderTexture(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t CGQuestPOIFrame_SetBorderAlpha(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t CGQuestPOIFrame_SetBorderScalar(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t CGQuestPOIFrame_DrawQuestBlob(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t CGQuestPOIFrame_EnableSmoothing(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t CGQuestPOIFrame_EnableMerging(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t CGQuestPOIFrame_SetMergeThreshold(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t CGQuestPOIFrame_SetNumSplinePoints(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t CGQuestPOIFrame_UpdateQuestPOI(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t CGQuestPOIFrame_UpdateMouseOverTooltip(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t CGQuestPOIFrame_GetTooltipIndex(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t CGQuestPOIFrame_GetNumTooltips(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
FrameScript_Method CGQuestPOIFrameMethods[] = {
|
||||||
|
{ "SetFillTexture", &CGQuestPOIFrame_SetFillTexture },
|
||||||
|
{ "SetFillAlpha", &CGQuestPOIFrame_SetFillAlpha },
|
||||||
|
{ "SetBorderTexture", &CGQuestPOIFrame_SetBorderTexture },
|
||||||
|
{ "SetBorderAlpha", &CGQuestPOIFrame_SetBorderAlpha },
|
||||||
|
{ "SetBorderScalar", &CGQuestPOIFrame_SetBorderScalar },
|
||||||
|
{ "DrawQuestBlob", &CGQuestPOIFrame_DrawQuestBlob },
|
||||||
|
{ "EnableSmoothing", &CGQuestPOIFrame_EnableSmoothing },
|
||||||
|
{ "EnableMerging", &CGQuestPOIFrame_EnableMerging },
|
||||||
|
{ "SetMergeThreshold", &CGQuestPOIFrame_SetMergeThreshold },
|
||||||
|
{ "SetNumSplinePoints", &CGQuestPOIFrame_SetNumSplinePoints },
|
||||||
|
{ "UpdateQuestPOI", &CGQuestPOIFrame_UpdateQuestPOI },
|
||||||
|
{ "UpdateMouseOverTooltip", &CGQuestPOIFrame_UpdateMouseOverTooltip },
|
||||||
|
{ "GetTooltipIndex", &CGQuestPOIFrame_GetTooltipIndex },
|
||||||
|
{ "GetNumTooltips", &CGQuestPOIFrame_GetNumTooltips },
|
||||||
|
};
|
||||||
10
src/ui/game/CGQuestPOIFrameScript.hpp
Normal file
10
src/ui/game/CGQuestPOIFrameScript.hpp
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
#ifndef UI_GAME_C_G_QUEST_POI_FRAME_SCRIPT_HPP
|
||||||
|
#define UI_GAME_C_G_QUEST_POI_FRAME_SCRIPT_HPP
|
||||||
|
|
||||||
|
#include "ui/Types.hpp"
|
||||||
|
|
||||||
|
#define NUM_CG_QUEST_POI_FRAME_SCRIPT_METHODS 14
|
||||||
|
|
||||||
|
extern FrameScript_Method CGQuestPOIFrameMethods[NUM_CG_QUEST_POI_FRAME_SCRIPT_METHODS];
|
||||||
|
|
||||||
|
#endif
|
||||||
37
src/ui/game/CGTabardModelFrame.cpp
Normal file
37
src/ui/game/CGTabardModelFrame.cpp
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
#include "ui/game/CGTabardModelFrame.hpp"
|
||||||
|
#include "ui/game/CGTabardModelFrameScript.hpp"
|
||||||
|
|
||||||
|
int32_t CGTabardModelFrame::s_metatable;
|
||||||
|
int32_t CGTabardModelFrame::s_objectType;
|
||||||
|
|
||||||
|
CSimpleFrame* CGTabardModelFrame::Create(CSimpleFrame* parent) {
|
||||||
|
// TODO use CDataAllocator
|
||||||
|
|
||||||
|
return STORM_NEW(CGTabardModelFrame)(parent);
|
||||||
|
}
|
||||||
|
|
||||||
|
void CGTabardModelFrame::CreateScriptMetaTable() {
|
||||||
|
auto L = FrameScript_GetContext();
|
||||||
|
CGTabardModelFrame::s_metatable = FrameScript_Object::CreateScriptMetaTable(L, &CGTabardModelFrame::RegisterScriptMethods);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t CGTabardModelFrame::GetObjectType() {
|
||||||
|
if (!CGTabardModelFrame::s_objectType) {
|
||||||
|
CGTabardModelFrame::s_objectType = ++FrameScript_Object::s_objectTypes;
|
||||||
|
}
|
||||||
|
|
||||||
|
return CGTabardModelFrame::s_objectType;
|
||||||
|
}
|
||||||
|
|
||||||
|
void CGTabardModelFrame::RegisterScriptMethods(lua_State* L) {
|
||||||
|
CGCharacterModelBase::RegisterScriptMethods(L);
|
||||||
|
FrameScript_Object::FillScriptMethodTable(L, CGTabardModelFrameMethods, NUM_CG_TABARD_MODEL_FRAME_SCRIPT_METHODS);
|
||||||
|
}
|
||||||
|
|
||||||
|
CGTabardModelFrame::CGTabardModelFrame(CSimpleFrame* parent) : CGCharacterModelBase(parent) {
|
||||||
|
// TODO
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t CGTabardModelFrame::GetScriptMetaTable() {
|
||||||
|
return CGTabardModelFrame::s_metatable;
|
||||||
|
}
|
||||||
28
src/ui/game/CGTabardModelFrame.hpp
Normal file
28
src/ui/game/CGTabardModelFrame.hpp
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
#ifndef UI_GAME_C_G_TABARD_MODEL_FRAME_HPP
|
||||||
|
#define UI_GAME_C_G_TABARD_MODEL_FRAME_HPP
|
||||||
|
|
||||||
|
#include "ui/game/CGCharacterModelBase.hpp"
|
||||||
|
|
||||||
|
class CGTabardModelFrame : public CGCharacterModelBase {
|
||||||
|
public:
|
||||||
|
// Static variables
|
||||||
|
static int32_t s_metatable;
|
||||||
|
static int32_t s_objectType;
|
||||||
|
|
||||||
|
// Static functions
|
||||||
|
static CSimpleFrame* Create(CSimpleFrame* parent);
|
||||||
|
static void CreateScriptMetaTable();
|
||||||
|
static int32_t GetObjectType();
|
||||||
|
static void RegisterScriptMethods(lua_State* L);
|
||||||
|
|
||||||
|
// Member variables
|
||||||
|
// TODO
|
||||||
|
|
||||||
|
// Virtual member functions
|
||||||
|
virtual int32_t GetScriptMetaTable();
|
||||||
|
|
||||||
|
// Member functions
|
||||||
|
CGTabardModelFrame(CSimpleFrame* parent);
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
||||||
60
src/ui/game/CGTabardModelFrameScript.cpp
Normal file
60
src/ui/game/CGTabardModelFrameScript.cpp
Normal file
@ -0,0 +1,60 @@
|
|||||||
|
#include "ui/game/CGTabardModelFrameScript.hpp"
|
||||||
|
#include "ui/FrameScript.hpp"
|
||||||
|
#include "util/Unimplemented.hpp"
|
||||||
|
|
||||||
|
namespace {
|
||||||
|
|
||||||
|
int32_t CGTabardModelFrame_InitializeTabardColors(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t CGTabardModelFrame_Save(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t CGTabardModelFrame_CycleVariation(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t CGTabardModelFrame_GetUpperBackgroundFileName(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t CGTabardModelFrame_GetLowerBackgroundFileName(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t CGTabardModelFrame_GetUpperEmblemFileName(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t CGTabardModelFrame_GetLowerEmblemFileName(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t CGTabardModelFrame_GetUpperEmblemTexture(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t CGTabardModelFrame_GetLowerEmblemTexture(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t CGTabardModelFrame_CanSaveTabardNow(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
FrameScript_Method CGTabardModelFrameMethods[] = {
|
||||||
|
{ "InitializeTabardColors", &CGTabardModelFrame_InitializeTabardColors },
|
||||||
|
{ "Save", &CGTabardModelFrame_Save },
|
||||||
|
{ "CycleVariation", &CGTabardModelFrame_CycleVariation },
|
||||||
|
{ "GetUpperBackgroundFileName", &CGTabardModelFrame_GetUpperBackgroundFileName },
|
||||||
|
{ "GetLowerBackgroundFileName", &CGTabardModelFrame_GetLowerBackgroundFileName },
|
||||||
|
{ "GetUpperEmblemFileName", &CGTabardModelFrame_GetUpperEmblemFileName },
|
||||||
|
{ "GetLowerEmblemFileName", &CGTabardModelFrame_GetLowerEmblemFileName },
|
||||||
|
{ "GetUpperEmblemTexture", &CGTabardModelFrame_GetUpperEmblemTexture },
|
||||||
|
{ "GetLowerEmblemTexture", &CGTabardModelFrame_GetLowerEmblemTexture },
|
||||||
|
{ "CanSaveTabardNow", &CGTabardModelFrame_CanSaveTabardNow },
|
||||||
|
};
|
||||||
10
src/ui/game/CGTabardModelFrameScript.hpp
Normal file
10
src/ui/game/CGTabardModelFrameScript.hpp
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
#ifndef UI_GAME_C_G_TABARD_MODEL_FRAME_SCRIPT_HPP
|
||||||
|
#define UI_GAME_C_G_TABARD_MODEL_FRAME_SCRIPT_HPP
|
||||||
|
|
||||||
|
#include "ui/Types.hpp"
|
||||||
|
|
||||||
|
#define NUM_CG_TABARD_MODEL_FRAME_SCRIPT_METHODS 10
|
||||||
|
|
||||||
|
extern FrameScript_Method CGTabardModelFrameMethods[NUM_CG_TABARD_MODEL_FRAME_SCRIPT_METHODS];
|
||||||
|
|
||||||
|
#endif
|
||||||
@ -2,6 +2,8 @@
|
|||||||
#include "ui/FrameScript.hpp"
|
#include "ui/FrameScript.hpp"
|
||||||
#include "util/Unimplemented.hpp"
|
#include "util/Unimplemented.hpp"
|
||||||
|
|
||||||
|
namespace {
|
||||||
|
|
||||||
int32_t Script_GetGMTicket(lua_State* L) {
|
int32_t Script_GetGMTicket(lua_State* L) {
|
||||||
WHOA_UNIMPLEMENTED(0);
|
WHOA_UNIMPLEMENTED(0);
|
||||||
}
|
}
|
||||||
@ -62,6 +64,8 @@ int32_t Script_RegisterStaticConstants(lua_State* L) {
|
|||||||
WHOA_UNIMPLEMENTED(0);
|
WHOA_UNIMPLEMENTED(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
static FrameScript_Method s_ScriptFunctions[] = {
|
static FrameScript_Method s_ScriptFunctions[] = {
|
||||||
{ "GetGMTicket", &Script_GetGMTicket },
|
{ "GetGMTicket", &Script_GetGMTicket },
|
||||||
{ "NewGMTicket", &Script_NewGMTicket },
|
{ "NewGMTicket", &Script_NewGMTicket },
|
||||||
|
|||||||
@ -8,6 +8,7 @@
|
|||||||
#include "util/Unimplemented.hpp"
|
#include "util/Unimplemented.hpp"
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
int32_t Script_FrameXML_Debug(lua_State* L) {
|
int32_t Script_FrameXML_Debug(lua_State* L) {
|
||||||
WHOA_UNIMPLEMENTED(0);
|
WHOA_UNIMPLEMENTED(0);
|
||||||
}
|
}
|
||||||
@ -133,7 +134,21 @@ int32_t Script_SetCVar(lua_State* L) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
int32_t Script_GetCVar(lua_State* L) {
|
int32_t Script_GetCVar(lua_State* L) {
|
||||||
WHOA_UNIMPLEMENTED(0);
|
if (!lua_isstring(L, 1)) {
|
||||||
|
luaL_error(L, "Usage: GetCVar(\"cvar\")");
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
auto varName = lua_tostring(L, 1);
|
||||||
|
auto var = CVar::LookupRegistered(varName);
|
||||||
|
|
||||||
|
if (var && !(var->m_flags & 0x40)) {
|
||||||
|
lua_pushstring(L, var->GetString());
|
||||||
|
} else {
|
||||||
|
lua_pushnil(L);
|
||||||
|
}
|
||||||
|
|
||||||
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t Script_GetCVarBool(lua_State* L) {
|
int32_t Script_GetCVarBool(lua_State* L) {
|
||||||
|
|||||||
@ -3,6 +3,8 @@
|
|||||||
#include "ui/ScriptFunctionsSystem.hpp"
|
#include "ui/ScriptFunctionsSystem.hpp"
|
||||||
#include "util/Unimplemented.hpp"
|
#include "util/Unimplemented.hpp"
|
||||||
|
|
||||||
|
namespace {
|
||||||
|
|
||||||
int32_t Script_UnitExists(lua_State* L) {
|
int32_t Script_UnitExists(lua_State* L) {
|
||||||
WHOA_UNIMPLEMENTED(0);
|
WHOA_UNIMPLEMENTED(0);
|
||||||
}
|
}
|
||||||
@ -679,6 +681,8 @@ int32_t Script_FillLocalizedClassList(lua_State* L) {
|
|||||||
WHOA_UNIMPLEMENTED(0);
|
WHOA_UNIMPLEMENTED(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
static FrameScript_Method s_UnitFunctions[] = {
|
static FrameScript_Method s_UnitFunctions[] = {
|
||||||
{ "UnitExists", &Script_UnitExists },
|
{ "UnitExists", &Script_UnitExists },
|
||||||
{ "UnitIsVisible", &Script_UnitIsVisible },
|
{ "UnitIsVisible", &Script_UnitIsVisible },
|
||||||
|
|||||||
31
src/ui/simple/CSimpleStatusBar.cpp
Normal file
31
src/ui/simple/CSimpleStatusBar.cpp
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
#include "ui/simple/CSimpleStatusBar.hpp"
|
||||||
|
#include "ui/simple/CSimpleStatusBarScript.hpp"
|
||||||
|
|
||||||
|
int32_t CSimpleStatusBar::s_metatable;
|
||||||
|
int32_t CSimpleStatusBar::s_objectType;
|
||||||
|
|
||||||
|
void CSimpleStatusBar::CreateScriptMetaTable() {
|
||||||
|
auto L = FrameScript_GetContext();
|
||||||
|
CSimpleStatusBar::s_metatable = FrameScript_Object::CreateScriptMetaTable(L, &CSimpleStatusBar::RegisterScriptMethods);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t CSimpleStatusBar::GetObjectType() {
|
||||||
|
if (!CSimpleStatusBar::s_objectType) {
|
||||||
|
CSimpleStatusBar::s_objectType = ++FrameScript_Object::s_objectTypes;
|
||||||
|
}
|
||||||
|
|
||||||
|
return CSimpleStatusBar::s_objectType;
|
||||||
|
}
|
||||||
|
|
||||||
|
void CSimpleStatusBar::RegisterScriptMethods(lua_State* L) {
|
||||||
|
CSimpleFrame::RegisterScriptMethods(L);
|
||||||
|
FrameScript_Object::FillScriptMethodTable(L, SimpleStatusBarMethods, NUM_SIMPLE_STATUS_BAR_SCRIPT_METHODS);
|
||||||
|
}
|
||||||
|
|
||||||
|
CSimpleStatusBar::CSimpleStatusBar(CSimpleFrame* parent) : CSimpleFrame(parent) {
|
||||||
|
// TODO
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t CSimpleStatusBar::GetScriptMetaTable() {
|
||||||
|
return CSimpleStatusBar::s_metatable;
|
||||||
|
}
|
||||||
27
src/ui/simple/CSimpleStatusBar.hpp
Normal file
27
src/ui/simple/CSimpleStatusBar.hpp
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
#ifndef UI_SIMPLE_C_SIMPLE_STATUS_BAR_HPP
|
||||||
|
#define UI_SIMPLE_C_SIMPLE_STATUS_BAR_HPP
|
||||||
|
|
||||||
|
#include "ui/simple/CSimpleFrame.hpp"
|
||||||
|
|
||||||
|
class CSimpleStatusBar : public CSimpleFrame {
|
||||||
|
public:
|
||||||
|
// Static variables
|
||||||
|
static int32_t s_metatable;
|
||||||
|
static int32_t s_objectType;
|
||||||
|
|
||||||
|
// Static functions
|
||||||
|
static void CreateScriptMetaTable();
|
||||||
|
static int32_t GetObjectType();
|
||||||
|
static void RegisterScriptMethods(lua_State* L);
|
||||||
|
|
||||||
|
// Member variables
|
||||||
|
// TODO
|
||||||
|
|
||||||
|
// Virtual member functions
|
||||||
|
virtual int32_t GetScriptMetaTable();
|
||||||
|
|
||||||
|
// Member functions
|
||||||
|
CSimpleStatusBar(CSimpleFrame* parent);
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
||||||
70
src/ui/simple/CSimpleStatusBarScript.cpp
Normal file
70
src/ui/simple/CSimpleStatusBarScript.cpp
Normal file
@ -0,0 +1,70 @@
|
|||||||
|
#include "ui/simple/CSimpleStatusBarScript.hpp"
|
||||||
|
#include "ui/FrameScript.hpp"
|
||||||
|
#include "util/Unimplemented.hpp"
|
||||||
|
|
||||||
|
namespace {
|
||||||
|
|
||||||
|
int32_t CSimpleStatusBar_GetOrientation(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t CSimpleStatusBar_SetOrientation(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t CSimpleStatusBar_GetMinMaxValues(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t CSimpleStatusBar_SetMinMaxValues(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t CSimpleStatusBar_GetValue(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t CSimpleStatusBar_SetValue(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t CSimpleStatusBar_GetStatusBarTexture(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t CSimpleStatusBar_SetStatusBarTexture(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t CSimpleStatusBar_GetStatusBarColor(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t CSimpleStatusBar_SetStatusBarColor(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t CSimpleStatusBar_GetRotatesTexture(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t CSimpleStatusBar_SetRotatesTexture(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
FrameScript_Method SimpleStatusBarMethods[] = {
|
||||||
|
{ "GetOrientation", &CSimpleStatusBar_GetOrientation },
|
||||||
|
{ "SetOrientation", &CSimpleStatusBar_SetOrientation },
|
||||||
|
{ "GetMinMaxValues", &CSimpleStatusBar_GetMinMaxValues },
|
||||||
|
{ "SetMinMaxValues", &CSimpleStatusBar_SetMinMaxValues },
|
||||||
|
{ "GetValue", &CSimpleStatusBar_GetValue },
|
||||||
|
{ "SetValue", &CSimpleStatusBar_SetValue },
|
||||||
|
{ "GetStatusBarTexture", &CSimpleStatusBar_GetStatusBarTexture },
|
||||||
|
{ "SetStatusBarTexture", &CSimpleStatusBar_SetStatusBarTexture },
|
||||||
|
{ "GetStatusBarColor", &CSimpleStatusBar_GetStatusBarColor },
|
||||||
|
{ "SetStatusBarColor", &CSimpleStatusBar_SetStatusBarColor },
|
||||||
|
{ "GetRotatesTexture", &CSimpleStatusBar_GetRotatesTexture },
|
||||||
|
{ "SetRotatesTexture", &CSimpleStatusBar_SetRotatesTexture },
|
||||||
|
};
|
||||||
10
src/ui/simple/CSimpleStatusBarScript.hpp
Normal file
10
src/ui/simple/CSimpleStatusBarScript.hpp
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
#ifndef UI_SIMPLE_C_SIMPLE_STATUS_BAR_SCRIPT_HPP
|
||||||
|
#define UI_SIMPLE_C_SIMPLE_STATUS_BAR_SCRIPT_HPP
|
||||||
|
|
||||||
|
#include "ui/Types.hpp"
|
||||||
|
|
||||||
|
#define NUM_SIMPLE_STATUS_BAR_SCRIPT_METHODS 12
|
||||||
|
|
||||||
|
extern FrameScript_Method SimpleStatusBarMethods[NUM_SIMPLE_STATUS_BAR_SCRIPT_METHODS];
|
||||||
|
|
||||||
|
#endif
|
||||||
@ -12,6 +12,7 @@
|
|||||||
#include "ui/simple/CSimpleModelFFX.hpp"
|
#include "ui/simple/CSimpleModelFFX.hpp"
|
||||||
#include "ui/simple/CSimpleScrollFrame.hpp"
|
#include "ui/simple/CSimpleScrollFrame.hpp"
|
||||||
#include "ui/simple/CSimpleSlider.hpp"
|
#include "ui/simple/CSimpleSlider.hpp"
|
||||||
|
#include "ui/simple/CSimpleStatusBar.hpp"
|
||||||
#include "ui/simple/CSimpleTexture.hpp"
|
#include "ui/simple/CSimpleTexture.hpp"
|
||||||
#include "util/CStatus.hpp"
|
#include "util/CStatus.hpp"
|
||||||
#include "util/Lua.hpp"
|
#include "util/Lua.hpp"
|
||||||
@ -190,9 +191,9 @@ void RegisterSimpleFrameScriptMethods() {
|
|||||||
CSimpleModelFFX::CreateScriptMetaTable();
|
CSimpleModelFFX::CreateScriptMetaTable();
|
||||||
CSimpleScrollFrame::CreateScriptMetaTable();
|
CSimpleScrollFrame::CreateScriptMetaTable();
|
||||||
CSimpleSlider::CreateScriptMetaTable();
|
CSimpleSlider::CreateScriptMetaTable();
|
||||||
|
CSimpleStatusBar::CreateScriptMetaTable();
|
||||||
|
|
||||||
// TODO
|
// TODO
|
||||||
// CSimpleStatusBar::CreateScriptMetaTable();
|
|
||||||
// CSimpleColorSelect::CreateScriptMetaTable();
|
// CSimpleColorSelect::CreateScriptMetaTable();
|
||||||
// CSimpleMovieFrame::CreateScriptMetaTable();
|
// CSimpleMovieFrame::CreateScriptMetaTable();
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user