Phuket
This commit is contained in:
@ -1,37 +1,53 @@
|
||||
// Fill out your copyright notice in the Description page of Project Settings.
|
||||
|
||||
#include "ModeInputTextBox.h"
|
||||
#include <Logging/StructuredLog.h>
|
||||
|
||||
void UModeInputTextBox::HandleOnTextChanged(FText const & inText) {
|
||||
Text = Text.GetEmpty();
|
||||
auto & s = inText.ToString();
|
||||
auto lastChar = s.LeftChop(1);
|
||||
lastChar.ToUpperInline();
|
||||
// UE_LOGFMT(LogTemp, Warning, "kill me {inText}", s);
|
||||
|
||||
auto lastChar = s.ToUpper().Right(1);
|
||||
// UE_LOGFMT(LogTemp, Warning, "fucking {lastChar}", lastChar);
|
||||
SetText(FText::FromString(lastChar));
|
||||
if (!lastChar.IsEmpty()) {
|
||||
|
||||
switch (myTarget) {
|
||||
case THSModeTarget::Energy:
|
||||
switch (lastChar[0]) {
|
||||
switch (lastChar[lastChar.Len() - 1]) {
|
||||
case 'E':
|
||||
|
||||
break;
|
||||
case 'X':
|
||||
|
||||
break;
|
||||
default:
|
||||
lastChar[lastChar.Len() - 1] = '\0';
|
||||
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case THSModeTarget::OpMode:
|
||||
switch (lastChar[0]) {
|
||||
switch (lastChar[lastChar.Len() - 1]) {
|
||||
case 'T':
|
||||
|
||||
break;
|
||||
case 'R':
|
||||
|
||||
break;
|
||||
case 'P':
|
||||
|
||||
break;
|
||||
default:
|
||||
lastChar = "";
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
// UE_LOGFMT(LogTemp, Warning, "wat {lastChar}", lastChar);
|
||||
SetText(FText::FromString(lastChar));
|
||||
// SetText(FText::FromString(FString::Printf(TEXT("%c"), lastChar)));
|
||||
}
|
||||
|
Reference in New Issue
Block a user