WohlSoft / LunaLua

LunaLua - LunaDLL with Lua, is a free extension mod for SMBX 1.3 game engine, core of the X2 project.
https://codehaus.moe/
GNU General Public License v3.0
33 stars 12 forks source link

Right clicking to paste things (Based on CMD) #55

Open SolaceEllery opened 1 year ago

SolaceEllery commented 1 year ago

Up for review today is a feature I randomly thought of less than a hour ago (I based it off how you paste things into the Command Prompt on Windows). So I decided to code it in and make a pull request before I implement this into the SEE Mod sometime!

You'll need to add the following to ffi_misc.lua after building: https://pastebin.com/agyEK7u0

Misc.enableRightClickPaste(boolean): When this is true, double clicking the right mouse when on the game window will paste the contents of the text, similar to using CTRL + V. The default option is false. This is useful for being an alternative way to paste content onto repl, or any other command-line-like tools coded for SMBX2. Misc.isRightClickPastingEnabled(): True if so, else it's false.

This may be a useless feature I coded in (imo), so if it doesn't get in it's fine.