mirror of
https://github.com/whoahq/whoa.git
synced 2026-02-01 00:02:45 +03:00
chore(ui): clean up RegisterSimpleFrameScriptMethods
This commit is contained in:
parent
cbbf491620
commit
dc071210ca
@ -26,11 +26,11 @@
|
|||||||
#include "ui/FrameXML.hpp"
|
#include "ui/FrameXML.hpp"
|
||||||
#include "ui/Interface.hpp"
|
#include "ui/Interface.hpp"
|
||||||
#include "ui/Key.hpp"
|
#include "ui/Key.hpp"
|
||||||
#include "ui/ScriptFunctions.hpp"
|
|
||||||
#include "ui/ScriptFunctionsSystem.hpp"
|
#include "ui/ScriptFunctionsSystem.hpp"
|
||||||
#include "ui/game/CGVideoOptions.hpp"
|
#include "ui/game/CGVideoOptions.hpp"
|
||||||
#include "ui/simple/CSimpleModelFFX.hpp"
|
#include "ui/simple/CSimpleModelFFX.hpp"
|
||||||
#include "ui/simple/CSimpleTop.hpp"
|
#include "ui/simple/CSimpleTop.hpp"
|
||||||
|
#include "ui/simple/ScriptMethods.hpp"
|
||||||
#include "util/Filesystem.hpp"
|
#include "util/Filesystem.hpp"
|
||||||
#include "util/Locale.hpp"
|
#include "util/Locale.hpp"
|
||||||
#include "util/Log.hpp"
|
#include "util/Log.hpp"
|
||||||
|
|||||||
@ -1,56 +0,0 @@
|
|||||||
#include "ui/ScriptFunctions.hpp"
|
|
||||||
#include "ui/FrameScript.hpp"
|
|
||||||
#include "ui/simple/CSimpleButton.hpp"
|
|
||||||
#include "ui/simple/CSimpleCheckbox.hpp"
|
|
||||||
#include "ui/simple/CSimpleEditBox.hpp"
|
|
||||||
#include "ui/simple/CSimpleFont.hpp"
|
|
||||||
#include "ui/simple/CSimpleFontString.hpp"
|
|
||||||
#include "ui/simple/CSimpleFrame.hpp"
|
|
||||||
#include "ui/simple/CSimpleHTML.hpp"
|
|
||||||
#include "ui/simple/CSimpleModel.hpp"
|
|
||||||
#include "ui/simple/CSimpleModelFFX.hpp"
|
|
||||||
#include "ui/simple/CSimpleScrollFrame.hpp"
|
|
||||||
#include "ui/simple/CSimpleSlider.hpp"
|
|
||||||
#include "ui/simple/CSimpleTexture.hpp"
|
|
||||||
|
|
||||||
void RegisterSimpleFrameScriptMethods() {
|
|
||||||
for (int32_t i = 0; i < NUM_SCRIPT_FUNCTIONS_SIMPLE_FRAME; ++i) {
|
|
||||||
FrameScript_RegisterFunction(
|
|
||||||
FrameScript::s_ScriptFunctions_SimpleFrame[i].name,
|
|
||||||
FrameScript::s_ScriptFunctions_SimpleFrame[i].method
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
// TODO
|
|
||||||
// CSimpleAnim::CreateScriptMetaTable();
|
|
||||||
// CSimpleTranslationAnim::CreateScriptMetaTable();
|
|
||||||
// CSimpleRotationAnim::CreateScriptMetaTable();
|
|
||||||
// CSimpleScaleAnim::CreateScriptMetaTable();
|
|
||||||
// CSimpleControlPoint::CreateScriptMetaTable();
|
|
||||||
// CSimplePathAnim::CreateScriptMetaTable();
|
|
||||||
// CSimpleAlphaAnim::CreateScriptMetaTable();
|
|
||||||
// CSimpleAnimGroup::CreateScriptMetaTable();
|
|
||||||
|
|
||||||
CSimpleFont::CreateScriptMetaTable();
|
|
||||||
CSimpleTexture::CreateScriptMetaTable();
|
|
||||||
CSimpleFontString::CreateScriptMetaTable();
|
|
||||||
CSimpleFrame::CreateScriptMetaTable();
|
|
||||||
CSimpleButton::CreateScriptMetaTable();
|
|
||||||
CSimpleCheckbox::CreateScriptMetaTable();
|
|
||||||
CSimpleEditBox::CreateScriptMetaTable();
|
|
||||||
CSimpleHTML::CreateScriptMetaTable();
|
|
||||||
|
|
||||||
// TODO
|
|
||||||
// CSimpleMessageFrame::CreateScriptMetaTable();
|
|
||||||
// CSimpleMessageScrollFrame::CreateScriptMetaTable();
|
|
||||||
|
|
||||||
CSimpleModel::CreateScriptMetaTable();
|
|
||||||
CSimpleModelFFX::CreateScriptMetaTable();
|
|
||||||
CSimpleScrollFrame::CreateScriptMetaTable();
|
|
||||||
CSimpleSlider::CreateScriptMetaTable();
|
|
||||||
|
|
||||||
// TODO
|
|
||||||
// CSimpleStatusBar::CreateScriptMetaTable();
|
|
||||||
// CSimpleColorSelect::CreateScriptMetaTable();
|
|
||||||
// CSimpleMovieFrame::CreateScriptMetaTable();
|
|
||||||
}
|
|
||||||
@ -1,17 +0,0 @@
|
|||||||
#ifndef UI_SCRIPT_FUNCTIONS_HPP
|
|
||||||
#define UI_SCRIPT_FUNCTIONS_HPP
|
|
||||||
|
|
||||||
#include "ui/Types.hpp"
|
|
||||||
#include <cstdint>
|
|
||||||
|
|
||||||
struct lua_State;
|
|
||||||
|
|
||||||
#define NUM_SCRIPT_FUNCTIONS_SIMPLE_FRAME 7
|
|
||||||
|
|
||||||
namespace FrameScript {
|
|
||||||
extern FrameScript_Method s_ScriptFunctions_SimpleFrame[NUM_SCRIPT_FUNCTIONS_SIMPLE_FRAME];
|
|
||||||
}
|
|
||||||
|
|
||||||
void RegisterSimpleFrameScriptMethods();
|
|
||||||
|
|
||||||
#endif
|
|
||||||
@ -1,4 +1,4 @@
|
|||||||
#include "ui/ScriptFunctions.hpp"
|
#include "ui/ScriptFunctionsShared.hpp"
|
||||||
#include "util/Lua.hpp"
|
#include "util/Lua.hpp"
|
||||||
#include "util/Unimplemented.hpp"
|
#include "util/Unimplemented.hpp"
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
|
|||||||
@ -1,13 +1,24 @@
|
|||||||
|
#include "ui/simple/ScriptMethods.hpp"
|
||||||
#include "ui/FrameXML.hpp"
|
#include "ui/FrameXML.hpp"
|
||||||
#include "ui/ScriptFunctions.hpp"
|
|
||||||
#include "ui/Types.hpp"
|
#include "ui/Types.hpp"
|
||||||
|
#include "ui/simple/CSimpleButton.hpp"
|
||||||
|
#include "ui/simple/CSimpleCheckbox.hpp"
|
||||||
|
#include "ui/simple/CSimpleEditBox.hpp"
|
||||||
|
#include "ui/simple/CSimpleFont.hpp"
|
||||||
|
#include "ui/simple/CSimpleFontString.hpp"
|
||||||
#include "ui/simple/CSimpleFrame.hpp"
|
#include "ui/simple/CSimpleFrame.hpp"
|
||||||
|
#include "ui/simple/CSimpleHTML.hpp"
|
||||||
|
#include "ui/simple/CSimpleModel.hpp"
|
||||||
|
#include "ui/simple/CSimpleModelFFX.hpp"
|
||||||
|
#include "ui/simple/CSimpleScrollFrame.hpp"
|
||||||
|
#include "ui/simple/CSimpleSlider.hpp"
|
||||||
|
#include "ui/simple/CSimpleTexture.hpp"
|
||||||
#include "util/CStatus.hpp"
|
#include "util/CStatus.hpp"
|
||||||
#include "util/Lua.hpp"
|
#include "util/Lua.hpp"
|
||||||
#include "util/Unimplemented.hpp"
|
#include "util/Unimplemented.hpp"
|
||||||
#include <common/XML.hpp>
|
#include <common/XML.hpp>
|
||||||
#include <cstdint>
|
|
||||||
#include <storm/String.hpp>
|
#include <storm/String.hpp>
|
||||||
|
#include <cstdint>
|
||||||
|
|
||||||
int32_t Script_GetText(lua_State* L) {
|
int32_t Script_GetText(lua_State* L) {
|
||||||
WHOA_UNIMPLEMENTED(0);
|
WHOA_UNIMPLEMENTED(0);
|
||||||
@ -137,7 +148,7 @@ int32_t Script_GetCurrentKeyBoardFocus(lua_State* L) {
|
|||||||
WHOA_UNIMPLEMENTED(0);
|
WHOA_UNIMPLEMENTED(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
FrameScript_Method FrameScript::s_ScriptFunctions_SimpleFrame[NUM_SCRIPT_FUNCTIONS_SIMPLE_FRAME] = {
|
static FrameScript_Method s_ScriptFunctions[] = {
|
||||||
{ "GetText", &Script_GetText },
|
{ "GetText", &Script_GetText },
|
||||||
{ "GetNumFrames", &Script_GetNumFrames },
|
{ "GetNumFrames", &Script_GetNumFrames },
|
||||||
{ "EnumerateFrames", &Script_EnumerateFrames },
|
{ "EnumerateFrames", &Script_EnumerateFrames },
|
||||||
@ -146,3 +157,42 @@ FrameScript_Method FrameScript::s_ScriptFunctions_SimpleFrame[NUM_SCRIPT_FUNCTIO
|
|||||||
{ "GetFramesRegisteredForEvent", &Script_GetFramesRegisteredForEvent },
|
{ "GetFramesRegisteredForEvent", &Script_GetFramesRegisteredForEvent },
|
||||||
{ "GetCurrentKeyBoardFocus", &Script_GetCurrentKeyBoardFocus },
|
{ "GetCurrentKeyBoardFocus", &Script_GetCurrentKeyBoardFocus },
|
||||||
};
|
};
|
||||||
|
|
||||||
|
void RegisterSimpleFrameScriptMethods() {
|
||||||
|
for (auto& func : s_ScriptFunctions) {
|
||||||
|
FrameScript_RegisterFunction(func.name, func.method);
|
||||||
|
}
|
||||||
|
|
||||||
|
// TODO
|
||||||
|
// CSimpleAnim::CreateScriptMetaTable();
|
||||||
|
// CSimpleTranslationAnim::CreateScriptMetaTable();
|
||||||
|
// CSimpleRotationAnim::CreateScriptMetaTable();
|
||||||
|
// CSimpleScaleAnim::CreateScriptMetaTable();
|
||||||
|
// CSimpleControlPoint::CreateScriptMetaTable();
|
||||||
|
// CSimplePathAnim::CreateScriptMetaTable();
|
||||||
|
// CSimpleAlphaAnim::CreateScriptMetaTable();
|
||||||
|
// CSimpleAnimGroup::CreateScriptMetaTable();
|
||||||
|
|
||||||
|
CSimpleFont::CreateScriptMetaTable();
|
||||||
|
CSimpleTexture::CreateScriptMetaTable();
|
||||||
|
CSimpleFontString::CreateScriptMetaTable();
|
||||||
|
CSimpleFrame::CreateScriptMetaTable();
|
||||||
|
CSimpleButton::CreateScriptMetaTable();
|
||||||
|
CSimpleCheckbox::CreateScriptMetaTable();
|
||||||
|
CSimpleEditBox::CreateScriptMetaTable();
|
||||||
|
CSimpleHTML::CreateScriptMetaTable();
|
||||||
|
|
||||||
|
// TODO
|
||||||
|
// CSimpleMessageFrame::CreateScriptMetaTable();
|
||||||
|
// CSimpleMessageScrollFrame::CreateScriptMetaTable();
|
||||||
|
|
||||||
|
CSimpleModel::CreateScriptMetaTable();
|
||||||
|
CSimpleModelFFX::CreateScriptMetaTable();
|
||||||
|
CSimpleScrollFrame::CreateScriptMetaTable();
|
||||||
|
CSimpleSlider::CreateScriptMetaTable();
|
||||||
|
|
||||||
|
// TODO
|
||||||
|
// CSimpleStatusBar::CreateScriptMetaTable();
|
||||||
|
// CSimpleColorSelect::CreateScriptMetaTable();
|
||||||
|
// CSimpleMovieFrame::CreateScriptMetaTable();
|
||||||
|
}
|
||||||
6
src/ui/simple/ScriptMethods.hpp
Normal file
6
src/ui/simple/ScriptMethods.hpp
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
#ifndef UI_SIMPLE_SCRIPT_METHODS_HPP
|
||||||
|
#define UI_SIMPLE_SCRIPT_METHODS_HPP
|
||||||
|
|
||||||
|
void RegisterSimpleFrameScriptMethods();
|
||||||
|
|
||||||
|
#endif
|
||||||
Loading…
Reference in New Issue
Block a user