What defines the size of menu elements?

Ask about ACS, DECORATE, ZScript, or any other scripting questions here!

Moderator: GZDoom Developers

Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.

Please bear in mind that the people helping you do not automatically know how much you know. You may be asked to upload your project file to look at. Don't be afraid to ask questions about what things mean, but also please be patient with the people trying to help you. (And helpers, please be patient with the person you're trying to help!)
Post Reply
User avatar
Vdude
Posts: 27
Joined: Fri Aug 16, 2013 8:44 pm

What defines the size of menu elements?

Post by Vdude »

Hello, everyone!

I'm confused about what defines the size of menu elements, like the title pic (M_DOOM), the background and the skull selector(M_SKULL1).
I'm experimenting with HD menu items and I can't find out why some of the items appear with the wrong size.

So, for example, in gzdoom.pk3/menudef.txt, I have:

Code: Select all

DEFAULTLISTMENU
{
	Font "BigFont", "Untranslated"
	IfGame(Doom, Chex)
	{
		Selector "M_SKULL1", -32, -5
		Linespacing 16
		Font "BigFont", "Red"
	}(...)
(where I'm guessing the -32, -5 are the position of the selector)

And in gzdoom.pk3/animdefs.txt, I have:

Code: Select all

// Doom menu cursor
texture optional M_SKULL1
pic M_SKULL1 tics 8
pic M_SKULL2 tics 8
(...)

So, in my "mod", I'm using an HD selector/cursor, with more than 2 frames of animation. If I use my own file names, for example:

Code: Select all

texture optional M_SKULL1
	pic mskull1 tics 2
	pic mskull2 tics 2
	pic mskull3 tics 2
	pic mskull4 tics 2
	pic mskull5 tics 2
In game, the cursor will appear very large, not properly resized.

If I use the exact name, of the two vanilla sprites (M_SKULL1 & M_SKULL2), only those first 2 frames will appear correctly resized, but the rest will always be bigger.

I'm trying to find where is that size defined, so I can apply the same to all frames, and make them all properly sized, but I can't seem to find it anywhere. The only references I have to the M_SKULL1 are in gzdoom.pk3/animdefs.txt or gzdoom.pk3/menudef.txt. What am I missing?

Hugs and thanks in advance :wink:
Blue Shadow
Posts: 5043
Joined: Sun Nov 14, 2010 12:59 am

Re: What defines the size of menu elements?

Post by Blue Shadow »

Use the [wiki]TEXTURES[/wiki] lump to apply scaling to graphics.
Vdude wrote:I'm trying to find where is that size defined, so I can apply the same to all frames, and make them all properly sized, but I can't seem to find it anywhere.
Those graphics come from the IWAD. So open it in SLADE and look them up.
Post Reply

Return to “Scripting”