Skip to content

GUI Refactor #325

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

Draft
wants to merge 57 commits into
base: main
Choose a base branch
from
Draft

GUI Refactor #325

wants to merge 57 commits into from

Conversation

cangzhang
Copy link
Owner

No description provided.

@cangzhang cangzhang changed the title introduce slint GUI Refactor Aug 24, 2024
- Changed rune image fields in `UiBufferRune` to store file paths instead of pixel buffers.
- Implemented logic to create a temporary directory for storing rune images.
- Updated image fetching to save images to the temporary directory and load them from there.
- Removed commented-out code related to displaying the third rune image in the UI.
- Updated `Cargo.lock` and `Cargo.toml` to use the latest dependencies, including `slint` and various other packages.
- Introduced a new `current_champion_runes` structure to manage and store runes associated with the currently selected champion.
- Enhanced the UI in `app.slint` to include a `ListView` for displaying runes, allowing users to apply runes directly from the interface.
- Modified the main application logic to handle rune selection and application, improving user experience.
- Changed the service URL in `web.rs` for fetching data, ensuring connectivity to the correct endpoint.
- Updated the rune application logic to use an asynchronous approach, allowing for better performance and responsiveness.
- Enhanced error logging for the rune application process to capture and report any issues encountered during execution.
- Refactored the closure for applying runes to improve clarity and maintainability.
- Commented out the "Random Champion Mode" button for future consideration.
- Enhanced the layout of the rune display in the ListView by adding borders and adjusting alignment.
- Organized the structure of the rune information display, including name, position, and images, for better visual clarity.
- Ensured consistent styling and spacing for a more polished user interface.
- Introduced asynchronous tasks for fetching rune images to improve performance and responsiveness.
- Added a mechanism to avoid duplicate processing of perk IDs using a HashSet.
- Enhanced error handling during image fetching to log failures appropriately.
- Ensured all fetch tasks complete before proceeding with further processing.
- Simplified the construction of the `rune_ids` vector for better readability.
- Removed unnecessary array initialization and streamlined the logic for selecting the champion ID.
- Enhanced clarity in the handling of the random champion mode by reducing nested conditions.
- Improved overall code maintainability and readability in the main function.
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