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