Geyser/Window Layout Question
Geyser/Window Layout Question
Is Geyser or any of the other window layout-oriented stuff able to create a margin above the input area so that you can fit a label at the bottom of the screen without it covering pertinent information?
Re: Geyser/Window Layout Question
Yes. Use setBorderBottom() to give the margin above the command line. Then place your label appropriately.
Re: Geyser/Window Layout Question
Okay, another question. I'm having trouble with this:
Where my label is respecting background-color but not font-size. Any idea what the problem is?
Code: Select all
local prompt_container = Geyser.HBox:new({
name = "prompt_container",
x = "0", y = "-30",
width = "100%", height = "30",
})
local HP1 = Geyser.Label:new({
name = "HP1",
width = "30",
h_policy = Geyser.Fixed,
},
prompt_container)
HP1:echo("HP: ", "green", "c")
HP1:setStyleSheet([[
font-size: 20px;
background-color: black;
]])
Re: Geyser/Window Layout Question
Use the setFontSize() method available with Geyser or simply opt for a full Qt stylesheet.
Re: Geyser/Window Layout Question
I may be misunderstanding what you mean, but I tried setFontSize() on the container in question and it didn't seem to be inherited by the labels. It also didn't seem to be able to applied directly to the labels themselves. I'm also not quite sure what you mean by a full Qt stylesheet? Is there an alternative method to tacking a stylesheet onto a label?
Re: Geyser/Window Layout Question
setFontSize is used for miniconsoles. Not labels.
I personally style my label fonts within my echo's using tags like so:
I personally style my label fonts within my echo's using tags like so:
Re: Geyser/Window Layout Question
Thanks, that's really helpful!
One more question: Can you use a variable for a color in the <span> tag?
One more question: Can you use a variable for a color in the <span> tag?
Re: Geyser/Window Layout Question
How do you get a variable into a color tag?
My problem here is that the " " seem to be overriding the [[ ]], so HPcolor isn't being recognized as a variable but rather being eaten by the whole span tag. How do I fix this?
Code: Select all
HP:echo([[<span style="color:#]]..HPcolor..[[;font-size: 11pt">]]..currentHP..[[<span><span style="color:#FFFFFF;font-size: 11pt">/]]..maxHP..[[</span><span style="color:#]]..HPcolor..[[;font-size: 11pt"> ]]..percHP..[[%<span>]])
Re: Geyser/Window Layout Question
You're actually doing it correctly and it should work as is. The color highlighting isn't the greatest in this situation but I tested your snippet and it worked great.
Here's my own snippet in which your echo was successful...
Here's my own snippet in which your echo was successful...
I'd make sure that your doing this on a label and that your variables all have values.