Other SDK objects and parameters
screen object
Contains settings for working with the screen:
{
fullscreen: {
status: function(): "on"|"off",
request: function(): nil,
exit: function(): nil
},
orientation: {
get: function(): "portrait"|"landscape",
set: function(value: "portrait"|"landscape")
}
}
Alert
Yandex Games can automatically start in fullscreen mode, but many browsers prohibit switching modes without a user command.
Yandex Games already has a button in the upper-right corner for switching to full screen, so use the screen.fullscreen
object parameters to handle button clicks directly in the game.
clipboard object
Designed to write a string to the clipboard using the method ysdk.clipboard.write_text(text: string)
.
device_info object
Designed to retrieve information about the user's device using the ysdk.device_info()
method.
{
type: "mobile"|"desktop"|"tablet"|"tv",
isMobile: boolean,
isDesktop: boolean,
isTablet: boolean,
isTV: boolean,
}
Was the article helpful?
Previous
Next