mirror of
https://github.com/thunderbrewhq/thunderbrew
synced 2025-12-12 11:12:29 +00:00
feat(ui): register realm list functions
This commit is contained in:
parent
57db9ca2a5
commit
f95c041323
4 changed files with 91 additions and 4 deletions
|
|
@ -480,10 +480,7 @@ void CGlueMgr::Resume() {
|
||||||
GlueScriptEventsRegisterFunctions();
|
GlueScriptEventsRegisterFunctions();
|
||||||
CharSelectRegisterScriptFunctions();
|
CharSelectRegisterScriptFunctions();
|
||||||
CharacterCreateRegisterScriptFunctions();
|
CharacterCreateRegisterScriptFunctions();
|
||||||
|
RealmListRegisterScriptFunctions();
|
||||||
// TODO
|
|
||||||
// RealmListRegisterScriptFunctions();
|
|
||||||
|
|
||||||
SI2::RegisterScriptFunctions();
|
SI2::RegisterScriptFunctions();
|
||||||
|
|
||||||
// TODO
|
// 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() {
|
void RegisterSimpleFrameScriptMethods() {
|
||||||
for (int32_t i = 0; i < NUM_SCRIPT_FUNCTIONS_SIMPLE_FRAME; ++i) {
|
for (int32_t i = 0; i < NUM_SCRIPT_FUNCTIONS_SIMPLE_FRAME; ++i) {
|
||||||
FrameScript_RegisterFunction(
|
FrameScript_RegisterFunction(
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,7 @@ struct lua_State;
|
||||||
#define NUM_SCRIPT_FUNCTIONS_CHAR_CREATE 32
|
#define NUM_SCRIPT_FUNCTIONS_CHAR_CREATE 32
|
||||||
#define NUM_SCRIPT_FUNCTIONS_CHAR_SELECT 13
|
#define NUM_SCRIPT_FUNCTIONS_CHAR_SELECT 13
|
||||||
#define NUM_SCRIPT_FUNCTIONS_GLUE_SCRIPT_EVENTS 113
|
#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_SIMPLE_FRAME 7
|
||||||
#define NUM_SCRIPT_FUNCTIONS_SYSTEM 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_CharCreate[NUM_SCRIPT_FUNCTIONS_CHAR_CREATE];
|
||||||
extern FrameScript_Method s_ScriptFunctions_CharSelect[NUM_SCRIPT_FUNCTIONS_CHAR_SELECT];
|
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_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_SimpleFrame[NUM_SCRIPT_FUNCTIONS_SIMPLE_FRAME];
|
||||||
extern FrameScript_Method s_ScriptFunctions_System[NUM_SCRIPT_FUNCTIONS_SYSTEM];
|
extern FrameScript_Method s_ScriptFunctions_System[NUM_SCRIPT_FUNCTIONS_SYSTEM];
|
||||||
}
|
}
|
||||||
|
|
@ -25,6 +27,7 @@ namespace FrameScript {
|
||||||
void CharacterCreateRegisterScriptFunctions();
|
void CharacterCreateRegisterScriptFunctions();
|
||||||
void CharSelectRegisterScriptFunctions();
|
void CharSelectRegisterScriptFunctions();
|
||||||
void GlueScriptEventsRegisterFunctions();
|
void GlueScriptEventsRegisterFunctions();
|
||||||
|
void RealmListRegisterScriptFunctions();
|
||||||
void RegisterSimpleFrameScriptMethods();
|
void RegisterSimpleFrameScriptMethods();
|
||||||
void SystemRegisterFunctions();
|
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…
Add table
Add a link
Reference in a new issue