Jump to content
  • entries
    3
  • comments
    29
  • views
    8,387

LED - A simple Leadwerks 2d drawing library updated


Lunarovich

2,346 views

 Share

As I make an infrastructure for a new LE project - a simple logic puzzler with cuboid manipulation and matching - I have to use context rendering for GUI. As is well known, LE offers only a basic drawing functionalities, some of which are broken btw.

 

To paliate the problem, I've written a simple 2D drawing library. The library offers such intuitive entities as text, rect, image and animation with accompanying methods such as SetPosition, SetRotation, SetScale, SetPivot (for rotation purposes), etc, as well as methods for testing mouse interaction and entities intersection. I've tried to make a lib API consistent with LE's interface.

 

In this updated, I've optimized Interaction and Intersection candidate qualification check, made an API more consistent, and rewritten few functions here and there smile.png

 

Here is a github repo.

 

To use a lib, just put an LED folder in LE Scripts folder and use the Main.lua file from the LED repo.

 

pcezWy1.png

  • Upvote 6
 Share

2 Comments


Recommended Comments

Guest
Add a comment...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...