-
Notifications
You must be signed in to change notification settings - Fork 6
IsCurrentlyOnScreen
Checks whether a specified UI element of the game is currently visible on to the user.
BOOL ISettlers4Api::IsCurrentlyOnScreen(
S4_GUI_ENUM dwObject
);dwObject
This parameter can be one of the following values.
| Value | Meaning |
|---|---|
|
S4_SCREEN_MAINMENU 1 |
The main menu screen of the game. |
|
S4_SCREEN_TUTORIAL 2 |
The screen opened when clicking the tutorial button on the main menu. |
|
S4_SCREEN_ADDON 3 |
The screen opened when clicking the add on button on the main menu. |
|
S4_SCREEN_MISSIONCD 4 |
The screen opened when clicking the mission cd button on the main menu. |
|
S4_SCREEN_NEWWORLD 5 |
The screen opened when clicking the new world button on the main menu. |
|
S4_SCREEN_NEWWORLD2 6 |
|
|
S4_SCREEN_SINGLEPLAYER 7 |
The screen opened when clicking the singleplayer button on the main menu. |
|
S4_SCREEN_MULTIPLAYER 8 |
The screen opened when clicking the multiplayer button on the main menu. |
|
S4_SCREEN_LOADGAME 9 |
The screen opened when clicking the load game button on the main menu. |
|
S4_SCREEN_CREDITS 10 |
The screen opened when clicking the credits button on the main menu. |
|
S4_SCREEN_ADDON_TROJAN 11 |
The screen opened when clicking on the trojan campaign in the add on menu. |
|
S4_SCREEN_ADDON_ROMAN 12 |
The screen opened when clicking on the roman campaign in the add on menu. |
|
S4_SCREEN_ADDON_MAYAN 13 |
The screen opened when clicking on the mayan campaign in the add on menu. |
|
S4_SCREEN_ADDON_VIKING 14 |
The screen opened when clicking on the viking campaign in the add on menu. |
|
S4_SCREEN_ADDON_SETTLE 15 |
The screen opened when clicking on the settle campaign in the add on menu. |
|
S4_SCREEN_MISSIONCD_ROMAN 16 |
The screen opened when clicking on the roman campaign in the mission cd menu. |
|
S4_SCREEN_MISSIONCD_VIKING 17 |
The screen opened when clicking on the viking campaign in the mission cd menu. |
|
S4_SCREEN_MISSIONCD_MAYAN 18 |
The screen opened when clicking on the mayan campaign in the mission cd menu. |
|
S4_SCREEN_MISSIONCD_CONFL 19 |
The screen opened when clicking on the conflict campaign in the mission cd menu. |
|
S4_SCREEN_SINGLEPLAYER_CAMPAIGN 20 |
The screen opened when clicking on the three tribes campaign in the singleplayer menu. |
|
S4_SCREEN_SINGLEPLAYER_DARKTRIBE 21 |
The screen opened when clicking on the dark tribe campaign in the singleplayer menu. |
|
S4_SCREEN_SINGLEPLAYER_MAPSELECT_SINGLE 22 |
The screen opened when clicking on the map selection in the singleplayer menu. |
|
S4_SCREEN_SINGLEPLAYER_MAPSELECT_MULTI 23 |
The screen opened when clicking on the multiplayer maps filter in the singleplayer map selection menu. |
|
S4_SCREEN_SINGLEPLAYER_MAPSELECT_RANDOM 24 |
The screen opened when clicking on the random maps button in the singleplayer map selection menu. |
|
S4_SCREEN_SINGLEPLAYER_MAPSELECT_USER 25 |
The screen opened when clicking on the user maps filter in the singleplayer map selection menu. |
|
S4_SCREEN_SINGLEPLAYER_LOBBY 26 |
The screen opened when starting a singleplayer map. That is the list of the AI players and their starting positions. |
|
S4_SCREEN_MULTIPLAYER_MAPSELECT_MULTI 27 |
The screen opened when clicking on the multiplayer maps filter in the multiplayer map selection menu. |
|
S4_SCREEN_MULTIPLAYER_MAPSELECT_RANDOM 28 |
The screen opened when clicking on the random maps button in the multiplayer map selection menu. |
|
S4_SCREEN_MULTIPLAYER_MAPSELECT_USER 29 |
The screen opened when clicking on the user maps filter in the multiplayer map selection menu. |
|
S4_SCREEN_MULTIPLAYER_LOBBY 30 |
The screen opened when starting a multiplayer map. That is the list of the connected players, the AI players and their starting positions. It also has a chat area in that screen. |
|
S4_SCREEN_LOADGAME_CAMPAIGN 31 |
The screen opened when clicking the campaign filter in the load game menu. |
|
S4_SCREEN_LOADGAME_MAP 32 |
The screen opened when clicking the map filter in the load game menu. |
|
S4_SCREEN_LOADGAME_MULTIPLAYER 33 |
The screen opened when clicking the multiplayer filter in the load game menu. |
|
S4_SCREEN_AFTERGAME_SUMMARY 34 |
The screen opened when the player leaves a game. That shows the summary and stats of the game. |
|
S4_SCREEN_AFTERGAME_DETAILS 35 |
The screen that is opened when the player clicks on a players name in the aftergame summary screen. |
|
S4_SCREEN_INGAME 36 |
The screen when in game. That is if the player is not in any of the menu screens. |
|
S4_SCREEN_MISSION_DESCRIPTION 37 |
The screen that shows a mission description of a campaign map. User maps can have that too. If no description is available the game skips this screen. |
|
S4_MENU_EXTRAS_SAVE 38 |
The in-game save menu. That is opened when clicking the extras button in the top left corner. |
|
S4_MENU_EXTRAS_MISSION 39 |
The in-game mission description. That is opened when clicking the extras button in the top left corner and then choosing the 2nd sub menu. |
|
S4_MENU_EXTRAS_CHATSETTINGS 40 |
The in-game chat options. That is opened when clicking the extras button in the top left corner and then choosing the 3rd sub menu. |
|
S4_MENU_EXTRAS_QUIT 41 |
The in-game quit menu. That is opened when clicking the extras button in the top left corner and then choosing the 4th sub menu. |
|
S4_MENU_SETTINGS_GRAPHICS 42 |
The in-game graphics menu. That is opened when clicking the settings button in the top left corner and then choosing the 1st sub menu. It is empty in the history edition. |
|
S4_MENU_SETTINGS_AUDIO 43 |
The in-game audio menu. That is opened when clicking the settings button in the top left corner and then choosing the 2nd sub menu. |
|
S4_MENU_SETTINGS_GAME 44 |
The in-game game settings menu. That is opened when clicking the settings button in the top left corner and then choosing the 3rd sub menu. |
|
S4_MENU_SETTINGS_NOTIFICATIONS 45 |
The in-game game notification settings menu. That is opened when clicking the settings button in the top left corner and then choosing the 4th sub menu. |
|
S4_MENU_BUILDINGS_FOUNDATION 46 |
The 1st in-game building menu. |
|
S4_MENU_BUILDINGS_METAL 47 |
The 2nd in-game building menu. |
|
S4_MENU_BUILDINGS_FOOD 48 |
The 3rd in-game building menu. |
|
S4_MENU_BUILDINGS_MISC 49 |
The 4th in-game building menu. |
|
S4_MENU_BUILDINGS_MISC_DECOSUB 50 |
The deco objects sub menu of the 4th in-game building menu. |
|
S4_MENU_BUILDINGS_MILITARY 51 |
The 5th in-game building menu. |
|
S4_MENU_SETTLERS_SUMMARY 52 |
|
|
S4_MENU_SETTLERS_WORKERS 53 |
|
|
S4_MENU_SETTLERS_SPECIALISTS 54 |
|
|
S4_MENU_SETTLERS_SEARCH 55 |
|
|
S4_MENU_GOODS_SUMMARY 56 |
|
|
S4_MENU_GOODS_DISTRIBUTION 57 |
|
|
S4_MENU_GOODS_PRIORITY 58 |
|
|
S4_MENU_STATISTICS_WARRIORS 59 |
|
|
S4_MENU_STATISTICS_LAND 60 |
|
|
S4_MENU_STATISTICS_GOODS 61 |
|
|
S4_MENU_UNITSELECTION_DONKEY 62 |
The panel that is shown when a donkey is selected. |
|
S4_MENU_UNITSELECTION_MILITARY 63 |
The panel that is shown when military units are selected. |
|
S4_MENU_UNITSELECTION_SPECIALISTS 64 |
The panel that is shown when specialists are selected. |
|
S4_MENU_UNITSELECTION_VEHICLES 65 |
The panel that is shown when vehicles are selected. |
|
S4_MENU_UNITSELECTION_FERRY 66 |
The panel that is shown when a ferry is selected. |
|
S4_MENU_UNITSELECTION_TRADINGVEHICLE 67 |
The panel that is shown when a trading vehicle is selected. |
|
S4_MENU_UNITSELECTION_SUB_SPELLS 68 |
The sub menu that is shown for choosing a spell to cast. |
|
S4_MENU_UNITSELECTION_SUB_GROUPINGS 69 |
The sub menu that is shown for choosing selection group. |
|
S4_MENU_SELECTION_SUB_TRADE 70 |
The sub menu that is shown for choosing goods to trade with a trade vehicle. |
|
S4_MENU_SELECTION_SUB_BUILDVEHICLE 71 |
The sub menu that is shown when choosing a vehicle to build in the shipyard or vehicle manufacture. |
|
S4_MENU_SELECTION_SUB_BARRACKS 72 |
The sub menu of the barracks. |
Returns TRUE if the specified UI element is visible, FALSE otherwise.
This method currently does not work for the gold edition of the game. This is considered a bug and pull requests that fix this are welcome.
Not every menu is yet added to the list. The list is expanding in the future. For example a enum value for checking whether the player is currently setting the work area of a building, weapon smith sub menus or a value for the selection panels of each building in the game.
Known bugs cause some of the options currently not working in an exclusive manner. For example S4_SCREEN_ADDON and S4_SCREEN_SINGLEPLAYER_MAPSELECT_RANDOM are equivalent. Some of the values are simply not yet implemented like S4_SCREEN_CREDITS. This is considered a bug and pull requests that fix these problems are welcome. Here is a list of the problematic values.
| Value | Problem |
|---|---|
| S4_SCREEN_ADDON | equivalent to S4_SCREEN_SINGLEPLAYER_MAPSELECT_RANDOM |
| S4_SCREEN_MISSIONCD | equivalent to S4_SCREEN_SINGLEPLAYER_MAPSELECT_USER, S4_SCREEN_SINGLEPLAYER_MAPSELECT_SINGLE, S4_SCREEN_SINGLEPLAYER_MAPSELECT_MULTI |
| S4_SCREEN_NEWWORLD | equivalent to S4_SCREEN_NEWWORLD2 |
| S4_SCREEN_NEWWORLD2 | equivalent to S4_SCREEN_NEWWORLD |
| S4_SCREEN_CREDITS | not yet implemented |
| S4_SCREEN_SINGLEPLAYER_MAPSELECT_RANDOM | equivalent to S4_SCREEN_ADDON |
| S4_SCREEN_SINGLEPLAYER_MAPSELECT_SINGLE | equivalent to S4_SCREEN_SINGLEPLAYER_MAPSELECT_USER, S4_SCREEN_MISSIONCD, S4_SCREEN_SINGLEPLAYER_MAPSELECT_MULTI |
| S4_SCREEN_SINGLEPLAYER_MAPSELECT_MULTI | equivalent to S4_SCREEN_SINGLEPLAYER_MAPSELECT_USER, S4_SCREEN_MISSIONCD, S4_SCREEN_SINGLEPLAYER_MAPSELECT_SINGLE |
| S4_SCREEN_SINGLEPLAYER_MAPSELECT_USER | equivalent to S4_SCREEN_SINGLEPLAYER_MAPSELECT_MULTI, S4_SCREEN_MISSIONCD, S4_SCREEN_SINGLEPLAYER_MAPSELECT_SINGLE |
| S4_SCREEN_SINGLEPLAYER_LOBBY | equivalent to S4_SCREEN_MULTIPLAYER_LOBBY |
| S4_SCREEN_MULTIPLAYER_MAPSELECT_MULTI | equivalent to S4_SCREEN_MULTIPLAYER_MAPSELECT_USER, S4_SCREEN_MISSION_DESCRIPTION (only for mission cd descriptions) |
| S4_SCREEN_MULTIPLAYER_MAPSELECT_USER | equivalent to S4_SCREEN_MULTIPLAYER_MAPSELECT_MULTI, S4_SCREEN_MISSION_DESCRIPTION (only for mission cd descriptions) |
| S4_SCREEN_MULTIPLAYER_LOBBY | equivalent to S4_SCREEN_SINGLEPLAYER_LOBBY |
| S4_SCREEN_LOADGAME_CAMPAIGN | equivalent to S4_SCREEN_LOADGAME_MAP, S4_SCREEN_LOADGAME_MULTIPLAYER |
| S4_SCREEN_LOADGAME_MAP | equivalent to S4_SCREEN_LOADGAME_CAMPAIGN, S4_SCREEN_LOADGAME_MULTIPLAYER |
| S4_SCREEN_LOADGAME_MULTIPLAYER | equivalent to S4_SCREEN_LOADGAME_MAP, S4_SCREEN_LOADGAME_CAMPAIGN |
| S4_SCREEN_MISSION_DESCRIPTION | Only when in mission cd descriptions this is equivalent to S4_SCREEN_MULTIPLAYER_MAPSELECT_MULTI, S4_SCREEN_MULTIPLAYER_MAPSELECT_USER |
| Minimum API Level | 1 |
| Target Edition | History Edition |
| Header | S4ModApi.h |
| Library | S4ModApi.lib |
| DLL | S4ModApi.dll |