View Single Post
Old 06-02-2018, 11:36 AM   #151
Lokasenna
Human being with feelings
 
Lokasenna's Avatar
 
Join Date: Sep 2008
Location: Calgary, AB, Canada
Posts: 6,239
Default

Changes

Note: I've removed all parameter documentation from the class files so that I only have to update one file (the Wiki) when there are changes. I'm working on a way to have documentation automatically copied into the class files when I upload it, so we'll see.

Core
  • New: Detect Reaper's "restricted permissions" mode and display an appropriate error message if scripts crash because they tried to access a restricted function.
  • New: Added GUI.error_message = "my error message" for including extra details in the crash reporter's printout.
  • New: Added GUI.mouse.off_x and .off_y, .r_off_x/y, .m_off_x/y to remember where the mouse was originally clicked in an element when dragging.
  • New: Added GUI.escape_bypass, boolean. Flag to keep Esc from closing the script window.
  • New: Added GUI.center(elm1, elm2). Returns x,y coordinates that would center elm1 within elm2. If elm2 isn't specified, will center elm1 in the script window.
  • New: GUI.table_find (return the first key matching a value)
  • New: GUI.table_invert (return a table with the keys and values swapped - some searches are easier this way).
  • New: OSX will use a slightly smaller size for all fonts.
  • Fix: GUI.quit wasn't working properly.
  • Fix: Replaced a call to os.time with reaper.time_precise so scripts will work in "restricted permission" mode.
  • Fix: GUI.table_compare was never actually returning True.
  • Fix: GUI.New wasn't properly giving error messages for invalid classes.

Button
  • New: Button captions should now support \n for multiline captions.

Frame
  • Fix: Shadows being drawn strangely.
  • Fix: Weird indenting behavior.

Knob
  • Updated GUI.triangle calls to reflect 'fill' now being a boolean argument.

Listbox
  • New: Listbox.cap_bg for the caption background, .bg is now the list background.

Menubar
  • New: Menus with a blank title ("") will act as a spacer.
  • Fix: Shadows being drawn strangely.
  • Fix: Changed how self.w is calculated and tracked.

Menubox
  • New: :val now returns two values: item number, item text.
  • Updated GUI.triangle calls to reflect 'fill' now being a boolean argument.

Options
  • New: Checklist:val will now return and accept a boolean value if # is only 1.
  • Fix: Checklist:val() wasn't always returning the full list.
  • Fix: Don't adjust options to make room for the caption if there isn't one.
  • Added a few error checks.

Tabs
  • New: .pad now defaults to 8.
  • New: 'opts' will now accept a table of tab names directly.
  • Fix: Reworked how self.w is calculated and tracked, for better consistency.
  • Fix: Won't throw an error if started with no z_sets; just lets the tabs do nothing.

Textbox
  • Fix: Make sure the box's highlight goes away if focus is lost programmatically.
  • Major tidying of selection, clipboard, and Ctrl+___ code.

TextEditor
  • New: TextEditor.cap_bg for the caption background, .bg is now the editor background.
  • Fix: ondrag was routing through onmousedown for no actual reason.
  • Fix: Issues with text window vs. scrollbar positioning.
  • Fix: Dragging on scrollbars would switch to moving the caret if you moved the mouse into the text area.
  • Blank scrollbars are now always shown.
  • Major tidying of selection, clipboard, and Ctrl+___ code.

Window
  • Initial release. Somewhat basic, but it appears to work.
Lokasenna is offline   Reply With Quote