-
-
Notifications
You must be signed in to change notification settings - Fork 492
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
Color Clipboard #3100
base: master
Are you sure you want to change the base?
Color Clipboard #3100
Conversation
What is this? Please describe this feature in the pr description. |
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.
Does this copy to an in-game clipboard or the system clipboard? This feature might be confusing for users who want to copy/paste a color to outside of supertux.
You could parse a hex color value from the system clipboard which in my opinion would provide a better experience.
You can use SDL's clipboard functionality to do this.
I can do that, sure. I'm still gonna keep the current in game functionality, but I'm gonna also add parsing it from the clipboard upon clicking the paste entry. |
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.
Nice work
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.
Only reviewed code for now.
[ci skip]
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.
Looking good code-wise.
Co-authored-by: Marty <[email protected]>
@@ -22,7 +22,7 @@ | |||
class ItemAction final : public MenuItem | |||
{ | |||
public: | |||
ItemAction(const std::string& text, int id = -1, std::function<void()> callback = {}); | |||
ItemAction(const std::string& text, int id = -1, std::function<void()> callback = {}, const Color& text_color = Color(1.f, 1.f, 1.f)); |
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.
Don't we have a Color::WHITE constant somewhere?
This PR adds three new options to the Color Menu:
These options enable users to copy and paste colors between objects with the color menu via the SDL's clipboard feature.