Веб-сайт самохостера Lotigara

summaryrefslogtreecommitdiff
path: root/source/client
diff options
context:
space:
mode:
authorBottinator22 <59987380+Bottinator22@users.noreply.github.com>2024-12-18 18:09:19 -0800
committerGitHub <noreply@github.com>2024-12-18 18:09:19 -0800
commitb7aa4f6da681752eeba59750715baa01aa3654e0 (patch)
tree2e1b55e566fb438e139667bdf4314ba50acefbfa /source/client
parent226ff4e2788bb8f5c04eae629b777cf9b44112d7 (diff)
Add files via upload
Diffstat (limited to 'source/client')
-rw-r--r--source/client/StarRenderingLuaBindings.cpp21
-rw-r--r--source/client/StarRenderingLuaBindings.hpp13
2 files changed, 34 insertions, 0 deletions
diff --git a/source/client/StarRenderingLuaBindings.cpp b/source/client/StarRenderingLuaBindings.cpp
new file mode 100644
index 0000000..4c9e7a2
--- /dev/null
+++ b/source/client/StarRenderingLuaBindings.cpp
@@ -0,0 +1,21 @@
+#include "StarRenderingLuaBindings.hpp"
+#include "StarLuaConverters.hpp"
+#include "StarClientApplication.hpp"
+
+namespace Star {
+
+LuaCallbacks LuaBindings::makeRenderingCallbacks(ClientApplication* app) {
+ LuaCallbacks callbacks;
+
+ // if the last argument is defined and true, this change will also be saved to starbound.config and read on next game start, use for things such as an interface that does this
+ callbacks.registerCallbackWithSignature<void, String, bool, Maybe<bool>>("setPostProcessGroupEnabled", bind(mem_fn(&ClientApplication::setPostProcessGroupEnabled), app, _1, _2, _3));
+ callbacks.registerCallbackWithSignature<bool, String>("postProcessGroupEnabled", bind(mem_fn(&ClientApplication::postProcessGroupEnabled), app, _1));
+
+ // not entirely necessary (root.assetJson can achieve the same purpose) but may as well
+ callbacks.registerCallbackWithSignature<Json>("postProcessGroups", bind(mem_fn(&ClientApplication::postProcessGroups), app));
+
+ return callbacks;
+}
+
+
+}
diff --git a/source/client/StarRenderingLuaBindings.hpp b/source/client/StarRenderingLuaBindings.hpp
new file mode 100644
index 0000000..68e709f
--- /dev/null
+++ b/source/client/StarRenderingLuaBindings.hpp
@@ -0,0 +1,13 @@
+#pragma once
+
+#include "StarLua.hpp"
+
+namespace Star {
+
+STAR_CLASS(ClientApplication);
+
+namespace LuaBindings {
+ LuaCallbacks makeRenderingCallbacks(ClientApplication* app);
+}
+
+}