Skip to content

Commit

Permalink
feat(lua): add equality operator for prosper.Window objects
Browse files Browse the repository at this point in the history
  • Loading branch information
Silverlan committed Mar 3, 2023
1 parent be93859 commit 3365a0a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions core/client/src/lua/c_lua_vulkan.cpp
Expand Up @@ -1764,6 +1764,8 @@ void ClientState::RegisterVulkanLuaInterface(Lua::Interface &lua)
prosperMod[defWindowCreateInfo];

auto defWindow = luabind::class_<prosper::Window>("Window");
defWindow.def(
"__eq", +[](prosper::Window &a, prosper::Window &b) -> bool { return &a == &b; });
defWindow.def(
"GetMonitorBounds", +[](prosper::Window &window) -> std::optional<std::tuple<Vector2, Vector2, Vector2, Vector2>> {
auto bounds = window->GetMonitorBounds();
Expand Down

0 comments on commit 3365a0a

Please sign in to comment.