Windower / Fenestra

The open-source development version of Windower.
Other
19 stars 14 forks source link

Lua ui Feature Request: extend ui.draw #7

Open Saeyent opened 5 years ago

Saeyent commented 5 years ago

This is a request to extend the ui.draw library beyond rectangle.

Requested features to add: ui.draw.line = draw a line from screen coordinates (x1,y1) to (x2,y2) with formatting options ui.draw.polygon = draw a polygon given an input table of screen co-ords, with formatting options

Ideal formatting options for the polygon include: color = color of the polygon lines / fill fill = whether to fill the polygon's interior opacity = the opacity of the object as a percentage

Example of usage of ui.draw.polygon: Using 3D->2D conversion, draw a polygon on the ground that the player must stand on top of. While the player is not on the co-ordinates, show the polygon as orange with 100% opacity, when the player is on the polygon, show the polygon as blue with 10% opacity. This would be used to guide players to the correct places to stand for things like Sneak Attack or which place to stand for the weighted doors to open in quicksand caves.