more nonsense
This commit is contained in:
@ -3,4 +3,4 @@
|
||||
#include "MyProject.h"
|
||||
#include "Modules/ModuleManager.h"
|
||||
|
||||
IMPLEMENT_PRIMARY_GAME_MODULE( FDefaultGameModuleImpl, MyProject, "MyProject" );
|
||||
IMPLEMENT_PRIMARY_GAME_MODULE(FDefaultGameModuleImpl, MyProject, "MyProject");
|
||||
|
@ -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)));
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
@ -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));
|
||||
}
|
||||
|
@ -1,5 +1,4 @@
|
||||
// Fill out your copyright notice in the Description page of Project Settings.
|
||||
|
||||
|
||||
#include "MyPlayerState.h"
|
||||
|
||||
|
@ -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()));
|
||||
}
|
||||
|
@ -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() {}
|
||||
|
@ -2,20 +2,22 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "CoreMinimal.h"
|
||||
#include "Components/EditableTextBox.h"
|
||||
#include "CoreMinimal.h"
|
||||
#include "MagicFloatInput.generated.h"
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
*/
|
||||
UCLASS()
|
||||
class MYPROJECT_API UMagicFloatInput : public UEditableTextBox
|
||||
{
|
||||
GENERATED_BODY()
|
||||
|
||||
void HandleOnTextCommitted(const FText& Text, ETextCommit::Type CommitMethod) override;
|
||||
|
||||
UPROPERTY(EditAnywhere)
|
||||
UEditableTextBox * sourceInput;
|
||||
class MYPROJECT_API UMagicFloatInput : public UEditableTextBox {
|
||||
GENERATED_BODY()
|
||||
|
||||
void HandleOnTextCommitted(
|
||||
FText const & Text,
|
||||
ETextCommit::Type CommitMethod
|
||||
) override;
|
||||
|
||||
UPROPERTY(EditAnywhere)
|
||||
UEditableTextBox * sourceInput;
|
||||
};
|
||||
|
@ -2,17 +2,16 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "CoreMinimal.h"
|
||||
#include "Components/EditableTextBox.h"
|
||||
#include "CoreMinimal.h"
|
||||
#include "ModeInputTextBox.generated.h"
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
*/
|
||||
UCLASS()
|
||||
class MYPROJECT_API UModeInputTextBox : public UEditableTextBox
|
||||
{
|
||||
GENERATED_BODY()
|
||||
|
||||
void HandleOnTextChanged(const FText& inText) override;
|
||||
class MYPROJECT_API UModeInputTextBox : public UEditableTextBox {
|
||||
GENERATED_BODY()
|
||||
|
||||
void HandleOnTextChanged(FText const & inText) override;
|
||||
};
|
||||
|
@ -2,22 +2,20 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "CoreMinimal.h"
|
||||
#include "Blueprint/UserWidget.h"
|
||||
#include <Components/TextBlock.h>
|
||||
#include "CoreMinimal.h"
|
||||
#include "MyUserWidget.generated.h"
|
||||
|
||||
#include <Components/TextBlock.h>
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
*/
|
||||
UCLASS()
|
||||
class MYPROJECT_API UMyUserWidget : public UUserWidget
|
||||
{
|
||||
GENERATED_BODY()
|
||||
class MYPROJECT_API UMyUserWidget : public UUserWidget {
|
||||
GENERATED_BODY()
|
||||
|
||||
UPROPERTY(meta=(BindWidget))
|
||||
UTextBlock * opIdTextBlock;
|
||||
|
||||
void NativeOnInitialized() override;
|
||||
UPROPERTY(meta = (BindWidget))
|
||||
UTextBlock * opIdTextBlock;
|
||||
|
||||
void NativeOnInitialized() override;
|
||||
};
|
||||
|
Reference in New Issue
Block a user