Page 1 of 1

Panel button screens with text?

Posted: Fri Sep 21, 2018 2:57 am
by 017Bluefield
So I'm trying to make a screen for the player to select a storyline to follow. I'm aiming for it to look like a set of panels, kinda like in the ship UI in Warframe:
Not precisely, mind, but the alternative is a line of indistinguishable text that may or may not actually be seperate buttons. That's gonna confuse the player.

Here's the code I have so far for it:

Code: Select all

screen story_select():
    zorder 1

    frame:
        pass

    grid 3 2 style "story_select_menu":
        textbutton "Introduction" style "story_select_buttons":
            action NullAction()
        textbutton "\"1-2\"" style "story_select_buttons":
            action NullAction()
        textbutton "\"1-3\"" style "story_select_buttons":
            action NullAction()

        textbutton "{b}{i}Codex{/i}{/b}" style "story_select_buttons":
            action NullAction()
        textbutton "2-2" style "story_select_buttons":
            action NullAction()
        textbutton "{i}{b}Return{/b} to Main Menu{/i}" style "story_select_buttons":
            action NullAction()

style story_select_menu:
    font "fonts/SourceCodePro-Regular.ttf"
    align (0.5,0.5)
    xspacing 60
    yspacing 120

style story_select_buttons is story_select_menu:
    size 60

Re: Panel button screens with text?

Posted: Fri Sep 21, 2018 9:45 am
by Imperf3kt
Was there more to your question? I can't really tell if you're having difficulties, or just sharing something, or require help or ran into an error or something else.

Re: Panel button screens with text?

Posted: Fri Sep 21, 2018 9:05 pm
by 017Bluefield
I'm trying to get scaleable panel-style buttons, not textbuttons. I'm not sure if I need imagebutton or just button.

Re: Panel button screens with text?

Posted: Sat Sep 22, 2018 4:14 am
by Imperf3kt
You can achieve that with imagebuttons inside a vpgrid (or regular grid)
Or you can place frames in and style them and add a button.

I'd go with the first option, it's easier, but does add a few MB to your game.

Re: Panel button screens with text?

Posted: Sat Sep 22, 2018 4:47 am
by 017Bluefield
I'll try the first one first, then. But in the meantime, is there an "instruction manual" for Option #2?

Re: Panel button screens with text?

Posted: Sat Sep 22, 2018 5:58 pm
by Imperf3kt
There is a gui customisation guide somewhere in the cookbook. Its for the old GUI, but most of it still applies, with minor changes.
It might help, but as far as I am aware, no guide exists and its not something I have done myself.