72 lines
2.1 KiB
C++
72 lines
2.1 KiB
C++
#pragma once
|
|
|
|
#include <optional>
|
|
#include <cstring>
|
|
|
|
#include <Unreal/FText.hpp>
|
|
#include <Unreal/NameTypes.hpp>
|
|
|
|
#include <Api/UmgTypes.hpp>
|
|
#include <Api/UnrealWrapper.hpp>
|
|
#include <Api/Widget.hpp>
|
|
#include <Api/UserWidget.hpp>
|
|
#include <Api/WidgetTree.hpp>
|
|
#include <Api/TextBlock.hpp>
|
|
#include <Api/CanvasPanel.hpp>
|
|
|
|
#include <Api/Pal/PalIndividual.hpp>
|
|
#include <Api/Pal/PalIndividualCharacterHandle.hpp>
|
|
#include <Api/Pal/PalIndividualCharacterParameter.hpp>
|
|
|
|
using namespace PalUIExtension::Api::Pal;
|
|
|
|
namespace PalUIExtension::Api::Mod
|
|
{
|
|
|
|
class PalDetail_PalIconNightEye : public UserWidget
|
|
{
|
|
public:
|
|
|
|
constexpr static auto ClassPath() -> const TCHAR* {
|
|
return STR("/Game/Mods/PalUIExtension/PalDetail_PalIconNightEye.PalDetail_PalIconNightEye_C");
|
|
}
|
|
|
|
constexpr static auto WidgetTreePath() -> const TCHAR* {
|
|
return STR("/Game/Mods/PalUIExtension/PalDetail_PalIconNightEye.PalDetail_PalIconNightEye_C:WidgetTree");
|
|
}
|
|
|
|
static auto DebugTag() -> const TCHAR* { return STR("PalDetail_PalIconNightEye"); }
|
|
|
|
PalDetail_PalIconNightEye() = default;
|
|
|
|
explicit PalDetail_PalIconNightEye(UObject* Obj) : UserWidget(Obj, ClassOf<PalDetail_PalIconNightEye>(), DebugTag()) {
|
|
|
|
}
|
|
|
|
auto GetIconVisibility() -> std::optional<bool>
|
|
{
|
|
return CallForReturn<bool>(STR("GetIconVisibility"));
|
|
}
|
|
// ---- calls ---------------------------------------------------
|
|
|
|
struct SetIconVisibilityFrame { bool visibility; bool localVar1; };
|
|
|
|
auto SetIconVisibility(bool newState) -> bool {
|
|
SetIconVisibilityFrame p{
|
|
newState,
|
|
newState
|
|
};
|
|
if (!Call(STR("SetIconVisibility"), p)){
|
|
Output::send<LogLevel::Error>(
|
|
STR("[SetIconVisibility] Call to method failed.\n"));
|
|
return false;
|
|
}
|
|
return true;
|
|
}
|
|
|
|
protected:
|
|
PalDetail_PalIconNightEye(UObject* Obj, UClass* Expected, const TCHAR* Tag)
|
|
: UserWidget(Obj, Expected, Tag) {
|
|
}
|
|
};
|
|
} |