Skip to content

Commit

Permalink
add explicit factory method for mobile ui
Browse files Browse the repository at this point in the history
  • Loading branch information
stonko1994 committed Oct 1, 2024
1 parent 0248c6a commit d1152b2
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions src/ts/uifactory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -634,6 +634,27 @@ export function superModerUI() {
);
}

export function buildSuperModernSmallScreenUI(player: PlayerAPI, config: UIConfig = {}): UIManager {
return new UIManager(
player,
[
{
ui: superModernMobileAdsUI(),
condition: (context: UIConditionContext) => {
return context.isAd && context.adRequiresUi;
},
},
{
ui: superModernMobileUI(),
condition: (context: UIConditionContext) => {
return !context.isAd && !context.adRequiresUi;
},
}
],
config,
);
}

export function buildModernCastReceiverUI(player: PlayerAPI, config: UIConfig = {}): UIManager {
return new UIManager(player, modernCastReceiverUI(), config);
}
Expand Down

0 comments on commit d1152b2

Please sign in to comment.