private void OnBrowseClicked(object sender, RoutedEventArgs e) { if (ModelTypeService.ModelTypes == null) { return; } ActorViewModel?vm = this.DataContext as ActorViewModel; if (vm == null) { return; } ModelTypes?selected = null; foreach (ModelTypes modelType in ModelTypeService.ModelTypes) { if (modelType.Id == vm.ModelType) { selected = modelType; } } SelectorDrawer.Show <ModelTypeSelector, ModelTypes>("Model Type", selected, (v) => { vm.ModelType = v.Id; }); }
private void OnWeatherClicked(object sender, RoutedEventArgs e) { WeatherSelector selector = new WeatherSelector(); SelectorDrawer.Show(selector, this.TerritoryService.CurrentWeather, (w) => { this.TerritoryService.CurrentWeather = w; }); }
private void OnBrowseClicked(object sender, RoutedEventArgs e) { if (Module.ModelTypes == null) { return; } ModelTypes selected = null; foreach (ModelTypes modelType in Module.ModelTypes) { if (modelType.Id == this.ModelType) { selected = modelType; } } SelectorDrawer.Show <ModelTypeSelector, ModelTypes>("Model Type", selected, (v) => { this.ModelType = v.Id; }); }
private void OnLoadNpcClicked(object sender, RoutedEventArgs e) { SelectorDrawer.Show <NpcSelector, INpcResident>("Select NPC", null, (v) => { this.ApplyNpc(v.Appearance); }); }
public static void Show(string title, Item current, List <Item> options, Action <Item> changed) { GenericSelector selector = new GenericSelector(options); SelectorDrawer.Show <Item>(title, selector, current, changed); }