SpiderPig Posted October 17, 2018 Share Posted October 17, 2018 How can I check if the Steam Overlay is active? I can't see anything that looks relevant under the Steamworks class. Quote Link to comment Share on other sites More sharing options...
Josh Posted October 17, 2018 Share Posted October 17, 2018 Press shift+tab in the game. Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
SpiderPig Posted October 17, 2018 Author Share Posted October 17, 2018 I know how to show it, what i need is a way to check if it is shown so I can disable mouse input to the game. Quote Link to comment Share on other sites More sharing options...
Josh Posted October 17, 2018 Share Posted October 17, 2018 I thought Steam did this automatically? Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
SpiderPig Posted October 17, 2018 Author Share Posted October 17, 2018 So did I, but when its shown the mouse will remain in the centre of the screen and still move the camera. All I'm calling at the start of the game is Steamworks::Initialize(). Quote Link to comment Share on other sites More sharing options...
Josh Posted October 17, 2018 Share Posted October 17, 2018 https://partner.steamgames.com/doc/api/ISteamUtils#IsOverlayEnabled Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Solution gamecreator Posted October 17, 2018 Solution Share Posted October 17, 2018 Seems like you can use this to tell if it's currently active: https://partner.steamgames.com/doc/api/ISteamFriends#GameOverlayActivated_t Quote Link to comment Share on other sites More sharing options...
SpiderPig Posted October 17, 2018 Author Share Posted October 17, 2018 Thanks. That looks to be the one but all I can find is this; Steamworks::steamfriends->ActivateGameOverlay() Which is just another method of activating the overlay. Quote Link to comment Share on other sites More sharing options...
SpiderPig Posted October 17, 2018 Author Share Posted October 17, 2018 Okay I found this which is a struct; GameOverlayActivated_t Quote Link to comment Share on other sites More sharing options...
SpiderPig Posted October 17, 2018 Author Share Posted October 17, 2018 https://partner.steamgames.com/doc/sdk/api#callbacks Quote Link to comment Share on other sites More sharing options...
Josh Posted October 17, 2018 Share Posted October 17, 2018 Ohhhhh it’s a callback. Those are such a pain I in the area works lib. Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
SpiderPig Posted October 17, 2018 Author Share Posted October 17, 2018 Yeah. I have it working now, thanks guys. Is this something you'll end up managing in the Steamworks class or you think it is best left for us to implement? Quote Link to comment Share on other sites More sharing options...
Josh Posted October 17, 2018 Share Posted October 17, 2018 You have it working? How? Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
SpiderPig Posted October 17, 2018 Author Share Posted October 17, 2018 I created a class specifically for steam callbacks; #header class cSteamCallbacks { private: STEAM_CALLBACK(cSteamCallbacks, _onGameOverlayActivated, GameOverlayActivated_t); public: bool steamOverlayActive = false; }; #cpp void cSteamCallbacks::_onGameOverlayActivated(GameOverlayActivated_t * pCallback) { if (pCallback->m_bActive == 1) { steamOverlayActive = true; } else { steamOverlayActive = false; } } #App.cpp cSteamCallback* steamCallback = nullptr; bool _steamSuccess = Steamworks::Initialize(); if (_steamSuccess == true) { steamCallback = new cSteamCallback(); } #Loop if(steamCallback->steamOverlayActive == false){ //Update mouse interaction } 2 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.