(2017-09-10, 01:51)foghat Wrote: I wonder how the Plex for Kodi add-on does it.
Aren't the busy indicators separate from the action being performed? Can't showing the fan art be tied to the action vs. the indicator? Since you know (I assume) if someone is selecting the 'play' action, can that not be what triggers showing the fan art up until the point the movie plays? And wouldn't the busy indicator just automatically show as required? Showing fan art, would probably only be applicable when using minimal loaders?
The addon probably calls a custom dialog when the play action is selected.
Skins don't have control over actions like that. Skins can define onclick / oninfo / onback actions BUT ONLY when these aren't already defined by Kodi. When it comes to a container with playable content then Kodi overrides the onclick action with whatever the user has chosen in the media settings for default select action (i.e. choose; play; resume; or show info). So what happens is that when a user clicks on something playable, if the default action is play then Kodi attempts to start playing the content. If the content needs to load then Kodi will make DialogBusy.xml visible. If the content is from an addon then Kodi will tell the addon to play the content -- this is when the plex addon would call its own custom busy dialog.
Its not like the skin receives the actions/clicks and then tells Kodi what to do. It is the other way around. Kodi receives the clicks and then decides what properties to set and what windows/dialogs to make visible etc. Only in cases where it doesn't have something specifically defined to do for that action will it check to see if the skin has defined an action.
Its the same reason why you will notice that when playing music/video, pressing back whilst on a widget will open the visualisation/video rather than return to the side menu. In this scenario the onback setfocus command that I have defined in the skin is overridden by Kodi with the fullscreen command.
All this is done to enforce that behaviours remain fairly consistent across skins and so that keymaps and user settings aren't overridden by skins.