[SOLVED] dialog box custom dimensions

Started by Stew, Sat 18/01/2014 13:05:18

Previous topic - Next topic

Stew

Hi, I'm new here.
I'm working on a short game and I want to use a text GUI for dialog options (not the black strip at the bottom of the screen). I created a text GUI, but it is always shown in the centre of the screen and it's not so wide too.

I'd like it was more wide and I'd like to translate it a bit down in the screen.
Is there a way to move the dialog option box and change its dimensions?

I read a lot of threads concerning dialog box, but I didn't understand how to do. I don't want to create a custom dialog system, I just want to adjust my text Gui size and position.

Thank you.

Stew

Khris

It sounds like you're using a TextWindowGUI as Dialog GUI. While that's possible, this GUI is sized according to the width and height of the content and always centered.
You need to use a standard GUI, and set that as Dialog GUI in general settings. The game will use the dimension and size set in the GUI editor.
You can also specify text placement by setting game.dialog_options_x/y in game_start.

If you need even more customization, you should look into rendering the Dialog GUI options yourself (as opposed to building your own dialog system).
That's in the help file, under Scripting -> Custom dialog options rendering

Stew

Yesss!
You're right! I used a textGui, not an ordinary Gui.
Now it works well.
Setting game.dialog_options_x and y properly, dialog options are placed in the right location in the Gui.
Thanks khris!

SMF spam blocked by CleanTalk