Skip to content

Commit

Permalink
Finishing touches to 0.3 release
Browse files Browse the repository at this point in the history
  • Loading branch information
Panakotta00 committed Apr 1, 2022
1 parent c11024f commit dd0837d
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 23 deletions.
15 changes: 5 additions & 10 deletions Source/FicsItCam/Private/Editor/UI/FICEditor.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#include "Editor/UI/FICEditor.h"

#include "FICSubsystem.h"
#include "FICUtils.h"
#include "Engine/World.h"
#include "Blueprint/WidgetBlueprintLibrary.h"
#include "Editor/FICEditorContext.h"
Expand Down Expand Up @@ -94,7 +95,10 @@ void SFICEditor::RegisterTabs() {
TabManager->RegisterTabSpawner("Scene Object Details", FOnSpawnTab::CreateLambda([this](const FSpawnTabArgs& Args) {
return SNew(SDockTab)
.Content()[
SNew(SFICSceneObjectDetails, Context)
SNew(SScrollBox)
+SScrollBox::Slot().VAlign(VAlign_Fill).HAlign(HAlign_Fill)[
SNew(SFICSceneObjectDetails, Context)
]
];
}), FCanSpawnTab::CreateLambda([](const FSpawnTabArgs& Args) {
return true;
Expand Down Expand Up @@ -249,15 +253,6 @@ FReply SFICEditor::OnKeyDown(const FGeometry& MyGeometry, const FKeyEvent& InKey
AFICEditorSubsystem::GetFICEditorSubsystem(Context)->ToolsContext->InputRouter->PostInputEvent(InputState);

if (UFICUtils::IsAction(Context, InKeyEvent, TEXT("FicsItCam.ToggleCursor"))) {
/*if (GameWidget->HasUserFocusedDescendants(InKeyEvent.GetUserIndex())) {
FSlateApplication::Get().SetUserFocus(InKeyEvent.GetUserIndex(), SharedThis(this));
APlayerController* Controller = Context->GetScene()->GetWorld()->GetFirstPlayerController();
UWidgetBlueprintLibrary::SetInputMode_UIOnlyEx(Controller);
} else {
FSlateApplication::Get().SetUserFocusToGameViewport(InKeyEvent.GetUserIndex());
APlayerController* Controller = Context->GetScene()->GetWorld()->GetFirstPlayerController();
UWidgetBlueprintLibrary::SetInputMode_GameOnly(Controller);
}*/
Context->GetPlayerCharacter()->ControlViewToggle();
return FReply::Handled();
} else if (UFICUtils::IsAction(Context, InKeyEvent, TEXT("FicsItCam.ToggleAllKeyframes"))) {
Expand Down
12 changes: 6 additions & 6 deletions Source/FicsItCam/Private/Editor/UI/FICEditorSettings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ void SFICEditorSettings::Construct(const FArguments& InArgs, UFICEditorContext*
Context = InContext;

ChildSlot[
SNew(SVerticalBox)
+SVerticalBox::Slot().Padding(5).AutoHeight()[
SNew(SScrollBox)
+SScrollBox::Slot().Padding(5)[
SNew(SCheckBox)
.Content()[SNew(STextBlock).Text(FText::FromString("Lock Viewport Camera"))]
.IsChecked_Lambda([this]() {
Expand All @@ -20,7 +20,7 @@ void SFICEditorSettings::Construct(const FArguments& InArgs, UFICEditorContext*
})
.ToolTipText(FText::FromString(FString::Printf(TEXT("If enabled, the viewport camera will be locked to the virtual camera for the animation,\nthis allows (if disabled) to move the camera on path without changing the viewport camera view/orientation.\n\n%s"), *UFICUtils::KeymappingToString("FicsItCam.ToggleLockCamera"))))
]
+SVerticalBox::Slot().Padding(5).AutoHeight()[
+SScrollBox::Slot().Padding(5)[
SNew(SCheckBox)
.Content()[SNew(STextBlock).Text(FText::FromString("Show Camera Path"))]
.IsChecked_Lambda([this]() {
Expand All @@ -31,7 +31,7 @@ void SFICEditorSettings::Construct(const FArguments& InArgs, UFICEditorContext*
})
.ToolTipText(FText::FromString(FString::Printf(TEXT("If enabled, a camera path will be drawn into the world that shows how the camera moves through space,\nit additionally shows the camera orientation at the current frame.\n\n%s"), *UFICUtils::KeymappingToString("FicsItCam.ToggleShowPath"))))
]
+SVerticalBox::Slot().Padding(5).AutoHeight()[
+SScrollBox::Slot().Padding(5)[
SNew(SCheckBox)
.Content()[SNew(STextBlock).Text(FText::FromString("Auto Keyframe"))]
.IsChecked_Lambda([this]() {
Expand All @@ -42,7 +42,7 @@ void SFICEditorSettings::Construct(const FArguments& InArgs, UFICEditorContext*
})
.ToolTipText(FText::FromString(FString::Printf(TEXT("If enabled, a change of value of a attribute will directly cause it to set/create a keyframe for that attribute at the current frame.\n\n%s"), *UFICUtils::KeymappingToString("FicsItCam.ToggleAutoKeyframe"))))
]
+SVerticalBox::Slot().Padding(5).AutoHeight()[
+SScrollBox::Slot().Padding(5)[
SNew(SCheckBox)
.Content()[SNew(STextBlock).Text(FText::FromString("Force Resolution"))]
.IsChecked_Lambda([this]() {
Expand All @@ -53,7 +53,7 @@ void SFICEditorSettings::Construct(const FArguments& InArgs, UFICEditorContext*
})
.ToolTipText(FText::FromString(FString::Printf(TEXT("If enabled, viewport will be forced to use the aspect ratio of the resolution of the animation, causing black bars to appear."))))
]
+SVerticalBox::Slot().Padding(5).AutoHeight()[
+SScrollBox::Slot().Padding(5)[
SNew(SCheckBox)
.Content()[SNew(STextBlock).Text(FText::FromString("Enable Camera Preview"))]
.IsChecked_Lambda([this]() {
Expand Down
14 changes: 7 additions & 7 deletions Source/FicsItCam/Private/Editor/UI/FICSceneSettings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ void SFICSceneSettings::Construct(const FArguments& InArgs, UFICEditorContext* I
Context = InContext;

ChildSlot[
SNew(SVerticalBox)
+SVerticalBox::Slot().Padding(5).AutoHeight()[
SNew(SScrollBox)
+SScrollBox::Slot().Padding(5)[
SNew(SCheckBox)
.Content()[SNew(STextBlock).Text(FText::FromString("Use Cinematic Camera"))]
.IsChecked_Lambda([this]() {
Expand All @@ -19,7 +19,7 @@ void SFICSceneSettings::Construct(const FArguments& InArgs, UFICEditorContext* I
})
.ToolTipText(FText::FromString(TEXT("If enabled, tries to use a more fancy camera which f.e. can do Depth-Of-Field,\ntho it will require more performance hence using it in combination with the play command is not reccomended.")))
]
+SVerticalBox::Slot().Padding(5).AutoHeight()[
+SScrollBox::Slot().Padding(5)[
SNew(SCheckBox)
.Content()[SNew(STextBlock).Text(FText::FromString("Bullet Time"))]
.IsChecked_Lambda([this]() {
Expand All @@ -30,7 +30,7 @@ void SFICSceneSettings::Construct(const FArguments& InArgs, UFICEditorContext* I
})
.ToolTipText(FText::FromString(TEXT("If enabled, game simulation will pause allowing you to have a bullet time effect.")))
]
+SVerticalBox::Slot().Padding(5).AutoHeight()[
+SScrollBox::Slot().Padding(5)[
SNew(SCheckBox)
.Content()[SNew(STextBlock).Text(FText::FromString("Looping"))]
.IsChecked_Lambda([this]() {
Expand All @@ -41,7 +41,7 @@ void SFICSceneSettings::Construct(const FArguments& InArgs, UFICEditorContext* I
})
.ToolTipText(FText::FromString(TEXT("If enabled, animation will restart automatically at the end of the animation sequence.")))
]
+SVerticalBox::Slot().Padding(5).AutoHeight().HAlign(HAlign_Fill)[
+SScrollBox::Slot().Padding(5).HAlign(HAlign_Fill)[
SNew(SHorizontalBox)
+SHorizontalBox::Slot().AutoWidth()[
SNew(STextBlock).Text(FText::FromString("FPS: "))
Expand All @@ -63,7 +63,7 @@ void SFICSceneSettings::Construct(const FArguments& InArgs, UFICEditorContext* I
.TypeInterface(MakeShared<TDefaultNumericTypeInterface<int>>())
]
]
+SVerticalBox::Slot().Padding(5).AutoHeight().HAlign(HAlign_Fill)[
+SScrollBox::Slot().Padding(5).HAlign(HAlign_Fill)[
SNew(SHorizontalBox)
.ToolTipText(FText::FromString(TEXT("The resolution setting will be used to determine the aspect ratio and image size for rendering the animation.")))
+SHorizontalBox::Slot().AutoWidth()[
Expand Down Expand Up @@ -107,7 +107,7 @@ void SFICSceneSettings::Construct(const FArguments& InArgs, UFICEditorContext* I
.ToolTipText(FText::FromString(TEXT("Resolution Height")))
]
]
+SVerticalBox::Slot().Padding(5).AutoHeight().HAlign(HAlign_Fill)[
+SScrollBox::Slot().Padding(5).HAlign(HAlign_Fill)[
SNew(SHorizontalBox)
.ToolTipText(FText::FromString(TEXT("The sensor size used to adjust the DOF and aspect ration. (only functional with cinematic camera)")))
+SHorizontalBox::Slot().AutoWidth()[
Expand Down

0 comments on commit dd0837d

Please sign in to comment.