iGauges, for simple image based gauges without too much hassle

Share your scripts and packages with other Mudlet users.
Post Reply
User avatar
demonnic
Posts: 576
Joined: Sat Dec 05, 2009 3:19 pm

iGauges, for simple image based gauges without too much hassle

Post by demonnic » Sun Jul 21, 2019 8:36 pm

First off, big thanks to Jamie W. (Delra) for putting the initial concept together. I just took what they gave me and made it follow the Geyser patterns and used some lesser known Geyser utilities to make it a bit more flexible.

So I made a thing. You can download it from HERE if you want to try it out. I've checked it into github as a muddler project, if you have any feature requests or find any bugs please file them HERE



I'll show you all the different types it has below. Right now it only does horizontal and left to right fill, but I intend to extend that in the future.

The 'default' gauge type is 'bar', but I include it here to show where you would change it on init:
Code: [show] | [select all] lua
testGauge = demonnic.iGauge:new({name = "testGauge", x=700, y=200, width = 100, height = 30, fillcolor = "purple", bartype = 'bar'})
Which gives you:
example1.png.jpg
example1.png.jpg (1.81 KiB) Viewed 3300 times
After that, you can do:
Code: [show] | [select all] lua
testGauge:update(35)
example2.png
example2.png (599 Bytes) Viewed 3300 times
Code: [show] | [select all] lua
testGauge:setType("chevron")
example3.png
example3.png (966 Bytes) Viewed 3300 times
Code: [show] | [select all] lua
testGauge:update(57, "<80,0,0>", "<60,60,60>")
example4.png
example4.png (1.05 KiB) Viewed 3300 times
Code: [show] | [select all] lua
testGauge:setType("curve")
example5.png
example5.png (1.37 KiB) Viewed 3300 times
Code: [show] | [select all] lua
testGauge:setType("heart")
example6.png
example6.png (1.23 KiB) Viewed 3300 times
Code: [show] | [select all] lua
testGauge:setType("slant")
example7.png
example7.png (1.07 KiB) Viewed 3300 times
Code: [show] | [select all] lua
testGauge:setType("alpha")
example8.png
example8.png (936 Bytes) Viewed 3300 times

Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 3 guests