Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Fill out your copyright notice in the Description page of Project Settings.
- #include "MusicalRange.h"
- #include "MusicalRangeInstance.h"
- #include "ThirdParty/Steamworks/Steamv132/sdk/public/steam/isteamutils.h"
- //Musical Range Game Instance Elements
- bool UMusicalRangeInstance::InterLevelPersitentValuePONE() {
- InterLevelPersitentValue++;
- return true;
- }
- bool UMusicalRangeInstance::RunSteamCallbacks() {
- SteamAPI_RunCallbacks();
- SteamOverlayActive(); //Check for active overlay
- return true;
- }
- void UMusicalRangeInstance::SteamOverlayActive() {
- SteamAPICall_t hSteamAPICall = SteamUtils()->IsOverlayEnabled();
- m_callResultGameOverlayActive.Set(hSteamAPICall, this, &UMusicalRangeInstance::OnSteamOverlayEnabled);
- return;
- }
- void UMusicalRangeInstance::OnSteamOverlayEnabled(GameOverlayActivated_t *pResult, bool bIOFailure) {
- IsSteamOverlayActive = (pResult->m_bActive != 0);
- OnSteamOverlayIsActive(IsSteamOverlayActive);
- return;
- }
- //FSteamworksCallbackAsync elements
- void FSteamworksCallbackAsync::OnSteamOverlayActive(GameOverlayActivated_t *CallbackData) {
- bool IsOverlayActive = (CallbackData->m_bActive != 0);
- GEngine->AddOnScreenDebugMessage(-1, 15, FColor::Cyan, IsOverlayActive ? "Overlay is ACTIVE" : "Overlay is OFF");
- MusicalRangeGameInstance->OnSteamOverlayIsActive(IsOverlayActive);
- }
Add Comment
Please, Sign In to add comment