Mercurial > games > semicongine
diff semiconginev2/rendering.nim @ 1256:bfb75c934f4e
add: window focus handling, improve window api a bit
author | sam <sam@basx.dev> |
---|---|
date | Sun, 28 Jul 2024 17:33:41 +0700 |
parents | c4f98eb4bb05 |
children | e9b8d87b9883 |
line wrap: on
line diff
--- a/semiconginev2/rendering.nim Sun Jul 28 00:17:34 2024 +0700 +++ b/semiconginev2/rendering.nim Sun Jul 28 17:33:41 2024 +0700 @@ -331,13 +331,12 @@ vkDestroyDebugUtilsMessengerEXT(vulkan.instance, vulkan.debugMessenger, nil) vkDestroyInstance(vulkan.instance, nil) -proc ShowSystemCursor*() = vulkan.window.ShowSystemCursor() -proc HideSystemCursor*() = vulkan.window.HideSystemCursor() +proc ShowSystemCursor*(value: bool) = vulkan.window.ShowSystemCursor(value) proc Fullscreen*(): bool = fullscreen -proc `Fullscreen=`*(enable: bool) = +proc SetFullscreen*(enable: bool) = if enable != fullscreen: fullscreen = enable - vulkan.window.Fullscreen(fullscreen) + vulkan.window.SetFullscreen(fullscreen) proc GetAspectRatio*(): float32 = assert vulkan.swapchain != nil, "Swapchain has not been initialized yet"