How do I position HUD with Lunalua?

Post here for help and support regarding LunaLua and SMBX2's libraries and features.
KurttheKing
Dolphin
Dolphin
Posts: 80
Joined: Tue Mar 15, 2022 4:55 pm
Flair: Certified Nerd
Pronouns: He/Him
Contact:

How do I position HUD with Lunalua?

Postby KurttheKing » Tue Jul 19, 2022 5:18 pm

Locus wrote:
Mon May 17, 2021 7:03 am
Hi, I was wonder how I can change the x y coordinates of stuff in the hud, things like score text, timer text but also the visual details. How can I accomplish this?

Like Locus had asked previously (but seemingly never got a response to) is it possible to move the HUD with Lunalua? And if so, how?

Emral
Cute Yoshi Egg
Cute Yoshi Egg
Posts: 9723
Joined: Mon Jan 20, 2014 12:58 pm
Flair: Phoenix

Re: How do I position HUD with Lunalua?

Postby Emral » Tue Jul 19, 2022 7:44 pm

Check out hudoverride.lua for the variables that can be adjusted.
For example:

Code: Select all

local hudoverride = require("hudoverride")
hudoverride.visible.lives = false
hudoverride.offsets.hearts = {x = -300, 	y = 16, align = hudoverride.ALIGN_LEFT} -- X generally measured from the middle, y from the top

-- Add your own elements to the hud which respect Graphics.activateHud
local function myHudFunction(camIdx, priority, isSplit)
    Text.print("hi", 100, 100)
end
Graphics.addHUDElement(myHudFunction)
https://docs.codehaus.moe/#/reference/g ... -functions

KurttheKing
Dolphin
Dolphin
Posts: 80
Joined: Tue Mar 15, 2022 4:55 pm
Flair: Certified Nerd
Pronouns: He/Him
Contact:

Re: How do I position HUD with Lunalua?

Postby KurttheKing » Wed Jul 20, 2022 12:53 pm

Enjl wrote:
Tue Jul 19, 2022 7:44 pm
Check out hudoverride.lua for the variables that can be adjusted.
For example:

Code: Select all

local hudoverride = require("hudoverride")
hudoverride.visible.lives = false
hudoverride.offsets.hearts = {x = -300, 	y = 16, align = hudoverride.ALIGN_LEFT} -- X generally measured from the middle, y from the top

-- Add your own elements to the hud which respect Graphics.activateHud
local function myHudFunction(camIdx, priority, isSplit)
    Text.print("hi", 100, 100)
end
Graphics.addHUDElement(myHudFunction)
https://docs.codehaus.moe/#/reference/g ... -functions

Thanks!


Return to “LunaLua Help”

Who is online

Users browsing this forum: No registered users and 3 guests

SMWCentralTalkhausMario Fan Games GalaxyKafukaMarioWikiSMBXEquipoEstelari