from dataclasses import dataclass from Options import PerGameCommonOptions, Toggle, Choice class ShuffleDoors(Toggle): """If enabled, most doors will open from receiving an item rather than fulfilling the in-game requirements.""" display_name = "Shuffle Doors" class VictoryCondition(Choice): """Victory condition.""" display_name = "Victory Condition" option_gray_ending = 0 option_purple_ending = 1 option_mint_ending = 2 option_black_ending = 3 option_blue_ending = 4 option_cyan_ending = 5 option_red_ending = 6 option_plum_ending = 7 option_orange_ending = 8 option_gold_ending = 9 option_yellow_ending = 10 option_green_ending = 11 option_white_ending = 12 @dataclass class Lingo2Options(PerGameCommonOptions): shuffle_doors: ShuffleDoors victory_condition: VictoryCondition d63661dd3374d5e54ec3ac1d'>this commit Autotracker for the Lingo Archipelago integration
about summary refs log blame commit diff stats
path: root/src/achievements_pane.cpp
blob: 8ec3727d4e0f33762753b9f3e8192ece9c832f2b (plain) (tree)
































                                                                          
#include "achievements_pane.h"

#include "ap_state.h"
#include "game_data.h"

AchievementsPane::AchievementsPane(wxWindow* parent)
    : wxListView(parent, wxID_ANY) {
  AppendColumn("Achievement");

  for (int panel_id : GD_GetAchievementPanels()) {
    achievement_names_.push_back(GD_GetPanel(panel_id).achievement_name);
  }

  std::sort(std::begin(achievement_names_), std::end(achievement_names_));

  for (int i = 0; i < achievement_names_.size(); i++) {
    InsertItem(i, achievement_names_.at(i));
  }

  SetColumnWidth(0, wxLIST_AUTOSIZE);

  UpdateIndicators();
}

void AchievementsPane::UpdateIndicators() {
  for (int i = 0; i < achievement_names_.size(); i++) {
    if (AP_HasAchievement(achievement_names_.at(i))) {
      SetItemTextColour(i, *wxBLACK);
    } else {
      SetItemTextColour(i, *wxRED);
    }
  }
}