View Single Post
Old 05-14-2016, 10:45 AM   #34
Lokasenna
Human being with feelings
 
Lokasenna's Avatar
 
Join Date: Sep 2008
Location: Calgary, AB, Canada
Posts: 6,019
Default

6. Introducing the LS GUI library



Ta daaaaaaaa!!!!

The remainder of our lessons will make use of this handy-dandy GUI library I put together, rather than me having to write out fresh code for every example. Features include:

- A bare minimum of coding on the end-user's part. The GUI in that image only needed about 25 lines of code to create; the rest is all tucked away in a separate file for safekeeping.

- An excessive number of comments in the script, along with more spacing and indenting than a Tab button factory.

- Color and font presets for a consistent visual appearance.

Just grab these two files, put them in the same folder, and run the usage demo from Reaper. Don't worry about the library demo, it gets loaded automatically.

GUI Tutorial - LS GUI usage demo.lua
GUI Tutorial - LS GUI library demo.lua

Please note that this is intended only for use with this tutorial - it's sloppy, probably has a few bugs, and could definitely be more efficient about drawing things. I don't recommend using it in scripts intended for public use.

Update: I've since put together an actual version of this library for people to use in their own scripts. See here: http://forum.cockos.com/showthread.php?t=177772

Last edited by Lokasenna; 06-19-2017 at 03:46 PM.
Lokasenna is offline   Reply With Quote