ppizarror / pygame-menu

A menu for pygame. Simple, and easy to use
https://pygame-menu.readthedocs.io/
Other
555 stars 141 forks source link

Add ability to suppress warnings if Theme is intentionally all the same color #430

Closed eforgacs closed 1 year ago

eforgacs commented 1 year ago

Hello - I'm wondering if it might be possible to maybe add an optional keyword argument to suppress the theme warnings if the title font color being equal to the title background color is intentional. Right now my menu is black on black, which is an intentional design choice, but I still get the warning:

UserWarning: title font color (0, 0, 0) is equal to the title background color (0, 0, 0, 255), consider editing your Theme

Of course, my code still runs and everything works fine, but I'd like to have the option to disable that warning if possible. Thanks!

ppizarror commented 1 year ago

Hello! Sure, that is a nice addition. If you like, you can create a custom kwarg option, like verbose or something. I don't know which is the best approach. Maybe theme.disable_warnings() 🤔

El vie., 9 dic. 2022 23:59, Edward Forgacs @.***> escribió:

Hello - I'm wondering if it might be possible to maybe add an optional keyword argument to suppress the theme warnings if the title font color being equal to the title background color is intentional. Right now my menu is black on black, which is an intentional design choice, but I still get the warning:

UserWarning: title font color (0, 0, 0) is equal to the title background color (0, 0, 0, 255), consider editing your Theme

Of course, my code still runs and everything works fine, but I'd like to have the option to disable that warning if possible. Thanks!

— Reply to this email directly, view it on GitHub https://github.com/ppizarror/pygame-menu/issues/430, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADCTSSDZCGB5U26TOR3K7GTWMPWW7ANCNFSM6AAAAAASZ65UFY . You are receiving this because you are subscribed to this thread.Message ID: @.***>

eforgacs commented 1 year ago

Okay, sounds good. I'll give it a try and send out a pull request when it's ready.

eforgacs commented 1 year ago

Here it is: https://github.com/ppizarror/pygame-menu/pull/431

ppizarror commented 1 year ago

Merged!