this was probably a bad idea because they need to be actors for events to work
This commit is contained in:
@ -15,4 +15,9 @@ void UMagicFloatInput::HandleOnTextCommitted(
|
||||
x = FCString::Atod(*inText.ToString());
|
||||
|
||||
SetText(FText::FromString(FString::Printf(TEXT("%.7f"), x)));
|
||||
HandleMagicFloatsMangledEvent();
|
||||
}
|
||||
|
||||
void UMagicFloatInput::HandleMagicFloatsMangledEvent() {
|
||||
OnMagicFloatsMangled.ExecuteIfBound();
|
||||
}
|
||||
|
@ -1,5 +1,12 @@
|
||||
// Fill out your copyright notice in the Description page of Project Settings.
|
||||
|
||||
|
||||
#include "VerifierTextBlock.h"
|
||||
|
||||
void UVerifierTextBlock::NativeOnInitialized() {
|
||||
if (destInput != nullptr) {
|
||||
destInput->OnMagicFloatsMangled.BindUObject(
|
||||
this,
|
||||
&UVerifierTextBlock::verifyFloats
|
||||
);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user