Page 1 of 1

How do I position HUD with Lunalua?

Posted: Tue Jul 19, 2022 5:18 pm
by KurttheKing
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?

Re: How do I position HUD with Lunalua?

Posted: Tue Jul 19, 2022 7:44 pm
by Emral
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

Re: How do I position HUD with Lunalua?

Posted: Wed Jul 20, 2022 12:53 pm
by KurttheKing
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!