[PR #84] Refactor of ComboBox underlying types #957

Closed
opened 2026-01-29 16:24:30 +00:00 by claunia · 0 comments
Owner

Original Pull Request: https://github.com/SabreTools/MPF/pull/84

State: closed
Merged: Yes


This PR is aimed to solve how ComboBox were populated. The old approach used tuples to just wrap together values but without any semantic.

This has been refactored:

  • added KnownSystemCategory enum
  • added KnownSystem special marker values to split KnownSystems into categories
  • added KnownSystemComboBoxItem which can hold a KnownSystem or a KnownSystemCategory
  • rewrote system population function (and split the actual population for the UI only, with headers)
  • adjusted ComboBox bindings to use this new approach
  • added Drive class to store letter, volume label and isFloppy flag
  • adjusted drives ComboBox to use this new object
  • modified DumpEnvironment to use Drive instead that separated attributes
  • removed OrderedDictionary (not needed anymore and hopefully we won't need it again)

DICUI is now 100% KeyValuePair/Tuple free! :)

**Original Pull Request:** https://github.com/SabreTools/MPF/pull/84 **State:** closed **Merged:** Yes --- This PR is aimed to solve how ComboBox were populated. The old approach used tuples to just wrap together values but without any semantic. This has been refactored: - added `KnownSystemCategory` enum - added `KnownSystem` special marker values to split `KnownSystems` into categories - added `KnownSystemComboBoxItem` which can hold a `KnownSystem` or a `KnownSystemCategory` - rewrote system population function (and split the actual population for the UI only, with headers) - adjusted `ComboBox` bindings to use this new approach - added `Drive` class to store letter, volume label and `isFloppy` flag - adjusted drives `ComboBox` to use this new object - modified `DumpEnvironment` to use `Drive` instead that separated attributes - removed `OrderedDictionary` (not needed anymore and hopefully we won't need it again) DICUI is now 100% `KeyValuePair`/`Tuple` free! :)
claunia added the pull-request label 2026-01-29 16:24:31 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: SabreTools/MPF#957