inv align modes
This commit is contained in:
parent
39bc296d72
commit
c8e15de285
1
debian/changelog
vendored
1
debian/changelog
vendored
|
@ -1,6 +1,7 @@
|
|||
instead (1.2.0) unstable; urgency=low
|
||||
|
||||
* clearlooks theme;
|
||||
* inv align modes;
|
||||
* unpack/install feature;
|
||||
* browse feature (win32 and gtk);
|
||||
* clever game/themes sorting;
|
||||
|
|
|
@ -458,8 +458,8 @@ int game_apply_theme(void)
|
|||
|
||||
|
||||
if (inv_enabled()) {
|
||||
lay = txt_layout(game_theme.inv_font, (game_theme.inv_mode == INV_MODE_HORIZ)?
|
||||
ALIGN_CENTER:ALIGN_LEFT, game_theme.inv_w, game_theme.inv_h);
|
||||
lay = txt_layout(game_theme.inv_font, INV_ALIGN(game_theme.inv_mode),
|
||||
game_theme.inv_w, game_theme.inv_h);
|
||||
if (!lay)
|
||||
return -1;
|
||||
txt_layout_color(lay, game_theme.icol);
|
||||
|
@ -1534,7 +1534,7 @@ inv:
|
|||
|
||||
invstr = instead_cmd("inv"); instead_clear();
|
||||
|
||||
if (invstr && game_theme.inv_mode == INV_MODE_HORIZ)
|
||||
if (invstr && INV_MODE(game_theme.inv_mode) == INV_MODE_HORIZ)
|
||||
invstr = horiz_inv(invstr);
|
||||
|
||||
off = txt_box_off(el_box(el_inv));
|
||||
|
|
|
@ -20,12 +20,20 @@ static int parse_gfx_mode(const char *v, void *data)
|
|||
static int parse_inv_mode(const char *v, void *data)
|
||||
{
|
||||
int *i = (int *)data;
|
||||
if (!strcmp(v, "vertical") || !strcmp(v, "0"))
|
||||
*i = INV_MODE_VERT;
|
||||
else if (!strcmp(v, "horizontal") || !strcmp(v, "1"))
|
||||
*i = INV_MODE_HORIZ;
|
||||
if (!strcmp(v, "vertical") || !strcmp(v, "0") || !strcmp(v, "vertical-left"))
|
||||
*i = INV_MODE_VERT | INV_ALIGN_SET(ALIGN_LEFT);
|
||||
else if (!strcmp(v, "horizontal") || !strcmp(v, "1") || !strcmp(v, "horizontal-center"))
|
||||
*i = INV_MODE_HORIZ | INV_ALIGN_SET(ALIGN_CENTER);
|
||||
else if (!strcmp(v, "horizontal-left") || !strcmp(v, "1"))
|
||||
*i = INV_MODE_HORIZ | INV_ALIGN_SET(ALIGN_LEFT);
|
||||
else if (!strcmp(v, "horizontal-right") || !strcmp(v, "1"))
|
||||
*i = INV_MODE_HORIZ | INV_ALIGN_SET(ALIGN_RIGHT);
|
||||
else if (!strcmp(v, "disabled") || !strcmp(v, "-1"))
|
||||
*i = INV_MODE_DISABLED;
|
||||
else if (!strcmp(v, "vertical-right"))
|
||||
*i = INV_MODE_VERT | INV_ALIGN_SET(ALIGN_RIGHT);
|
||||
else if (!strcmp(v, "vertical-center"))
|
||||
*i = INV_MODE_VERT | INV_ALIGN_SET(ALIGN_CENTER);
|
||||
else
|
||||
return -1;
|
||||
return 0;
|
||||
|
@ -149,7 +157,7 @@ struct game_theme game_theme = {
|
|||
.menu_button_name = NULL,
|
||||
.menu_button = NULL,
|
||||
.gfx_mode = GFX_MODE_EMBEDDED,
|
||||
.inv_mode = INV_MODE_VERT,
|
||||
.inv_mode = INV_MODE_VERT | INV_ALIGN_SET(ALIGN_LEFT),
|
||||
.click_name = NULL,
|
||||
.click = NULL,
|
||||
.xoff = 0,
|
||||
|
|
|
@ -121,5 +121,8 @@ extern int theme_img_scale(img_t *p);
|
|||
#define INV_MODE_DISABLED -1
|
||||
#define INV_MODE_VERT 0
|
||||
#define INV_MODE_HORIZ 1
|
||||
#define INV_MODE(v) ((v)&0xff)
|
||||
#define INV_ALIGN(v) ((v)>>8)
|
||||
#define INV_ALIGN_SET(v) ((v)<<8)
|
||||
|
||||
#endif
|
||||
|
|
|
@ -39,7 +39,7 @@ inv.gfx.down = adown.png
|
|||
inv.col.fg = #606060
|
||||
inv.col.link = #000000
|
||||
inv.col.alink = #b02c00
|
||||
inv.mode = vertical
|
||||
inv.mode = vertical-right
|
||||
|
||||
menu.col.bg = #f0f0f0
|
||||
menu.col.fg = #000000
|
||||
|
|
Loading…
Reference in a new issue