|
|
@ -332,9 +332,9 @@ DEFINE_GET_FOCUS_STRING_HANDLER(layer_military)
|
|
|
|
focus += "/" + enum_item_key(screen->page);
|
|
|
|
focus += "/" + enum_item_key(screen->page);
|
|
|
|
|
|
|
|
|
|
|
|
int cur_list;
|
|
|
|
int cur_list;
|
|
|
|
if (list1->bright) cur_list = 0;
|
|
|
|
if (list1->active) cur_list = 0;
|
|
|
|
else if (list2->bright) cur_list = 1;
|
|
|
|
else if (list2->active) cur_list = 1;
|
|
|
|
else if (list3->bright) cur_list = 2;
|
|
|
|
else if (list3->active) cur_list = 2;
|
|
|
|
else return;
|
|
|
|
else return;
|
|
|
|
|
|
|
|
|
|
|
|
switch (screen->page)
|
|
|
|
switch (screen->page)
|
|
|
@ -420,7 +420,7 @@ DEFINE_GET_FOCUS_STRING_HANDLER(layer_assigntrade)
|
|
|
|
if (unsigned(list_idx) >= num_lists)
|
|
|
|
if (unsigned(list_idx) >= num_lists)
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
|
|
if (list1->bright)
|
|
|
|
if (list1->active)
|
|
|
|
focus += "/Groups";
|
|
|
|
focus += "/Groups";
|
|
|
|
else
|
|
|
|
else
|
|
|
|
focus += "/Items";
|
|
|
|
focus += "/Items";
|
|
|
@ -458,10 +458,10 @@ DEFINE_GET_FOCUS_STRING_HANDLER(layer_stockpile)
|
|
|
|
|
|
|
|
|
|
|
|
focus += "/On";
|
|
|
|
focus += "/On";
|
|
|
|
|
|
|
|
|
|
|
|
if (list2->bright || list3->bright || screen->list_ids.empty()) {
|
|
|
|
if (list2->active || list3->active || screen->list_ids.empty()) {
|
|
|
|
focus += "/" + enum_item_key(screen->cur_list);
|
|
|
|
focus += "/" + enum_item_key(screen->cur_list);
|
|
|
|
|
|
|
|
|
|
|
|
if (list3->bright)
|
|
|
|
if (list3->active)
|
|
|
|
focus += (screen->item_names.empty() ? "/None" : "/Item");
|
|
|
|
focus += (screen->item_names.empty() ? "/None" : "/Item");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -844,7 +844,7 @@ static df::item *getAnyItem(df::viewscreen *top)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
auto list1 = getLayerList(screen, 0);
|
|
|
|
auto list1 = getLayerList(screen, 0);
|
|
|
|
auto list2 = getLayerList(screen, 1);
|
|
|
|
auto list2 = getLayerList(screen, 1);
|
|
|
|
if (!list1 || !list2 || !list2->bright)
|
|
|
|
if (!list1 || !list2 || !list2->active)
|
|
|
|
return NULL;
|
|
|
|
return NULL;
|
|
|
|
|
|
|
|
|
|
|
|
int list_idx = vector_get(screen->visible_lists, list1->cursor, (int16_t)-1);
|
|
|
|
int list_idx = vector_get(screen->visible_lists, list1->cursor, (int16_t)-1);
|
|
|
|