Compare commits
7 Commits
51323c9b92
...
8e1b4928a9
Author | SHA1 | Date | |
---|---|---|---|
8e1b4928a9 | |||
a28e6869f0 | |||
4045ee4707 | |||
c7d7856634 | |||
38df8d5e81 | |||
d582b938fa | |||
c3b9b82935 |
25
.clang-format
Normal file
25
.clang-format
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
---
|
||||||
|
BasedOnStyle: LLVM
|
||||||
|
AlignAfterOpenBracket: BlockIndent
|
||||||
|
AlignConsecutiveAssignments:
|
||||||
|
Enabled: true
|
||||||
|
AcrossEmptyLines: true
|
||||||
|
AcrossComments: true
|
||||||
|
AlignCompound: true
|
||||||
|
PadOperators: false
|
||||||
|
AlignEscapedNewlines: Left
|
||||||
|
AllowAllArgumentsOnNextLine: false
|
||||||
|
AllowAllParametersOfDeclarationOnNextLine: false
|
||||||
|
AllowShortBlocksOnASingleLine: Always
|
||||||
|
AllowShortEnumsOnASingleLine: false
|
||||||
|
BinPackArguments: false
|
||||||
|
BinPackParameters: false
|
||||||
|
BreakBeforeBinaryOperators: NonAssignment
|
||||||
|
BreakConstructorInitializers: BeforeComma
|
||||||
|
InsertNewlineAtEOF: true
|
||||||
|
KeepEmptyLinesAtEOF: true
|
||||||
|
KeepEmptyLinesAtTheStartOfBlocks: true
|
||||||
|
PackConstructorInitializers: Never
|
||||||
|
PointerAlignment: Middle
|
||||||
|
QualifierAlignment: Right
|
||||||
|
ShortNamespaceLines: 0
|
13
.clang-tidy
Normal file
13
.clang-tidy
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
---
|
||||||
|
Checks: "*
|
||||||
|
,-llvmlibc*
|
||||||
|
,-*readability-braces-around-statements
|
||||||
|
,-hicpp-braces-around-statements
|
||||||
|
,-readability-identifier-length
|
||||||
|
,-fuchsia-default-arguments*
|
||||||
|
,-*-non-private-member-variables-in-classes
|
||||||
|
,-fuchsia-trailing-return
|
||||||
|
,-altera-unroll-loops"
|
||||||
|
WarningsAsErrors: ''
|
||||||
|
HeaderFilterRegex: ''
|
||||||
|
FormatStyle: file
|
1
.gitignore
vendored
1
.gitignore
vendored
@ -12,3 +12,4 @@ Saved
|
|||||||
*.suo
|
*.suo
|
||||||
*.xcodeproj
|
*.xcodeproj
|
||||||
*.xcworkspace
|
*.xcworkspace
|
||||||
|
.cache
|
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/InteractInterface.uasset
(Stored with Git LFS)
BIN
Content/FirstPerson/Blueprints/InteractInterface.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.
18
Source/MyProject/Private/MagicFloatInput.cpp
Normal file
18
Source/MyProject/Private/MagicFloatInput.cpp
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
// Fill out your copyright notice in the Description page of Project Settings.
|
||||||
|
|
||||||
|
#include "MagicFloatInput.h"
|
||||||
|
|
||||||
|
void UMagicFloatInput::HandleOnTextCommitted(
|
||||||
|
FText const & inText,
|
||||||
|
ETextCommit::Type inCommitMethod
|
||||||
|
) {
|
||||||
|
double x = 0.0;
|
||||||
|
if (inText.IsEmptyOrWhitespace()) {
|
||||||
|
if (sourceInput != nullptr) {
|
||||||
|
x = FCString::Atod(*sourceInput->GetText().ToString());
|
||||||
|
}
|
||||||
|
} else
|
||||||
|
x = FCString::Atod(*inText.ToString());
|
||||||
|
|
||||||
|
SetText(FText::FromString(FString::Printf(TEXT("%.7f"), x)));
|
||||||
|
}
|
@ -1,10 +1,8 @@
|
|||||||
// Fill out your copyright notice in the Description page of Project Settings.
|
// Fill out your copyright notice in the Description page of Project Settings.
|
||||||
|
|
||||||
|
|
||||||
#include "ModeInputTextBox.h"
|
#include "ModeInputTextBox.h"
|
||||||
|
|
||||||
void UModeInputTextBox::HandleOnTextChanged(const FText& inText) {
|
void UModeInputTextBox::HandleOnTextChanged(FText const & inText) {
|
||||||
|
|
||||||
auto & s = inText.ToString();
|
auto & s = inText.ToString();
|
||||||
auto lastChar = s.LeftChop(1);
|
auto lastChar = s.LeftChop(1);
|
||||||
lastChar.ToUpperInline();
|
lastChar.ToUpperInline();
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
// Fill out your copyright notice in the Description page of Project Settings.
|
// Fill out your copyright notice in the Description page of Project Settings.
|
||||||
|
|
||||||
|
|
||||||
#include "MyPlayerState.h"
|
#include "MyPlayerState.h"
|
||||||
|
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
// Fill out your copyright notice in the Description page of Project Settings.
|
// Fill out your copyright notice in the Description page of Project Settings.
|
||||||
|
|
||||||
|
|
||||||
#include "MyUserWidget.h"
|
#include "MyUserWidget.h"
|
||||||
#include <MyPlayerState.h>
|
#include <MyPlayerState.h>
|
||||||
|
|
||||||
@ -9,5 +8,19 @@ void UMyUserWidget::NativeOnInitialized() {
|
|||||||
if (ps == nullptr)
|
if (ps == nullptr)
|
||||||
return;
|
return;
|
||||||
opIdTextBlock->SetText(FText::FromString(ps->GetPlayerName()));
|
opIdTextBlock->SetText(FText::FromString(ps->GetPlayerName()));
|
||||||
|
UTextBlock * arcaneNumbers[9] = {
|
||||||
|
URM_TextBlock,
|
||||||
|
MU_TextBlock,
|
||||||
|
Time_TextBlock,
|
||||||
|
GR_TextBlock,
|
||||||
|
CR_TextBlock,
|
||||||
|
ColX_TextBlock,
|
||||||
|
ColY_TextBlock,
|
||||||
|
WR_TextBlock,
|
||||||
|
AN_TextBlock
|
||||||
|
};
|
||||||
|
for (auto * n : arcaneNumbers) {
|
||||||
|
auto x = FCString::Atod(*n->GetText().ToString());
|
||||||
|
n->SetText(FText::FromString(FString::Printf(TEXT("%.7f"), x)));
|
||||||
|
}
|
||||||
}
|
}
|
@ -1,12 +1,7 @@
|
|||||||
// Fill out your copyright notice in the Description page of Project Settings.
|
// Fill out your copyright notice in the Description page of Project Settings.
|
||||||
|
|
||||||
|
|
||||||
#include "TheracAdapter.h"
|
#include "TheracAdapter.h"
|
||||||
|
|
||||||
TheracAdapter::TheracAdapter()
|
TheracAdapter::TheracAdapter() {}
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
TheracAdapter::~TheracAdapter()
|
TheracAdapter::~TheracAdapter() {}
|
||||||
{
|
|
||||||
}
|
|
||||||
|
5
Source/MyProject/Private/VerifierTextBlock.cpp
Normal file
5
Source/MyProject/Private/VerifierTextBlock.cpp
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
// Fill out your copyright notice in the Description page of Project Settings.
|
||||||
|
|
||||||
|
|
||||||
|
#include "VerifierTextBlock.h"
|
||||||
|
|
25
Source/MyProject/Public/MagicFloatInput.h
Normal file
25
Source/MyProject/Public/MagicFloatInput.h
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
// Fill out your copyright notice in the Description page of Project Settings.
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "Components/EditableTextBox.h"
|
||||||
|
#include "CoreMinimal.h"
|
||||||
|
#include <Components/TextBlock.h>
|
||||||
|
#include "MagicFloatInput.generated.h"
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
UCLASS()
|
||||||
|
class MYPROJECT_API UMagicFloatInput : public UEditableTextBox {
|
||||||
|
|
||||||
|
GENERATED_BODY()
|
||||||
|
|
||||||
|
void HandleOnTextCommitted(
|
||||||
|
FText const & Text,
|
||||||
|
ETextCommit::Type CommitMethod
|
||||||
|
) override;
|
||||||
|
|
||||||
|
UPROPERTY(EditAnywhere)
|
||||||
|
UTextBlock * sourceInput;
|
||||||
|
};
|
@ -2,17 +2,17 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "CoreMinimal.h"
|
|
||||||
#include "Components/EditableTextBox.h"
|
#include "Components/EditableTextBox.h"
|
||||||
|
#include "CoreMinimal.h"
|
||||||
#include "ModeInputTextBox.generated.h"
|
#include "ModeInputTextBox.generated.h"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
UCLASS()
|
UCLASS()
|
||||||
class MYPROJECT_API UModeInputTextBox : public UEditableTextBox
|
class MYPROJECT_API UModeInputTextBox : public UEditableTextBox {
|
||||||
{
|
|
||||||
GENERATED_BODY()
|
GENERATED_BODY()
|
||||||
|
|
||||||
void HandleOnTextChanged(const FText& inText) override;
|
void HandleOnTextChanged(FText const & inText) override;
|
||||||
};
|
};
|
||||||
|
@ -10,8 +10,7 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
UCLASS()
|
UCLASS()
|
||||||
class MYPROJECT_API AMyPlayerState : public APlayerState
|
class MYPROJECT_API AMyPlayerState : public APlayerState {
|
||||||
{
|
|
||||||
GENERATED_BODY()
|
|
||||||
|
|
||||||
|
GENERATED_BODY()
|
||||||
};
|
};
|
||||||
|
@ -2,22 +2,48 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "CoreMinimal.h"
|
|
||||||
#include "Blueprint/UserWidget.h"
|
#include "Blueprint/UserWidget.h"
|
||||||
|
#include "CoreMinimal.h"
|
||||||
#include <Components/TextBlock.h>
|
#include <Components/TextBlock.h>
|
||||||
#include "MyUserWidget.generated.h"
|
#include "MyUserWidget.generated.h"
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
UCLASS()
|
UCLASS()
|
||||||
class MYPROJECT_API UMyUserWidget : public UUserWidget
|
class MYPROJECT_API UMyUserWidget : public UUserWidget {
|
||||||
{
|
|
||||||
GENERATED_BODY()
|
GENERATED_BODY()
|
||||||
|
|
||||||
UPROPERTY(meta = (BindWidget))
|
UPROPERTY(meta = (BindWidget))
|
||||||
UTextBlock * opIdTextBlock;
|
UTextBlock * opIdTextBlock;
|
||||||
|
|
||||||
|
UPROPERTY(meta = (BindWidget))
|
||||||
|
UTextBlock * URM_TextBlock;
|
||||||
|
|
||||||
|
UPROPERTY(meta = (BindWidget))
|
||||||
|
UTextBlock * MU_TextBlock;
|
||||||
|
|
||||||
|
UPROPERTY(meta = (BindWidget))
|
||||||
|
UTextBlock * Time_TextBlock;
|
||||||
|
|
||||||
|
UPROPERTY(meta = (BindWidget))
|
||||||
|
UTextBlock * GR_TextBlock;
|
||||||
|
|
||||||
|
UPROPERTY(meta = (BindWidget))
|
||||||
|
UTextBlock * CR_TextBlock;
|
||||||
|
|
||||||
|
UPROPERTY(meta = (BindWidget))
|
||||||
|
UTextBlock * ColX_TextBlock;
|
||||||
|
|
||||||
|
UPROPERTY(meta = (BindWidget))
|
||||||
|
UTextBlock * ColY_TextBlock;
|
||||||
|
|
||||||
|
UPROPERTY(meta = (BindWidget))
|
||||||
|
UTextBlock * WR_TextBlock;
|
||||||
|
|
||||||
|
UPROPERTY(meta = (BindWidget))
|
||||||
|
UTextBlock * AN_TextBlock;
|
||||||
|
|
||||||
void NativeOnInitialized() override;
|
void NativeOnInitialized() override;
|
||||||
};
|
};
|
||||||
|
17
Source/MyProject/Public/VerifierTextBlock.h
Normal file
17
Source/MyProject/Public/VerifierTextBlock.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 "Components/TextBlock.h"
|
||||||
|
#include "VerifierTextBlock.generated.h"
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
UCLASS()
|
||||||
|
class MYPROJECT_API UVerifierTextBlock : public UTextBlock
|
||||||
|
{
|
||||||
|
GENERATED_BODY()
|
||||||
|
|
||||||
|
};
|
Reference in New Issue
Block a user