steam_activate_overlay

语法:

steam_activate_overlay(overlayindex);


参数 描述
overlayindex The page index of the Steam API UI to show (see constants listed below).


返回: N/A(无返回值)


描述

The Steam overlay is a piece of the Steam user interface that can be activated over the top of almost any game launched through Steam. It lets the user access their friends list, web browser, chat, and in-game DLC purchasing. The default key for a user to access the overlay while in a game is SHIFT+TAB, but you can also bring up any page of the overlay using this function. It takes one of six constants that are listed below:

常量 描述
ov_friends The friends page for the current user
ov_community The community page for your game
ov_players The page showing others that are playing the same game or that you have recently played with
ov_settings The Steam client overlay settings
ov_gamegroup Opens the Steam Community web browser to the official game group for this game
ov_achievements The achievements page for your game


例如:

var key = keyboard_lastkey;
switch (key)
   {
   case vk_f1: steam_activate_overlay(ov_friends); break;
   case vk_f2: steam_activate_overlay(ov_community); break;
   case vk_f3: steam_activate_overlay(ov_players); break;
   case vk_f4: steam_activate_overlay(ov_settings); break;
   case vk_f5: steam_activate_overlay(ov_gamegroup); break;
   case vk_f6: steam_activate_overlay(ov_achievements); break;
   }

The above code polls the last keyboard key pressed and if it is any of the function keys from 1 to 6 it will open the corresponding page of the Steam overlay.