Just a short dev log about the changes since the last mint post!
I had released mint a tad rushed so a number of smaller changes and fixes came along the way that I won't list here, the full change log is on the repo of course.
There were many bugs fixed, and many other important fixes, so give the updated demo a try:
There are lots of good changes, fixes and contributions from the community (thanks!) as well. Here's a short recap of some important ones, newest first:
children_at_pointfor a sorted list
windowfixed close handle being a label
texteditfixed/added alignment options
marginsadded fixed offset to the anchor layout
examplesadded an empty luxe testbed and an
libadded focus model, allowing user/platform specified focus handling
texteditadd/enable IME entry (+ in mint.render.luxe)
luxeadded color options to most controls
sliderjosuigoa added invert flag
display_charfor password type entry
libfixed usage of luxe types in mint core code
The canvas now has a scale factor on it. This allows easier handling on high dpi resolutions or if you want to render a canvas scaled up or down.
It's important to understand that the scale factor is only a state value, a hint, to the rendering backend. If the rendering backend ignores the scale factor there's not much the lib can do to help you. I implemented the scale factor for the luxe renderer so the demos now work well on high dpi devices. You can change the scale at will too (6 and 7 key in the demo):
To use this in luxe, remember that
Luxe.screen values are always in drawing surface size, the full pixel size. If displaying on a screen with a scale factor, the window size would be
Luxe.screen.w/Luxe.screen.device_pixel_ratio. That means to make your canvas work automatically on high DPI you can either scale the camera that you put the canvas into, or you can now set
canvas.scale to the
Luxe.screen.device_pixel_ratio value, and create it at the window size not the drawing surface size.
As always the demo does this now so you can look there for a current example.
In the repo, there was tools/editor folder that was destined to be a wireframe layout tool for quickly composing pieces of a UI. I needed to throw together some UI quickly while working on debugging the new luxe renderer, so I figured I would spend a few hours of down time pushing it forward.
Please treat everything about this tool, code and otherwise as changing, it is!
However, it is already usable, but lacks some obvious features like undo and nudging (and so much more). I do welcome contributions, but keep in mind that I have something specific in mind and have basically made what you see here in a few hours of effort, so there are likely going to be many changes to it while I use it over the next few days.
With that out the way:
The neat thing about making an editor to make UI is that after a short while it starts to serve itself. The UI in the editor is being loaded from the output it creates!
I'm glad to spend a bit of time making mint even better for games and tools for games, and I'm also glad I get to give you a taste of how I make tools and the UI choices I make. It's one of my favourite things to do, and I can't wait till the engine core is closer to stable to show some more.
Note I haven't updated the docs for mint in a while, I wanted to make a pass over the code and existing docs - but it's late here. I also have pushed the version to mint alpha-2.0 but there was no alpha 1.0 tag etc, I'll sort all that out soon.
Other note Regarding auto layout stuff, and the mint file format, I'll get to that soon, currently the editor exports json and will export mint format in the near future.See the first mint post for more on auto layout plans.