mirror of
https://github.com/fabiangreffrath/woof.git
synced 2025-09-22 11:22:18 -04:00
align secret revealed widget relative to view center
This commit is contained in:
parent
fb488620b5
commit
ea85a6993d
@ -261,6 +261,10 @@ static int vert_align_widget(const hu_widget_t *const w, const hu_multiline_t *c
|
|||||||
{
|
{
|
||||||
return w->y;
|
return w->y;
|
||||||
}
|
}
|
||||||
|
else if (v_align == align_secret)
|
||||||
|
{
|
||||||
|
return MAX(SCREENHEIGHT - 32, scaledviewheight) / 2 - 32;
|
||||||
|
}
|
||||||
// [FG] centered and Vanilla widgets are always exclusive,
|
// [FG] centered and Vanilla widgets are always exclusive,
|
||||||
// i.e. they don't allow any other widget on the same line
|
// i.e. they don't allow any other widget on the same line
|
||||||
else if (h_align == align_center || m->exclusive)
|
else if (h_align == align_center || m->exclusive)
|
||||||
|
@ -68,6 +68,7 @@ typedef enum
|
|||||||
// [FG] v_align
|
// [FG] v_align
|
||||||
align_top,
|
align_top,
|
||||||
align_bottom,
|
align_bottom,
|
||||||
|
align_secret,
|
||||||
|
|
||||||
num_aligns,
|
num_aligns,
|
||||||
} align_t;
|
} align_t;
|
||||||
|
@ -2060,7 +2060,7 @@ static void HU_ParseHUD (void)
|
|||||||
HU_AddToWidgets(&w_title, hud, align_direct, align_bottom, 0, 0);
|
HU_AddToWidgets(&w_title, hud, align_direct, align_bottom, 0, 0);
|
||||||
HU_AddToWidgets(&w_message, hud, align_direct, align_top, 0, 0);
|
HU_AddToWidgets(&w_message, hud, align_direct, align_top, 0, 0);
|
||||||
HU_AddToWidgets(&w_chat, hud, align_direct, align_top, 0, 0);
|
HU_AddToWidgets(&w_chat, hud, align_direct, align_top, 0, 0);
|
||||||
HU_AddToWidgets(&w_secret , hud, align_center, align_direct, 0, (SCREENHEIGHT - ST_HEIGHT) / 4);
|
HU_AddToWidgets(&w_secret , hud, align_center, align_secret, 0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((lumpnum = W_CheckNumForName("WOOFHUD")) == -1)
|
if ((lumpnum = W_CheckNumForName("WOOFHUD")) == -1)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user