fucking 3d widget dog shit I should have just used normal ui
This commit is contained in:
BIN
Content/FirstPerson/Blueprints/BP_FirstPersonCharacter.uasset
(Stored with Git LFS)
BIN
Content/FirstPerson/Blueprints/BP_FirstPersonCharacter.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
Content/FirstPerson/Blueprints/BP_FirstPersonGameMode.uasset
(Stored with Git LFS)
BIN
Content/FirstPerson/Blueprints/BP_FirstPersonGameMode.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
Content/LinacLab/MyMyUserWidget.uasset
(Stored with Git LFS)
BIN
Content/LinacLab/MyMyUserWidget.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
Content/LinacLab/vt100_Blueprint.uasset
(Stored with Git LFS)
BIN
Content/LinacLab/vt100_Blueprint.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
Content/__ExternalActors__/FirstPerson/Maps/FirstPersonMap/4/WJ/ZO5YPDSQ83WFH5A5AA6TXE.uasset
(Stored with Git LFS)
BIN
Content/__ExternalActors__/FirstPerson/Maps/FirstPersonMap/4/WJ/ZO5YPDSQ83WFH5A5AA6TXE.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
Content/__ExternalActors__/FirstPerson/Maps/FirstPersonMap/5/LP/XAMT9TY97Y43GQC2BE17H1.uasset
(Stored with Git LFS)
Normal file
BIN
Content/__ExternalActors__/FirstPerson/Maps/FirstPersonMap/5/LP/XAMT9TY97Y43GQC2BE17H1.uasset
(Stored with Git LFS)
Normal file
Binary file not shown.
@ -9,7 +9,8 @@
|
|||||||
"Type": "Runtime",
|
"Type": "Runtime",
|
||||||
"LoadingPhase": "Default",
|
"LoadingPhase": "Default",
|
||||||
"AdditionalDependencies": [
|
"AdditionalDependencies": [
|
||||||
"UMG"
|
"UMG",
|
||||||
|
"Engine"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
12
Source/MyProject/Private/ModeInputTextBox.cpp
Normal file
12
Source/MyProject/Private/ModeInputTextBox.cpp
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
// 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));
|
||||||
|
}
|
5
Source/MyProject/Private/MyPlayerState.cpp
Normal file
5
Source/MyProject/Private/MyPlayerState.cpp
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
// Fill out your copyright notice in the Description page of Project Settings.
|
||||||
|
|
||||||
|
|
||||||
|
#include "MyPlayerState.h"
|
||||||
|
|
@ -2,8 +2,12 @@
|
|||||||
|
|
||||||
|
|
||||||
#include "MyUserWidget.h"
|
#include "MyUserWidget.h"
|
||||||
|
#include <MyPlayerState.h>
|
||||||
|
|
||||||
void UMyUserWidget::NativeOnInitialized() {
|
void UMyUserWidget::NativeOnInitialized() {
|
||||||
|
auto ps = StaticCast<AMyPlayerState *>(GetOwningPlayerState());
|
||||||
|
if (ps == nullptr)
|
||||||
|
return;
|
||||||
|
opIdTextBlock->SetText(FText::FromString(ps->GetPlayerName()));
|
||||||
|
|
||||||
OpIdTextBlock->SetText(FText::FromString("testo6667"));
|
|
||||||
}
|
}
|
18
Source/MyProject/Public/ModeInputTextBox.h
Normal file
18
Source/MyProject/Public/ModeInputTextBox.h
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
// Fill out your copyright notice in the Description page of Project Settings.
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "CoreMinimal.h"
|
||||||
|
#include "Components/EditableTextBox.h"
|
||||||
|
#include "ModeInputTextBox.generated.h"
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
UCLASS()
|
||||||
|
class MYPROJECT_API UModeInputTextBox : public UEditableTextBox
|
||||||
|
{
|
||||||
|
GENERATED_BODY()
|
||||||
|
|
||||||
|
void HandleOnTextChanged(const FText& inText) override;
|
||||||
|
};
|
17
Source/MyProject/Public/MyPlayerState.h
Normal file
17
Source/MyProject/Public/MyPlayerState.h
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
// Fill out your copyright notice in the Description page of Project Settings.
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "CoreMinimal.h"
|
||||||
|
#include "GameFramework/PlayerState.h"
|
||||||
|
#include "MyPlayerState.generated.h"
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
UCLASS()
|
||||||
|
class MYPROJECT_API AMyPlayerState : public APlayerState
|
||||||
|
{
|
||||||
|
GENERATED_BODY()
|
||||||
|
|
||||||
|
};
|
@ -17,6 +17,7 @@ class MYPROJECT_API UMyUserWidget : public UUserWidget
|
|||||||
GENERATED_BODY()
|
GENERATED_BODY()
|
||||||
|
|
||||||
UPROPERTY(meta=(BindWidget))
|
UPROPERTY(meta=(BindWidget))
|
||||||
UTextBlock * OpIdTextBlock;
|
UTextBlock * opIdTextBlock;
|
||||||
|
|
||||||
void NativeOnInitialized() override;
|
void NativeOnInitialized() override;
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user