(Zarch) Some refactors
This commit is contained in:
parent
240dc67e1b
commit
ada6fc9258
|
@ -551,19 +551,16 @@ static bool zarch_zui_tab(zui_t *zui, zui_tabbed_t *tab, const char *label, unsi
|
||||||
|
|
||||||
tab->prev_id = tab->active_id;
|
tab->prev_id = tab->active_id;
|
||||||
|
|
||||||
if (!tab->inited)
|
if (zui->item.active == id || tab->active_id == ~0 || !tab->inited)
|
||||||
{
|
|
||||||
tab->active_id = id;
|
|
||||||
tab->inited = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (zui->item.active == id || tab->active_id == ~0)
|
|
||||||
tab->active_id = id;
|
tab->active_id = id;
|
||||||
else if (id > tab->active_id)
|
else if (id > tab->active_id)
|
||||||
{
|
{
|
||||||
tab->next_id = id;
|
tab->next_id = id;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!tab->inited)
|
||||||
|
tab->inited = true;
|
||||||
|
|
||||||
if (tab->active_id == id || zui->item.active == id || zui->item.hot == id)
|
if (tab->active_id == id || zui->item.active == id || zui->item.hot == id)
|
||||||
bg = ZUI_BG_HILITE;
|
bg = ZUI_BG_HILITE;
|
||||||
else if (selected)
|
else if (selected)
|
||||||
|
|
Loading…
Reference in New Issue