From d8710c9c252f49bf442590d47e8b79a9c1231ead Mon Sep 17 00:00:00 2001 From: LaG1924 Date: Sun, 20 Jun 2021 01:04:53 +0500 Subject: Added game menus --- src/Plugin.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src') diff --git a/src/Plugin.cpp b/src/Plugin.cpp index 776ba8d..f518957 100644 --- a/src/Plugin.cpp +++ b/src/Plugin.cpp @@ -95,6 +95,14 @@ namespace PluginApi { void Exit() { PUSH_EVENT("Exit", 0); } + + void Disconnect() { + PUSH_EVENT("Disconnect", std::string("Disconnected by user")); + } + + void SetStatePlaying() { + SetState(State::Playing); + } } int LoadFileRequire(lua_State* L) { @@ -235,6 +243,8 @@ void PluginSystem::Init() { apiTable["RegisterDimension"] = PluginApi::RegisterDimension; apiTable["ConnectToServer"] = PluginApi::ConnectToServer; apiTable["Exit"] = PluginApi::Exit; + apiTable["Disconnect"] = PluginApi::Disconnect; + apiTable["SetStatePlaying"] = PluginApi::SetStatePlaying; } lua_State* PluginSystem::GetLuaState() { -- cgit v1.2.3