Thanks, the documentation proved useful. I worked out a solution, its probably a bit confused but it works nicely for me so i thought other beginners might find it useful.
-- First make a container to put your guages and Hbox in. I used Hbox because I didnt really like how text displays in the gauge so added a Hbox to dump the text in.
Gcontainer = Geyser.Container:new({
name="Gcontainer",
x=50, y=50,
width=90, height=250,
})
-- Then make the Hbox, its really nice cause it just divided itself up equally so no thought required
StatsBox = Geyser.HBox:new({
name="StatsBox",
x=0, y=0,
width=90, height=50,
})
Gcontainer:add(StatsBox) -- Add the box to the container
StatsBox:move(0,200) -- and move it to the bottom below where the gauges will go
-- Create and add the Labels to the Hbox
StatsBoxHealthLabel = Geyser.Label:new({
name="StatsBoxHealthLabel",
format = "cbi", -- centre, bold, italics
},
StatsBox)
StatsBoxHealthLabel:setColor(100,10,10) -- red, green, blue
StatsBoxManaLabel = Geyser.Label:new({
name="StatsBoxManaLabel",
format = "cbi",
},
StatsBox)
StatsBoxManaLabel:setColor(10,100,10)
StatsBoxMovLabel = Geyser.Label:new({
name="StatsBoxMovLabel",
format = "cbi"
},
StatsBox)
StatsBoxMovLabel:setColor(10,10,100)
-- Now make the gauges
GGaugeHealth = Geyser.Gauge:new({
x=0, y=0,
width =30, height =200,
orientation = "vertical",
name = "GGaugeHealth",
format = "cbi",
})
GGaugemana = Geyser.Gauge:new({
x=30, y=0,
width =30, height =200,
orientation = "vertical",
name = "GGaugemana",
format = "cbi"
})
GGaugemov = Geyser.Gauge:new({
x=60, y=0,
width =30, height =200,
orientation = "vertical",
name = "GGaugemov",
format = "cbi"
})
-- Add them to the container
Gcontainer:add(GGaugeHealth)
Gcontainer:add(GGaugemana)
Gcontainer:add(GGaugemov)
-- Move the whole lot to where i wanted it. WindowHeight is a variable that contains the height off my main window
Gcontainer:move(660-90,WindowHeight-300)
-- Set the gauge colours (red, green, blue)
GGaugeHealth:setColor(150, 10, 10)
GGaugemana:setColor(10, 150, 10)
GGaugemov:setColor(10, 10, 150)
-- give the gauges some values, these are obtained from a trigger on the prompt
-- c is current health, mana, move
-- m is max health, mana, move
-- nil is no text on the gauge
-- it works out the maths for you, very handy
GGaugeHealth:setValue(chealth, mhealth,nil)
GGaugemana:setValue(cmana, mmana,nil)
GGaugemov:setValue(cmov, mmov,nil)
-- put the text in the Hbox labels, it understands HTML tags as well
StatsBoxHealthLabel:echo([[<font color="light_goldenrod"></font>]]..chealth..[[<br><br>]]..mhealth..[[<br>]].."HP")
StatsBoxManaLabel:echo([[<font color="light_goldenrod"></font>]]..cmana..[[<br><br>]]..mmana..[[<br>]].."MAN")
StatsBoxMovLabel:echo([[<font color="light_goldenrod"></font>]]..cmov..[[<br><br>]]..mmov..[[<br>]].."MOV")
Simple as that.