Still working on event handling for hotkey widgets
This commit is contained in:
@@ -105,7 +105,7 @@ void UlxAssetLookup::LogMaybeError(bool Error, const TCHAR *Message, const TCHAR
|
||||
}
|
||||
}
|
||||
|
||||
UStaticMesh *UlxAssetLookup::GetStaticMeshByName(const UObject *Context, const FString &Name, bool ErrorIfNotFound)
|
||||
UStaticMesh *UlxAssetLookup::LoadStaticMeshAsset(const UObject *Context, const FString &Name, bool ErrorIfNotFound)
|
||||
{
|
||||
ALuprexGameModeBase *mode = ALuprexGameModeBase::FromContext(Context);
|
||||
FString Path = mode->GetAssetLookup()->StaticMeshLoadPath(FName(FString("SM_") + Name));
|
||||
@@ -124,7 +124,7 @@ UStaticMesh *UlxAssetLookup::GetStaticMeshByName(const UObject *Context, const F
|
||||
return Result;
|
||||
}
|
||||
|
||||
TSubclassOf<AActor> UlxAssetLookup::GetTangibleClassByName(const UObject *Context, const FString &Name, bool ErrorIfNotFound) {
|
||||
TSubclassOf<AActor> UlxAssetLookup::LoadTangibleBlueprintAsset(const UObject *Context, const FString &Name, bool ErrorIfNotFound) {
|
||||
ALuprexGameModeBase *mode = ALuprexGameModeBase::FromContext(Context);
|
||||
FString Path = mode->GetAssetLookup()->TangibleLoadPath(FName(FString("TAN_") + Name));
|
||||
if (Path.IsEmpty())
|
||||
@@ -152,7 +152,7 @@ TSubclassOf<AActor> UlxAssetLookup::GetTangibleClassByName(const UObject *Contex
|
||||
return Result;
|
||||
}
|
||||
|
||||
TSubclassOf<UUserWidget> UlxAssetLookup::GetWidgetByName(const UObject *Context, const FString &Name, bool ErrorIfNotFound) {
|
||||
TSubclassOf<UUserWidget> UlxAssetLookup::LoadUserWidgetAsset(const UObject *Context, const FString &Name, bool ErrorIfNotFound) {
|
||||
ALuprexGameModeBase *mode = ALuprexGameModeBase::FromContext(Context);
|
||||
FString Path = mode->GetAssetLookup()->WidgetLoadPath(FName(FString("WB_") + Name));
|
||||
if (Path.IsEmpty())
|
||||
@@ -168,13 +168,13 @@ TSubclassOf<UUserWidget> UlxAssetLookup::GetWidgetByName(const UObject *Context,
|
||||
}
|
||||
if (!Result->IsChildOf(UUserWidget::StaticClass()))
|
||||
{
|
||||
LogMaybeError(ErrorIfNotFound, TEXT("Blueprint is not a Widget Blueprint"), *Path);
|
||||
LogMaybeError(ErrorIfNotFound, TEXT("Blueprint does not derive from UUserWidget"), *Path);
|
||||
return nullptr;
|
||||
}
|
||||
return Result;
|
||||
}
|
||||
|
||||
TSubclassOf<UlxLookAtWidget> UlxAssetLookup::GetLookAtWidgetByName(const UObject *Context, const FString &Name, bool ErrorIfNotFound) {
|
||||
TSubclassOf<UlxLuaWidget> UlxAssetLookup::LoadLuaWidgetAsset(const UObject *Context, const FString &Name, bool ErrorIfNotFound) {
|
||||
ALuprexGameModeBase *mode = ALuprexGameModeBase::FromContext(Context);
|
||||
FString Path = mode->GetAssetLookup()->WidgetLoadPath(FName(FString("WB_") + Name));
|
||||
if (Path.IsEmpty())
|
||||
@@ -188,9 +188,9 @@ TSubclassOf<UlxLookAtWidget> UlxAssetLookup::GetLookAtWidgetByName(const UObject
|
||||
LogMaybeError(ErrorIfNotFound, TEXT("Cannot load widget blueprint"), *Path);
|
||||
return nullptr;
|
||||
}
|
||||
if (!Result->IsChildOf(UlxLookAtWidget::StaticClass()))
|
||||
if (!Result->IsChildOf(UlxLuaWidget::StaticClass()))
|
||||
{
|
||||
LogMaybeError(ErrorIfNotFound, TEXT("Blueprint is not a Luprex Look-At Widget"), *Path);
|
||||
LogMaybeError(ErrorIfNotFound, TEXT("Blueprint does not derive from UlxLuaWidget"), *Path);
|
||||
return nullptr;
|
||||
}
|
||||
return Result;
|
||||
|
||||
Reference in New Issue
Block a user