Page 1 of 1

Using a picture as a class name

Posted: Tue May 03, 2022 8:38 pm
by JossTheFox
Hello again!
I'm making a few custom classes for a project I've been working on, and I was wondering if you could set an image to be used in the class selection screen as the class name, similar to what you can do with the main menu options and the level names.
The reason I'm asking this is because I'd like to have the classes be color-coded in a sense. For example, class one would be associated with purple, class two would be red, class three would be green. I'd like to have a rainbow class too, but I don't know if that one is possible. The picture solution was the only one I could think of, but if anyone else has a better solution I'd love to hear it.
So...is what I'm asking even possible?

Re: Using a picture as a class name

Posted: Wed May 04, 2022 9:19 am
by m8f
Maybe you can color your classes with escape codes: https://zdoom.org/wiki/Print#Colors ?

Re: Using a picture as a class name

Posted: Sun May 08, 2022 5:36 am
by JossTheFox
That doesn't work, text codes don't work in the menus.

Re: Using a picture as a class name

Posted: Sun May 08, 2022 6:41 am
by m8f
Do you specify text strings in MENUDEF itself or in LANGUAGE lump?

When it's in LANGUAGE, it works for me (see icon near Gearbox entry):

[imgur]https://imgur.com/U1awCXY[/imgur]

LANGUAGE:

Code: Select all

[enu default]

GB_OPTIONS = "\ch⚙\c- Gearbox Options";


MENUDEF:

Code: Select all

AddOptionMenu OptionsMenu       { Submenu "$GB_OPTIONS", gb_Options }

Re: Using a picture as a class name

Posted: Sun May 08, 2022 6:46 am
by JossTheFox
Oh, we're talking about completely different menus.
I'm talking about the class selection screen, the one that appears when you start a new game with more than one player class.

Re: Using a picture as a class name

Posted: Sun May 08, 2022 7:05 am
by m8f
Nonetheless, if you define your strings in LANGUAGE (and use them from your ZScript/Decorate player class definitions), will it work?

Re: Using a picture as a class name

Posted: Sun May 08, 2022 7:11 am
by JossTheFox
Ohh my God I am a huge idiot.
The name isn't defined in LANGUAGE, I currently just put it in the decorate lump itself. I'll change that the next time I get the chance to and see if it works. (I'd do it right now, but I have to share a computer with my brother rn)

Re: Using a picture as a class name

Posted: Thu May 12, 2022 12:48 am
by JossTheFox
I completely forgot to update this, geez.
Defining the name in LANGUAGE with the text code works! Thanks :3