/* * StatsNumCreate: Create numeric stat controls for given stats. */ void StatsNumCreate(list_type stats) { list_type l; int y, height; // Create graph controls for integer stats height = GetFontHeight(GetFont(FONT_STATS)) + STATUS_SPACING; y = StatsGetButtonBorder(); for (l = stats; l != NULL; l = l->next) { Statistic *s = (Statistic *) (l->data); s->y = y; s->cy = height; y += height; if (s->numeric.tag != STAT_INT) continue; s->hControl = CreateWindow(GraphCtlGetClassName(), NULL, WS_CHILD | GCS_LIMITBAR | GCS_NUMBER, 0, 0, 0, 0, hStats, NULL, hInst, NULL); StatsNumChangeStat(s); } stats_scrollbar_width = GetSystemMetrics(SM_CXVSCROLL); hStatsScroll = CreateWindow("scrollbar", NULL, WS_CHILD | SBS_VERT, 0, 0, 100, 100, /* Make sure scrollbar drawn ok */ hStats, NULL, hInst, NULL); top_stat = 0; // Set colors of graphs StatsChangeColor(); }
void InterfaceColorChanged(WORD color_id, COLORREF color) { InventoryChangeColor(); StatsChangeColor(); StatsMainChangeColor(); }