mirror of
https://github.com/thunderbrewhq/thunderbrew
synced 2025-04-19 03:20:11 +03:00
feat(ui): register realm list functions
This commit is contained in:
parent
57db9ca2a5
commit
f95c041323
@ -480,10 +480,7 @@ void CGlueMgr::Resume() {
|
||||
GlueScriptEventsRegisterFunctions();
|
||||
CharSelectRegisterScriptFunctions();
|
||||
CharacterCreateRegisterScriptFunctions();
|
||||
|
||||
// TODO
|
||||
// RealmListRegisterScriptFunctions();
|
||||
|
||||
RealmListRegisterScriptFunctions();
|
||||
SI2::RegisterScriptFunctions();
|
||||
|
||||
// TODO
|
||||
|
@ -40,6 +40,15 @@ void GlueScriptEventsRegisterFunctions() {
|
||||
}
|
||||
}
|
||||
|
||||
void RealmListRegisterScriptFunctions() {
|
||||
for (int32_t i = 0; i < NUM_SCRIPT_FUNCTIONS_REALM_LIST; ++i) {
|
||||
FrameScript_RegisterFunction(
|
||||
FrameScript::s_ScriptFunctions_RealmList[i].name,
|
||||
FrameScript::s_ScriptFunctions_RealmList[i].method
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
void RegisterSimpleFrameScriptMethods() {
|
||||
for (int32_t i = 0; i < NUM_SCRIPT_FUNCTIONS_SIMPLE_FRAME; ++i) {
|
||||
FrameScript_RegisterFunction(
|
||||
|
@ -9,6 +9,7 @@ struct lua_State;
|
||||
#define NUM_SCRIPT_FUNCTIONS_CHAR_CREATE 32
|
||||
#define NUM_SCRIPT_FUNCTIONS_CHAR_SELECT 13
|
||||
#define NUM_SCRIPT_FUNCTIONS_GLUE_SCRIPT_EVENTS 113
|
||||
#define NUM_SCRIPT_FUNCTIONS_REALM_LIST 14
|
||||
#define NUM_SCRIPT_FUNCTIONS_SIMPLE_FRAME 7
|
||||
#define NUM_SCRIPT_FUNCTIONS_SYSTEM 7
|
||||
|
||||
@ -16,6 +17,7 @@ namespace FrameScript {
|
||||
extern FrameScript_Method s_ScriptFunctions_CharCreate[NUM_SCRIPT_FUNCTIONS_CHAR_CREATE];
|
||||
extern FrameScript_Method s_ScriptFunctions_CharSelect[NUM_SCRIPT_FUNCTIONS_CHAR_SELECT];
|
||||
extern FrameScript_Method s_ScriptFunctions_GlueScriptEvents[NUM_SCRIPT_FUNCTIONS_GLUE_SCRIPT_EVENTS];
|
||||
extern FrameScript_Method s_ScriptFunctions_RealmList[NUM_SCRIPT_FUNCTIONS_REALM_LIST];
|
||||
extern FrameScript_Method s_ScriptFunctions_SimpleFrame[NUM_SCRIPT_FUNCTIONS_SIMPLE_FRAME];
|
||||
extern FrameScript_Method s_ScriptFunctions_System[NUM_SCRIPT_FUNCTIONS_SYSTEM];
|
||||
}
|
||||
@ -25,6 +27,7 @@ namespace FrameScript {
|
||||
void CharacterCreateRegisterScriptFunctions();
|
||||
void CharSelectRegisterScriptFunctions();
|
||||
void GlueScriptEventsRegisterFunctions();
|
||||
void RealmListRegisterScriptFunctions();
|
||||
void RegisterSimpleFrameScriptMethods();
|
||||
void SystemRegisterFunctions();
|
||||
|
||||
|
78
src/ui/ScriptFunctionsRealmList.cpp
Normal file
78
src/ui/ScriptFunctionsRealmList.cpp
Normal file
@ -0,0 +1,78 @@
|
||||
#include "ui/ScriptFunctions.hpp"
|
||||
#include "ui/Types.hpp"
|
||||
#include "util/Lua.hpp"
|
||||
#include "util/Unimplemented.hpp"
|
||||
#include <cstdint>
|
||||
|
||||
int32_t Script_RequestRealmList(lua_State* L) {
|
||||
WHOA_UNIMPLEMENTED();
|
||||
}
|
||||
|
||||
int32_t Script_RealmListUpdateRate(lua_State* L) {
|
||||
WHOA_UNIMPLEMENTED();
|
||||
}
|
||||
|
||||
int32_t Script_CancelRealmListQuery(lua_State* L) {
|
||||
WHOA_UNIMPLEMENTED();
|
||||
}
|
||||
|
||||
int32_t Script_GetNumRealms(lua_State* L) {
|
||||
WHOA_UNIMPLEMENTED();
|
||||
}
|
||||
|
||||
int32_t Script_GetRealmInfo(lua_State* L) {
|
||||
WHOA_UNIMPLEMENTED();
|
||||
}
|
||||
|
||||
int32_t Script_ChangeRealm(lua_State* L) {
|
||||
WHOA_UNIMPLEMENTED();
|
||||
}
|
||||
|
||||
int32_t Script_GetRealmCategories(lua_State* L) {
|
||||
WHOA_UNIMPLEMENTED();
|
||||
}
|
||||
|
||||
int32_t Script_SetPreferredInfo(lua_State* L) {
|
||||
WHOA_UNIMPLEMENTED();
|
||||
}
|
||||
|
||||
int32_t Script_SortRealms(lua_State* L) {
|
||||
WHOA_UNIMPLEMENTED();
|
||||
}
|
||||
|
||||
int32_t Script_GetSelectedCategory(lua_State* L) {
|
||||
WHOA_UNIMPLEMENTED();
|
||||
}
|
||||
|
||||
int32_t Script_RealmListDialogCancelled(lua_State* L) {
|
||||
WHOA_UNIMPLEMENTED();
|
||||
}
|
||||
|
||||
int32_t Script_IsInvalidTournamentRealmCategory(lua_State* L) {
|
||||
WHOA_UNIMPLEMENTED();
|
||||
}
|
||||
|
||||
int32_t Script_IsTournamentRealmCategory(lua_State* L) {
|
||||
WHOA_UNIMPLEMENTED();
|
||||
}
|
||||
|
||||
int32_t Script_IsInvalidLocale(lua_State* L) {
|
||||
WHOA_UNIMPLEMENTED();
|
||||
}
|
||||
|
||||
FrameScript_Method FrameScript::s_ScriptFunctions_RealmList[NUM_SCRIPT_FUNCTIONS_REALM_LIST] = {
|
||||
{ "RequestRealmList", &Script_RequestRealmList },
|
||||
{ "RealmListUpdateRate", &Script_RealmListUpdateRate },
|
||||
{ "CancelRealmListQuery", &Script_CancelRealmListQuery },
|
||||
{ "GetNumRealms", &Script_GetNumRealms },
|
||||
{ "GetRealmInfo", &Script_GetRealmInfo },
|
||||
{ "ChangeRealm", &Script_ChangeRealm },
|
||||
{ "GetRealmCategories", &Script_GetRealmCategories },
|
||||
{ "SetPreferredInfo", &Script_SetPreferredInfo },
|
||||
{ "SortRealms", &Script_SortRealms },
|
||||
{ "GetSelectedCategory", &Script_GetSelectedCategory },
|
||||
{ "RealmListDialogCancelled", &Script_RealmListDialogCancelled },
|
||||
{ "IsInvalidTournamentRealmCategory", &Script_IsInvalidTournamentRealmCategory },
|
||||
{ "IsTournamentRealmCategory", &Script_IsTournamentRealmCategory },
|
||||
{ "IsInvalidLocale", &Script_IsInvalidLocale }
|
||||
};
|
Loading…
Reference in New Issue
Block a user