Page 11 of 13

Re: Geyser UI Template

Posted: Sun Feb 22, 2015 1:09 am
by Akaya
Each echo to a label will overwrite the previous. So try sending everything at once. You can separate with a <br>...
Code: [show] | [select all] lua
GUI.Box1:echo("Hello World <br> Hello World again!")
a bit more advanced way...
Code: [show] | [select all] lua
local stuff_to_say = {
  "Hello World.",
  "Hey there bud.",
  "Get off my lawn!"
}
GUI.Box1:echo( table.concat( stuff_to_say, "<br>" ) )

Re: Geyser UI Template

Posted: Sun Feb 22, 2015 8:52 am
by darcor78
Thank you for the reply. I have tried to use this solution but it can't solve my problem... I need to send to box1 a chat channel or a spell activation...
I need to not overwite the phrases...

Re: Geyser UI Template

Posted: Tue Feb 24, 2015 7:52 pm
by Akaya
In that case you'll want a miniconsole instead of a label.

This will create a miniconsole that covers GUI.Box1
Code: [show] | [select all] lua
my_miniconsole = Geyser.MiniConsole:new({
  name = "my_miniconsole",
  x = 0, y = 0,
  width = "100%",
  height = "100%",
}, GUI.Box1 )
And this is how you send text to the miniconsole. You can do this as many times as you want and the text will not overwrite.
Code: [show] | [select all] lua
my_miniconsole:echo("Hello world!")
If you want to learn more, you can read all about it here: http://wiki.mudlet.org/w/Manual:Geyser# ... iniConsole

Re: Geyser UI Template

Posted: Wed Feb 25, 2015 9:58 am
by darcor78
Thank you very much!!! :D :D :D

Re: Geyser UI Template

Posted: Fri Feb 27, 2015 1:39 am
by Aaze
Okay, I went through this entire thing, and I still have no idea how to update my gauges. I have a script and everything, and it has successfully activated (first time without getting the little bug, hehe) but the gauges still don't work.
Code: [show] | [select all] lua
function getVitals()


currentHealth = gmcp.Char.Vitals.hp
maxHealth = gmcp.Char.Vitals.maxhp
currentMana = gmcp.Char.Vitals.mp
maxMana = gmcp.Char.Vitals.maxmp
currentEndurance = gmcp.Char.Vitals.ep
maxEndurance = gmcp.Char.Vitals.maxep
currentWillpower = gmcp.Char.Vitals.wp
maxWillpower = gmcp.Char.Vitals.maxwp


setGauge("GUI.Health",currentHealth,maxHealth,""..currentHealth.."/"..maxHealth.."")
setGauge("GUI.Mana",currentMana,maxMana,""..currentMana.."/"..maxMana.."")
setGauge("GUI.Endurance",currentEndurance,maxEndurance,""..currentEndurance.."/"..maxEndurance.."")
setGauge("GUI.Willpower",currentWillpower,maxWillpower,""..currentWillpower.."/"..maxWillpower.."")




end
Plus, I have 'gmcp.Char.Vitals' in the Registered Event Handler. Am I missing something?

Re: Geyser UI Template

Posted: Sat Feb 28, 2015 1:03 am
by Akaya
Is your script named getVitals ? The script name and function name must match for the event to work properly.

Re: Geyser UI Template

Posted: Sat Feb 28, 2015 6:35 am
by Aaze
Yea, it is.

I've heard talk of a trigger that you are supposed to have for these or something so it would update every prompt. Does my code require one, or what?

Re: Geyser UI Template

Posted: Sat Feb 28, 2015 6:59 am
by Akaya
Here's the object oriented way Geyser provides. Try replacing your setGauge functions with setValue like so:
Code: [show] | [select all] lua
GUI.Health:setValue( tonumber(currentHealth), tonumber(maxHealth) )

Re: Geyser UI Template

Posted: Mon Jun 20, 2016 11:34 pm
by Filion
How do you make the mapper clickable if you place it in box1?

Re: Geyser UI Template

Posted: Wed Jun 22, 2016 9:53 pm
by Akaya
The mapper doesn't seem to like when it is placed within a container, such as GUI.Box1. While it will still track and update your location, you will lose all mouse-based functionality. The only solution I've found is to give the exact x,y location of where you want the mapper placed and make sure it is called after the GUI is drawn so it is on the top-most layer.