fucking 3d widget dog shit I should have just used normal ui

This commit is contained in:
wonkyhonky2024
2025-05-07 21:38:27 +01:00
parent 6c98e84ea0
commit 61b95d1c56
13 changed files with 74 additions and 13 deletions

View 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));
}

View File

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

View File

@ -2,8 +2,12 @@
#include "MyUserWidget.h"
#include <MyPlayerState.h>
void UMyUserWidget::NativeOnInitialized() {
auto ps = StaticCast<AMyPlayerState *>(GetOwningPlayerState());
if (ps == nullptr)
return;
opIdTextBlock->SetText(FText::FromString(ps->GetPlayerName()));
OpIdTextBlock->SetText(FText::FromString("testo6667"));
}