Jump to content


Photo

Widget Progress

Posted by Josh Klint, 21 July 2016 · 293 views

I've added a textfield widget script to the beta branch, and a new build, for (Lua interpreter, Windows only, at this time).  The textfield widget allows editing of a single line of text.  It's actually one of the more difficult widgets to implement due to all the user interaction features.  Text is entered from the keyboard and may be selected with...


Photo

More Drawing Features

Posted by Josh Klint, 15 July 2016 · 288 views

I've added an optional radius for rectangle corners, for use with the DrawRect() command, along with a new gradient mode that uses a second color to draw a linear gradient on primitives.  I like the interface for the program Vue, and I am modeling my...


Photo

Don't Design Libraries Like This

Posted by Josh Klint, 14 July 2016 · 418 views

Just don't. Posted Image




Photo

DPI Drawing Issues Solved

Posted by Josh Klint, 12 July 2016 · 244 views

I've updated the beta branch (Lua on Windows only) with a new build that solves the DPI scaling issues I previously described.  Widget creation still works the same, using the same coordinate system regardless of GUI scale.  Widget scripts must use global coordinates in the drawing commands, which means calling Widget:GetPosition(true) and...


Photo

Idea Fell Apart

Posted by Josh Klint, 11 July 2016 · 330 views

At 100% scaling this image appears correctly:


At 200% scaling it falls apart.  The line points are in fact scaled correctly, but they are not surrounding the shape as intended:


So I think instead of converting the coordinate system back and forth between scaled and non-scaled coordinates, the...


Photo

DPI Scaling

Posted by Josh Klint, 11 July 2016 · 312 views

I've implemented DPI scaling into Leadwerks GUI (beta branch, Lua on Windows only).

To set the GUI scale you just call gui:SetScale(scalefactor).  A scale factor greater than one will make it bigger, a scale factor less than one will make it smaller.  There is no limit to the range you can set, but negative numbers are probably not good.

Scaling...


Photo

Leadwerks GUI

Posted by Josh Klint, 10 July 2016 · 299 views

Leadwerks GUI is now functioning, on the beta branch, Windows only, Lua interpreter only.



GUI Class
static GUI* Create(Context* context)
Creates a new GUI

Widget Class
static Widget* Create(const int x, const int y, const int width, const int height, Widget* parent, const int style=0)
Creates a new Widget. ...


Photo

Improved 2D Drawing Command Set

Posted by Josh Klint, 07 July 2016 · 462 views

To provide support for advanced GUI rendering, some of the features I implemented in the refactored window class are being brought into the 2D drawing command set.  This includes a lot of text rendering features like word wrap, multiline, horizontal and vertical centering, and viewport clipping.

A new text drawing function includes additional parameters...


Photo

Beta update available

Posted by Josh Klint, 06 July 2016 · 199 views

An update is available on the beta branch.  This adds the Window::Center style back into the new refactored Window class, and adds a missing header file in the Professional Edition.

If you'd like to try out a basic implementation of the new GUI, download and extract the attached scripts:


This code will create a GUI on the...


Photo

Beta branch update

Posted by Josh Klint, 05 July 2016 · 226 views

The beta branch on Steam is updated with a new build.  This uses the refactored Window class, on Windows and Linux.  The GUI and Widget class are also added, although they are highly experimental and still in development.  Both the engine and editor are using the refactored Window class, so please report any erroneous behavior your detect.

Leadwerks is now...






July 2016

S M T W T F S
     12
3456789
10111213141516
171819202122 23
24252627282930
31      

Search My Blog

Recent Entries

Recent Comments