Page 1 of 1

hudCreator.lua - Create your own huds! [v1]

Posted: Thu Jan 26, 2023 8:29 am
by Marioman2007
Hi. It's me again, this time with a custom hud creation library.
If you wanna know how easy this makes creation of custom huds, the hud in the gif has 8 hudCreator.addElement calls and 3 custom drawing functions.

GIF:
Spoiler: show
Image
(Example included with download)

Features:
- Automatically draws the cross symbol and text (can be turned on/off).
- Option to draw a backdrop behind the element.
- Option to hide it when a player (or specified npc) is overlapping.
- Option to hide it when the players are not still.
- And many more customizable options!

Limitations:
- User has to provide their own code for splitscreen/multiplayer.

Special Thanks:
Hoeloe for helping me learn about glDraw and capture buffers.

Download:
https://drive.google.com/file/d/1a60MT_ ... sp=sharing

Enjoy and give credit if used!
Documentation given in [documentation].txt.

Re: hudCreator.lua - Create your own huds! [v1]

Posted: Thu Jan 26, 2023 8:06 pm
by MarioChallengerX2
Wow. This is utterly amazing! Finally, an easy way to make these!

(Note, might want to put that in your signature so others will use it more!)

Re: hudCreator.lua - Create your own huds! [v1]

Posted: Wed Aug 09, 2023 7:34 pm
by Mal8rk
Is there a way to make an element (coin-like counter) that uses anothercurrency currencies?

Re: hudCreator.lua - Create your own huds! [v1]

Posted: Wed Aug 09, 2023 10:19 pm
by Marioman2007
Mal8rk wrote:
Wed Aug 09, 2023 7:34 pm
Is there a way to make an element (coin-like counter) that uses anothercurrency currencies?

Code: Select all

hud.addElement("coins", {
    img           = Graphics.sprites.hardcoded["33-2"].img,
    font          = font,
    x             = 32,
    y             = 16,
    hideOverlap   = true,
    direction     = hud.DIR_LEFT,
    stillBehavior = true,
    getFunc       = function() return coinCounter:getMoney() end,
})
Here, coinCounter is your ac currency.

Re: hudCreator.lua - Create your own huds! [v1]

Posted: Thu Aug 10, 2023 7:35 pm
by Mal8rk
Marioman2007 wrote:
Wed Aug 09, 2023 10:19 pm
Mal8rk wrote:
Wed Aug 09, 2023 7:34 pm
Is there a way to make an element (coin-like counter) that uses anothercurrency currencies?

Code: Select all

hud.addElement("coins", {
    img           = Graphics.sprites.hardcoded["33-2"].img,
    font          = font,
    x             = 32,
    y             = 16,
    hideOverlap   = true,
    direction     = hud.DIR_LEFT,
    stillBehavior = true,
    getFunc       = function() return coinCounter:getMoney() end,
})
Here, coinCounter is your ac currency.
wait, I just found something. the library hides MDA Yoshi's star counter




Image

Re: hudCreator.lua - Create your own huds! [v1]

Posted: Mon Apr 08, 2024 4:36 am
by JoseMat2953
I'm just wanting to know how to make this work for my own project, if that's okay.

Re: hudCreator.lua - Create your own huds! [v1]

Posted: Mon Sep 23, 2024 7:01 am
by Snill
Image
Image

I have a problem instead of three star coins, for some reason it costs five, I wanted to see what would happen if I put five star coins and then removed 2 coins

Re: hudCreator.lua - Create your own huds! [v1]

Posted: Mon Sep 23, 2024 7:31 am
by dulushich_ViiU
Image

I have a problem instead of three star coins, for some reason it costs five, I wanted to see what would happen if I put five star coins and then removed 2 coins

Re: hudCreator.lua - Create your own huds! [v1]

Posted: Sun Mar 02, 2025 3:40 pm
by Shaktool
dulushich_ViiU wrote:
Mon Sep 23, 2024 7:31 am
Image

I have a problem instead of three star coins, for some reason it costs five, I wanted to see what would happen if I put five star coins and then removed 2 coins
funny how this was reposted by a different person (possibly an alt)