more nonsense

This commit is contained in:
wonkyhonky2024
2025-05-09 16:02:07 +01:00
parent 38df8d5e81
commit c7d7856634
11 changed files with 90 additions and 64 deletions

View File

@ -1,18 +1,17 @@
// Fill out your copyright notice in the Description page of Project Settings.
#include "MagicFloatInput.h"
void UMagicFloatInput::HandleOnTextCommitted(const FText& inText, ETextCommit::Type inCommitMethod) {
if(inText.IsEmptyOrWhitespace()) {
if(sourceInput != nullptr) {
SetText(sourceInput->GetText());
void UMagicFloatInput::HandleOnTextCommitted(
FText const & 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)));
}
}
else {
auto x = FCString::Atof(*inText.ToString());
SetText(FText::FromString(FString::Printf(TEXT("%.7f"),x)));
}
}
}

View File

@ -1,12 +1,10 @@
// Fill out your copyright notice in the Description page of Project Settings.
#include "ModeInputTextBox.h"
void UModeInputTextBox::HandleOnTextChanged(const FText& inText) {
auto & s = inText.ToString();
auto lastChar = s.LeftChop(1);
lastChar.ToUpperInline();
SetText(FText::FromString(lastChar));
}
void UModeInputTextBox::HandleOnTextChanged(FText const & inText) {
auto & s = inText.ToString();
auto lastChar = s.LeftChop(1);
lastChar.ToUpperInline();
SetText(FText::FromString(lastChar));
}

View File

@ -1,5 +1,4 @@
// Fill out your copyright notice in the Description page of Project Settings.
#include "MyPlayerState.h"

View File

@ -1,13 +1,11 @@
// Fill out your copyright notice in the Description page of Project Settings.
#include "MyUserWidget.h"
#include <MyPlayerState.h>
void UMyUserWidget::NativeOnInitialized() {
auto ps = StaticCast<AMyPlayerState *>(GetOwningPlayerState());
if (ps == nullptr)
return;
opIdTextBlock->SetText(FText::FromString(ps->GetPlayerName()));
}
auto ps = StaticCast<AMyPlayerState *>(GetOwningPlayerState());
if (ps == nullptr)
return;
opIdTextBlock->SetText(FText::FromString(ps->GetPlayerName()));
}

View File

@ -1,12 +1,7 @@
// Fill out your copyright notice in the Description page of Project Settings.
#include "TheracAdapter.h"
TheracAdapter::TheracAdapter()
{
}
TheracAdapter::TheracAdapter() {}
TheracAdapter::~TheracAdapter()
{
}
TheracAdapter::~TheracAdapter() {}