Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] UI rewrite, code cleanup #188

Open
wants to merge 56 commits into
base: master
Choose a base branch
from
Open

[WIP] UI rewrite, code cleanup #188

wants to merge 56 commits into from

Conversation

BocuD
Copy link

@BocuD BocuD commented Dec 31, 2024

I'm currently working on slowly refactoring and cleaning up the UI code, currently focussing on the configuration menus. I'm opening the PR to open discussion about the topic, as this is not ready to be merged yet (though it should be identical functionality wise to the current release)
The goal is to later on be able to add and change various features building on top of new / improved UI code, but i want to limit this PR to cleaning up and improving code, without making any feature changes for now.
I realize that getting this merged at some point is a tough ask, but i am still making the PR as I want to put in some time and work on this codebase, and i feel like doing so is a better approach than "another fork".

What has been done so far:

  • Refactored a lot of code in CActConfigList to remove the large tPressEnter method body, which was entirely comprised of if/else statements based on the currently selected button. This functionality is now achieved using an Action instead.
  • Fixed an issue causing DTXCreator to not compile depending on compiler settings (removed half width katakana delegate names)
  • Add a few missing translations so all non localized versions of methods can be removed fully
  • Cleaned up unused and legacy constructors in CItemBase and inherited classes
  • Switch log output to Unicode
  • Use system language instead of system locale to determine display language
  • Add methods for BindConfig() to CItemBase, which can be used to map methods to save and load data
  • Removed a lot of the code from tRecordToConfigIni and tUpdateDisplayValuesFromConfigIni by moving the implementation to each element (using BindConfig())
  • Change version display and
  • Split up CActConfigList into a partial class
  • Remove unused Option stage
  • Create a new UI system based on a hierarchical system:
    • UI elements are drawn as part of groups
    • Groups can contain more elements
    • Elements can be toggled
    • Elements are drawn relative to their parent
    • Elements are transformed, rotated and scaled using matrices (also relative to parent)
  • Documentation in various places; adding english documentation
  • Renaming a lot of japanese variable names to be more concise and in english
  • Rework quick config and sort menu to use new UI system
  • Remove some smaller unused older classes such as CDTXVersion and Folder
  • Remove plugin system (as far as i am aware this is not actually used anywhere by anything or anyone, if this isn't the case reverting this commit should be easy)

BocuD added 27 commits December 31, 2024 04:28
Log files, unlike config files, aren't something we need to read old versions from. Therefore, moving over to Unicode doesn't come with any drawbacks for these.
This also moves the currently set language source to a single location, which should allow future runtime language configuration independent of the OS language option.
CultureInfo.CurrentUILanguage more accurately represents the currently used language, as it is set by the system language rather than the system locale. Some english players might be using Japanese system locale to help render japanese fonts in older games, but still have their display language set to english. This will make DTXMania also run in english for them.
…nd writing

This is an initial step to allow refactoring this class into smaller files, in the future the configuration should be rewritten to use an attribute system, or something similar
BocuD added 4 commits January 5, 2025 02:44
This is the first step of moving over the new UI system to draw elements using matrices instead of 2D translations, offsets, etc
This will allow more complex grouping and animations later on
@BocuD BocuD changed the title [WIP] UI refactoring work [WIP] UI rewrite, code cleanup Jan 5, 2025
BocuD added 23 commits January 7, 2025 06:57
Future updates will only need to change this number to make a build. In game version and build numbers are derived from this.
This simplifies code in a lot of places and makes it easier to move code over to a new format. Aside from this, it seems to not have been used by anyone in a long time, and is not maintained at all.
It seems to not be used anywhere anymore, and was seemingly only used in a few places in the plugin system
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant