-
Notifications
You must be signed in to change notification settings - Fork 4
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
Add text color customization to Day, Date, Message, and Clock settings #33
Conversation
ui_message_message: false, | ||
ui_message_text: "THE MATRIX", | ||
ui_message_scale: 1, | ||
ui_message_positionX: 0, | ||
ui_message_positionY: 0, | ||
ui_message_textColor: '#FFFFFF', // New option for message text color | ||
ui_day_textColor: '#FFFF00', // Default text color | ||
ui_day_preserveColor: false, // New option for preserving text color |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was a correct choice to add a checkbox for applying the static color 👍
- renamed the
ui_day_preserveColor
toui_day_highlight
- add the same property for "date", "clock" and "message" individually.
} else | ||
Log("Preset URl is not correct."); | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks like you have accidentally removed button functionalities.
bring them back plz 🥺
updateMask(); | ||
} | ||
}); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also revert these lines.
the position doesn't have anything to do with the color properties.
if (!options.ui_day_preserveColor) { | ||
updateMask(); | ||
} | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also revert these lines.
the logic is this: updateMask()
should be called whenever there is a property change in any of the properties that must be rendered inside the mask layer.
so these property changes must UNCONDITIONALLY do updateMask()
updateMask(); | ||
} | ||
}); | ||
dayFolder.add(options, "ui_day_preserveColor").name("Preserve Day Color").onChange(updateMask); // New option |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
absolutely correct 👍
remove the comment thou
// } | ||
|
||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove commented lines
Description:
This PR introduces the ability to customize text color for the Day, Date, Message, and Clock settings in the GUI. The following changes have been made:
Issue: #32
New Options Added:
->ui_day_textColor: Custom text color for the Day setting.
->ui_date_textColor: Custom text color for the Date setting.
->ui_message_textColor: Custom text color for the Message setting.
->ui_clock_textColor: Custom text color for the Clock setting.
GUI Updates:
-> Day Section: Added a color picker for textColor and conditional logic to only call updateMask when ui_day_preserveColor is not checked.
-> Date Section: Added a color picker for textColor and conditional logic to only call updateMask when ui_day_preserveColor is not checked.
-> Message Section: Added a color picker for textColor and conditional logic to only call updateMask when ui_day_preserveColor is not checked.
-> Clock Section: Added a color picker for textColor and conditional logic to only call updateMask when ui_day_preserveColor is not checked.
Preserve Color Option:
Introduced ui_day_preserveColor option across all sections to control whether the updateMask function should be triggered based on color preservation state.
Testing:
1)Verify Text Color Changes:
->Navigate to the Day, Date, Message, and Clock settings in the GUI.
->Use the color picker to change the text color and ensure the updates are reflected in the UI when Preserve Day Color is unchecked.
->Check the behavior when Preserve Day Color is checked to ensure the color does not change and updateMask is not triggered.
2)Position and Scale Adjustments:
->Test the position and scale sliders in each section to ensure they work correctly and trigger updateMask appropriately based on the Preserve Day Color state.
3)General Functionality:
->Ensure all other functionalities remain unaffected by the new changes.
Notes:
->The PR aims to enhance user customization capabilities, improving the overall user experience.
->Please review the conditional logic for updateMask to confirm it aligns with the desired behavior when Preserve Day Color is checked or unchecked.
Thank you for reviewing this PR. Looking forward to your feedback.