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
[gui] new infobool Window.Is() #8985
Conversation
as this is a way to detect the surrounding context, wouldn't it make sense to also name it "context" in some way? If you decouple it from a specific window ID, AFAIK also add-ons could define a certain context and the dialogs would work in same way. Just a thought. |
could you please explain what you want to achieve? |
if you use window IDs as "context" there is no way to trigger the same context from anywhere else, like from add-ons. Just imagine a music add-on wanting to mimic library features - would it be possible for the add-on to fire this dialog and have the same layout/context applied if you use window IDs? Just trying to make this more generic and not bound to a fixed window structure. Please note that I'm in no way objecting it - only wanted to share my view of how it could be made more flexible. |
@@ -3163,6 +3164,15 @@ bool CGUIInfoManager::GetMultiInfoBool(const GUIInfo &info, int contextWindow, c | |||
bReturn = true; | |||
} | |||
break; | |||
case WINDOW_IS: | |||
if (info.GetData1()) { |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
@da-anda sure makes sense but not at the current state. for now it should be possible to check if a condition should be applied for a specific window which shares the same skin file. |
@Montellese thanks for the review. will address the formatting issues. any other objections? |
@xhaggi did you have any time to tackle this? |
sure will do it next week |
9a141c5
to
f757ab1
Compare
@razzeee updated |
jenkins build and merge |
[gui] new infobool Window.Is()
After we merged different skin xml's and use it by more than one window/dialog it should be possible to check if the window context is equal to a given window id. This PR introduce a new boolean window condition
Window.Is(windowid)
. This boolean condition makes only sense in shared xml's likeDialogMusicInfo.xml
etc.Examples
songinformation
.songinformation
if dialogmusicinformation
is active.@phil65 @razzeee @Montellese mind taking a look.