Still working on event handling for hotkey widgets
This commit is contained in:
@@ -43,6 +43,12 @@ enum class ElxFoundOrNotFound : uint8 {
|
||||
NotFound,
|
||||
};
|
||||
|
||||
UENUM(BlueprintType)
|
||||
enum class ElxSuccessOrWrongType : uint8 {
|
||||
Success,
|
||||
WrongType,
|
||||
};
|
||||
|
||||
/////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// This is a little parser that parses Lua function 'prototypes'.
|
||||
@@ -219,9 +225,9 @@ private:
|
||||
//
|
||||
void Empty();
|
||||
|
||||
// Compare two types. If they aren't equal, log an error and return false.
|
||||
// Compare two types. If they aren't equal, possibly log an error, and return a status code.
|
||||
//
|
||||
static ElxSuccessOrError CheckType(ElxLuaValueType Type, ElxLuaValueType Desired);
|
||||
static ElxSuccessOrWrongType CheckType(bool LogErrorOnWrongType, ElxLuaValueType Type, ElxLuaValueType Desired);
|
||||
|
||||
public:
|
||||
UlxLuaValues() { Cursor = 0; }
|
||||
@@ -256,23 +262,23 @@ public:
|
||||
ElxLuaValueType SwitchNextType() { return NextType(); }
|
||||
|
||||
UFUNCTION(BlueprintCallable, meta = (ExpandEnumAsExecs = "Status"), Category = "Luprex|Lua Value Array")
|
||||
void ReadString(ElxSuccessOrError &Status, FString &Result);
|
||||
void ReadString(ElxSuccessOrWrongType &Status, FString &Result, bool LogErrorOnWrongType = false);
|
||||
|
||||
UFUNCTION(BlueprintCallable, meta = (ExpandEnumAsExecs = "Status"), Category = "Luprex|Lua Value Array")
|
||||
void ReadName(ElxSuccessOrError &Status, FName &Result);
|
||||
void ReadName(ElxSuccessOrWrongType &Status, FName &Result, bool LogErrorOnWrongType = false);
|
||||
|
||||
UFUNCTION(BlueprintCallable, meta = (ExpandEnumAsExecs = "Status"), Category = "Luprex|Lua Value Array")
|
||||
void ReadFloat(ElxSuccessOrError &Status, double &Result);
|
||||
void ReadFloat(ElxSuccessOrWrongType &Status, double &Result, bool LogErrorOnWrongType = false);
|
||||
|
||||
UFUNCTION(BlueprintCallable, meta = (ExpandEnumAsExecs = "Status"), Category = "Luprex|Lua Value Array")
|
||||
void ReadInt(ElxSuccessOrError &Status, int &Result);
|
||||
void ReadInt(ElxSuccessOrWrongType &Status, int &Result, bool LogErrorOnWrongType = false);
|
||||
|
||||
UFUNCTION(BlueprintCallable, meta = (ExpandEnumAsExecs = "Status"), Category = "Luprex|Lua Value Array")
|
||||
void ReadVector(ElxSuccessOrError &Status, FVector &Result);
|
||||
void ReadVector(ElxSuccessOrWrongType &Status, FVector &Result, bool LogErrorOnWrongType = false);
|
||||
|
||||
UFUNCTION(BlueprintCallable, meta = (ExpandEnumAsExecs = "Status"), Category = "Luprex|Lua Value Array")
|
||||
void ReadVector2D(ElxSuccessOrError &Status, FVector2D &Result);
|
||||
void ReadVector2D(ElxSuccessOrWrongType &Status, FVector2D &Result, bool LogErrorOnWrongType = false);
|
||||
|
||||
UFUNCTION(BlueprintCallable, meta = (ExpandEnumAsExecs = "Status"), Category = "Luprex|Lua Value Array")
|
||||
void ReadBoolean(ElxSuccessOrError &Status, bool &Result);
|
||||
void ReadBoolean(ElxSuccessOrWrongType &Status, bool &Result, bool LogErrorOnWrongType = false);
|
||||
};
|
||||
Reference in New Issue
Block a user