public HUDViewModel() { SelectedIndex = -1; Items = new HUDItemCollection(); TextBox = new LowLevelTextBoxViewModel(); CustomFilter = new DefaultFilter(); }
public void Initialize() { SelectedIndex = -1; DispatcherHelper.UIDispatcher.Invoke(() => Items = new HUDItemCollection()); TextBox.Initialize(); CustomFilter = new DefaultFilter(); CoordinateOrigin = new CoordinateOrigin(); RaisePropertyChanged(nameof(CoordinateOrigin)); ItemsCountPerPage = UIAssistantAPI.Instance.UIAssistantSettings.ItemsCountPerPage; }
public void Filter(ICollection <IHUDItem> items, string input) { var clonedItems = new HUDItemCollection(items); Items = new HUDItemCollection(CustomFilter.Filter(clonedItems, input)); }
public void Update() { RaisePropertyChanged(nameof(BoundsList)); Items = new HUDItemCollection(Items.OrderBy(x => x.Bounds.X)); }