bla
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@ -12,3 +12,4 @@ Saved
|
||||
*.suo
|
||||
*.xcodeproj
|
||||
*.xcworkspace
|
||||
.cache
|
@ -3,4 +3,16 @@
|
||||
|
||||
#include "MagicFloatInput.h"
|
||||
|
||||
void UMagicFloatInput::HandleOnTextCommitted(const FText& inText, ETextCommit::Type inCommitMethod) {}
|
||||
void UMagicFloatInput::HandleOnTextCommitted(const FText& inText, ETextCommit::Type inCommitMethod) {
|
||||
if(inText.IsEmptyOrWhitespace()) {
|
||||
if(sourceInput != nullptr) {
|
||||
SetText(sourceInput->GetText());
|
||||
}
|
||||
}
|
||||
else {
|
||||
auto x = FCString::Atof(*inText.ToString());
|
||||
SetText(FText::FromString(FString::Printf(TEXT("%.7f"),x)));
|
||||
|
||||
}
|
||||
|
||||
}
|
@ -15,4 +15,7 @@ class MYPROJECT_API UMagicFloatInput : public UEditableTextBox
|
||||
GENERATED_BODY()
|
||||
|
||||
void HandleOnTextCommitted(const FText& Text, ETextCommit::Type CommitMethod) override;
|
||||
|
||||
UPROPERTY(EditAnywhere)
|
||||
UEditableTextBox * sourceInput;
|
||||
};
|
||||
|
1
compile_commands.json
Symbolic link
1
compile_commands.json
Symbolic link
@ -0,0 +1 @@
|
||||
.vscode/compileCommands_MyProject.json
|
Reference in New Issue
Block a user