Page 36 of 391

Re: Ask a simple question, get a simple answer

Posted: Wed Dec 24, 2014 5:27 pm
by Drakkan
how many gifts I will find under the xmas tree this year ?

Re: Ask a simple question, get a simple answer

Posted: Wed Dec 24, 2014 5:47 pm
by minmay
Thorham wrote:How can I set the scale of a custom GUI? By default, elements like fonts always have the same size, regardless of the screen resolution. Any way to change this?
I don't think you can scale text, but there are two other things that are useful for that:
1. GraphicsContext.font() can change the typeface between "tiny", "small", "medium", and "large".
2. GraphicsContext.drawParagraph() can draw a string with a specific width, inserting newlines when necessary, and returns the width and height of the resulting text area.

Also, as far as I can tell, the size of GUI elements is determined only by screen height, not width. Width just affects their position.

Re: Ask a simple question, get a simple answer

Posted: Wed Dec 24, 2014 11:54 pm
by TheLastOrder
Question: Any idea about this:
beach_rock_wall_button_01 ????

Tried in editor, without results...
Looked for it in the forum. Nothing :?

Thanks as always, this is a great community ;)

Re: Ask a simple question, get a simple answer

Posted: Thu Dec 25, 2014 1:08 am
by Thorham
minmay wrote:I don't think you can scale text, but there are two other things that are useful for that:
1. GraphicsContext.font() can change the typeface between "tiny", "small", "medium", and "large".
2. GraphicsContext.drawParagraph() can draw a string with a specific width, inserting newlines when necessary, and returns the width and height of the resulting text area.
Yeah, I was afraid that might be the case. I wanted to change some part of the existing GUI, but it will never look right in all available resolutions now.

Re: Ask a simple question, get a simple answer

Posted: Thu Dec 25, 2014 1:15 am
by minmay
Thorham wrote:
minmay wrote:I don't think you can scale text, but there are two other things that are useful for that:
1. GraphicsContext.font() can change the typeface between "tiny", "small", "medium", and "large".
2. GraphicsContext.drawParagraph() can draw a string with a specific width, inserting newlines when necessary, and returns the width and height of the resulting text area.
Yeah, I was afraid that might be the case. I wanted to change some part of the existing GUI, but it will never look right in all available resolutions now.
You can always draw the characters manually with GraphicsContext.drawImage2().

Re: Ask a simple question, get a simple answer

Posted: Thu Dec 25, 2014 2:04 am
by Thorham
minmay wrote:You can always draw the characters manually with GraphicsContext.drawImage2().
Was afraid of that, too :mrgreen: Thanks anyway.

Any way to change the modifiers for spell and weapon damage that characters get from skills? If not, then I know a way around it, but it bloats the script code.

Re: Ask a simple question, get a simple answer

Posted: Thu Dec 25, 2014 12:00 pm
by kelly1111
Ok guys: Simple question; how do I make a new key item. Do I use define object or cloneObject?

Just want some more keys for my dungeon

Re: Ask a simple question, get a simple answer

Posted: Thu Dec 25, 2014 10:40 pm
by NutJob
Drakkan wrote:how many gifts I will find under the xmas tree this year ?
LOL! Simple enough. 1d4?

Re: Ask a simple question, get a simple answer

Posted: Fri Dec 26, 2014 2:53 pm
by Slade
Hey! If i use floor_trigger to get some "starting message" to point where you start, or anywhere so how i make it triggers only once? not everytime i go there. Thanks :) (btw im totally noob at lua but good designer ;) )

Re: Ask a simple question, get a simple answer

Posted: Fri Dec 26, 2014 5:50 pm
by minmay
Check the box that says "disableSelf".