Some new helper functions, bug fixes, and debug draw
Emu 2 ended up not really being my main focus since I made that post a little while ago, but I’m still touching it up here and there where I (or other people) think something could use a change.
The biggest addition here is probably the Debug Draw, which lets you see the bounds of elements for debugging purposes. See the attached screenshot for what it looks like. To display it, pass a third argument to any Render
methods you call yourself, eg container.Render(x, y, true)
.
Another method that I’ve been using a lot of myself is EmuList::GetSelectedItem()
, which returns the currently-selected item (or undefined
) in a list. This saves you from having to write out
var index = list.GetSelection();
var data = array[index];
and allows you do condense that down into
var data = list.GetSelectedItem();
The documentation is starting to get rather out-of-date. I should probably take some time to run through that in the near future.
Changes since 1.1.0
Additions:
- All Render() methods now accept an option debug_draw argument, which draws a bounding box around each element’s, well, bounding box
- EmuList::ForEachSelection and ::GetAllSelectedIndices
- EmuList::FitToBox - allows you to specify a total width and height for the element, without having to predict the size given slot height and slot count
- EmuList::SetNumbered
- EmuList::GetSelectedItem - returns the value at the currently selected index, or undefined
- EmuList::At so you can get the selected entry without mucking around with the
entries
property - EmuInput::SetValueType and ::SetCharacterLimit
- EmuInput::SetStrictInput - will reject invalid input instead of showing a warning (I usually don’t do this)
- E_InputTypes.LETTERSDIGITS and LETTERSDIGITSANDUNDERSCORES
Bugs fixed:
- EmuCore only renders content elements if the element is enabled
- EmuList::Select will not select a value outside the range of its list
- EmuInput input can be processed with input elements set to Require Enter
Files
Get Emu - UI for GameMaker
Emu - UI for GameMaker
A Windows Forms-like graphical user interface library for GameMaker Studio 2.3
Status | Released |
Category | Tool |
Author | Dragonite |
Tags | GameMaker, User Interface (UI) |
More posts
- Code cleanup, some convenience functions, and misc tasks that I've been procrast...May 23, 2023
- Preview of Emu 2Apr 04, 2022
- Starting work on a major updateDec 31, 2021
- A few new features, minor bugs, and user questionsJul 03, 2021
- Another minor bug fixMay 24, 2021
- Update and bug fixesMar 13, 2021
- Updated Scribble (6.0.14a)Dec 18, 2020
- Fixed some bugs and made the code nicerOct 16, 2020
- Color values, more Sam puns, and related thingsSep 29, 2020
Leave a comment
Log in with itch.io to leave a comment.