self.values = [] for v in self.values_map: self.values.append(v) self.translation_map[_(v)] = v assert self.default in self.values else: self.values = self.values_map self.var_name = var_name self.label = label self.widget = widget self.variable = None # Tk variable self.current_value = None WizardPresets = WizSetting( values_map=list(presets.keys()), default='None', widget='preset', label=_('Initial setting:'), var_name='preset', ) GameName = WizSetting( values_map=(), default=_('My Game'), widget='entry', label=_('Name:'), var_name='name', ) SkillLevel = WizSetting( values_map=( (n_('Luck only'), GI.SL_LUCK),
self.values = [] for v in self.values_map: self.values.append(v) self.translation_map[_(v)] = v assert self.default in self.values else: self.values = self.values_map self.var_name = var_name self.label = label self.widget = widget self.variable = None # Tk variable self.current_value = None WizardPresets = WizSetting( values_map=list(presets.keys()), default='None', widget='preset', label=_('Initial setting:'), var_name='preset', ) GameName = WizSetting( values_map=(), default=_('My Game'), widget='entry', label=_('Name:'), var_name='name', ) SkillLevel = WizSetting( values_map=((n_('Luck only'), GI.SL_LUCK), (n_('Mostly luck'), GI.SL_MOSTLY_LUCK),