Other SDK objects and parameters
screen object
Contains settings for working with the screen:
1{
2 fullscreen: {
3 status: function(): "on"|"off",
4 request: function(): nil,
5 exit: function(): nil
6 },
7 orientation: {
8 get: function(): "portrait"|"landscape",
9 set: function(value: "portrait"|"landscape")
10 }
11}
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.
1{
2 type: "mobile"|"desktop"|"tablet"|"tv",
3 isMobile: boolean,
4 isDesktop: boolean,
5 isTablet: boolean,
6 isTV: boolean,
7}
Was the article helpful?
Previous
Next