Files
ReshadePluginsCore/libs/UEngine/UETools.hpp

42 lines
986 B
C++
Raw Normal View History

#pragma once
#include <spdlog/spdlog.h>
#include <atomic>
inline std::atomic_bool g_Console_Enabled { false };
namespace SDK {
class UEngine;
class UObject;
class UWorld;
class UWidget;
class APawn;
class UGameplayStatics;
class UConsole;
class UInputSettings;
class UKismetStringLibrary;
class UGameInstance;
class ULocalPlayer;
class APlayerController;
}
// Unreal Engine functions
/**
* @brief Gets the current player Pawn from the world.
* @param world Optional UWorld pointer.
* @return Player Pawn or nullptr.
*/
SDK::APawn* GetPawnFromWorld(SDK::UWorld* world = nullptr);
/**
* @brief Reactivate the development console.
* @param logger spdlog.
*/
void ReactivateDevConsole(std::shared_ptr<spdlog::logger> logger);
/**
* @brief Apply offsets recursively to UVCanvasPanelSlot.
* @param widget type of UUserWidget* (pointer).
* @param left offset.
* @param right offset.
*/
void ApplyOffsetsRecursive(SDK::UWidget* widget, float left, float right = 0);