samyeyo / LuaRT

Open source Windows programming framework for Lua
https://www.luart.org
Other
285 stars 17 forks source link

A Few Suggestions #84

Closed Dismalitie closed 1 year ago

Dismalitie commented 1 year ago

I have a few suggestions to make for LuaRT, that I think would be useful. And I understand that development is hard and not all these features may be implemented and I will be completely fine with your answer.

  1. WinAPI usage. Example: sys.WinApi(function, parameters)
  2. Being able to remove the window border. Example:
    
    require("ui")

local win = ui.Window("Borderless window example", 500, 500) win.style = "borderless"

repeat ui.update() until not win.visible


3. Set window colour mode. Example:
 ```lua
require("ui")

local win = ui.Window("Dark mode example", 500, 500)
win.colourMode = "dark"

repeat
     ui.update()
until not win.visible

This could also alter the colour of buttons and other elements / widgets.

  1. Being able to have smooth animations on widgets (this is possible with math.sin() and math.cos(), but it would be nice to have them built in). Example:
    
    require("ui")

local win = ui.Window("Button animations", 500, 500) local button = ui.Button(win, "Hover over me!", 250, 250) button.animation = "easeIn+easeOut"

function button:onHover() button:playAnimation() end

repeat ui.update() until not win.visible


5. Notifications. Example:
```lua
require("ui")

local notif = ui.Notification("Title", "Description", "icon\\path.ico")

function notif:onClick()
     ui.msg("You clicked on the notification!")
end

function notif:onDismiss()
     ui.msg("You dismissed the notification!")
end

function notif:onIgnore()
     ui.msg("The notification disappeared!"
end

notif:show()

Thank you for reading this! 👍

samyeyo commented 1 year ago

Hi Dismalitie,

Thank you for this feed back and those suggestions to enhance the uimodule. Here are some comments :

Regards,

Samir

Dismalitie commented 1 year ago

Thanks! I also have a question / error report: image What does this mean and how - if I can - do I fix it? It happened when I compiled one of my projects as a dynamic desktop application and ran it. I'm assuming it's something to do with the Lua DLL or a copile handler DLL that is used when compiling and running the application.

samyeyo commented 1 year ago

This error occurs because your compiled executable depends on lua54.dll that must be in the same folder. Just copy the lua54.dll from the \bin\ folder of your LuaRT installation in the same location as your astro.exe executable.