+ draw terrains: try to improve the display of the fields,
+ try to avoid flikering in the text messages' zone
+ get items: correct the bottom button hide/show
This commit is contained in:
ALONSO Laurent
2021-11-03 09:49:47 +01:00
committed by Celtic Minstrel
parent ea8cb51c93
commit c709d6ec6f
6 changed files with 87 additions and 55 deletions

View File

@@ -385,13 +385,13 @@ static void put_item_graphics(cDialog& me, size_t& first_item_shown, short& curr
else me.addLabelFor(id," ", LABEL_LEFT, 7, true);
}
if (first_item_shown >= item_array.size())
first_item_shown=std::max(size_t(8),item_array.size())-8;
// darken arrows, as appropriate
if(first_item_shown == 0)
me["up"].hide();
else me["up"].show();
// ASAN undefined behaviour, ie. item_array.size can be less than 7
if(first_item_shown+7 > item_array.size() ||
item_array.size() <= 8)
if(first_item_shown+8 >= item_array.size())
me["down"].hide();
else me["down"].show();