MENUDEF- Positioning elements precisely.

Archive of the old editing forum
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
mustycheese
Posts: 4
Joined: Thu Jun 08, 2017 3:06 pm

MENUDEF- Positioning elements precisely.

Post by mustycheese »

In the process of creating a custom menu I found that positioning things precisely is rather difficult and I'm curious to how this behavior works.

For example in my experiment I placed a graphic "mtablenu" at (0,0) via the menudef lump thinking it would appear in the top left corner and instead it appeared originating at (32,128) as though there is some sort of automatic offset. I then tried setting the graphic to be at (-32,0) and it appeared almost halfway off the left side of the screen. Far more than 32 pixels to the left!

I read through the wiki carefully (I believe) but didn't notice any explanation of this behavior. Any insight would be appreciated. Also, I apologize in advance if I posted in the wrong section of the forum.
mustycheese
Posts: 4
Joined: Thu Jun 08, 2017 3:06 pm

Re: MENUDEF- Positioning elements precisely.

Post by mustycheese »

I probably should give more information about how I have "mtablenu" set up.
Slade is used as the primary editor, "mtablenu" has no addtional offset applied to the graphic lump. The lump's own origin is 0,0.

in MENUDEF:
staticpatch 0, 0, "mtablenu"
*without any prior "position" elements

in TEXTURES:
graphic "mtablenu", 176, 251 {
patch "mtablenu, 0, 0
xscale 3
yscale 3
}
*scaled to 3 or else it appears far too large.

Return to “Editing (Archive)”