void ui_scale(uint8_t scale) { if(SCALE == scale) { return; } SCALE = scale; list_scale(); panel_side.x = LIST_RIGHT; panel_add.y = LIST_Y; panel_settings.y = LIST_Y; panel_list.y = LIST_Y; panel_list.width = LIST_RIGHT + 1; panel_list.height = LIST_BOTTOM; messages_friend.panel.y = LIST_Y; messages_friend.panel.height = MESSAGES_BOTTOM; messages_friend.panel.width = -SCROLL_WIDTH; messages_group.panel.y = LIST_Y; messages_group.panel.height = MESSAGES_BOTTOM; messages_group.panel.width = -SCROLL_WIDTH; scroll_add.panel.y = LIST_Y; scroll_add.content_height = 200 * SCALE; scroll_settings.panel.y = LIST_Y; scroll_settings.content_height = 400 * SCALE; scroll_group.panel.y = LIST_Y; scroll_group.panel.height = MESSAGES_BOTTOM; scroll_friend.panel.y = LIST_Y; scroll_friend.panel.height = MESSAGES_BOTTOM; scroll_list.panel.y = LIST_Y; scroll_list.panel.width = LIST_RIGHT + 1; scroll_list.panel.height = LIST_BOTTOM; PANEL b_add = { .type = PANEL_BUTTON, .x = 0, .y = LIST_BOTTOM, .width = SCALE * 27, .height = -LIST_BOTTOM, },
void update_shown_list(void) { FRIEND *f; uint32_t i; // index in item array uint32_t j; // index in shown_list array for (i = j = 0; i < itemcount; i++) { ITEM *it = &item[i]; f = it->data; if(it->item != ITEM_FRIEND || ((!filter || f->online) && friend_matches_search_string(f, search_string))) { shown_list[j++] = i; } } showncount = j; list_scale(); }