megalanthusdefold-gamepush
megalanthus/defold-gamepush/gamepush.core.games_collections
GamePush games collections: open the games overlay and fetch a collection, with their events.
- GitHub: megalanthus/defold-gamepush — pinned to
v1.4.1- Pick a release from megalanthus/defold-gamepush releases and add its Source code (zip) URL (or a packaged
.zipasset, if the library ships one) togame.projectunder[project]dependencies, then Fetch Libraries in the Defold editor. - Run
bunx @defold-typescript/cli resolveto materialize its types. - Import it under a namespace alias of your choice:
import * as core_games_collections from "gamepush.core.games_collections"
- Pick a release from megalanthus/defold-gamepush releases and add its Source code (zip) URL (or a packaged
Functions
open(parameters?: Record<string, unknown>, callback?: () => void)
Opens the overlay with games.
Parameters
parameters?:Record<string, unknown>— The collection, for example{ tag: "ALL" }.callback?:() => void— Called once the overlay opens.
fetch(parameters?: Record<string, unknown>, callback?: (result: unknown) => void)
Fetches a games collection.
Parameters
parameters?:Record<string, unknown>— The collection, for example{ tag: "ALL" }.callback?:(result: unknown) => void— Receives the collection.
Variables
callbacks: GamesCollectionsCallbacks
The event handlers.
Types
GamesCollectionsCallbacks
GamesCollectionsCallbacks.open?: () => void
The games overlay opened.
GamesCollectionsCallbacks.close?: () => void
The games overlay closed.
GamesCollectionsCallbacks.fetch?: (result: unknown) => void
A games collection was fetched.
GamesCollectionsCallbacks.error_fetch?: (error: unknown) => void
Fetching a games collection failed.