You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
Please note that file comments had no purpose in nearly all cases and just added visual clutter. The two files that had meaningful file comments had their comments moved into the corresponding classes. There are still hundreds of file comments left in other files that will be removed over time. Also cleaned up some random stuff along the way: - relative paths to public headers within the same module are no longer necessary (automatically discovered by UBT now) - header guards are deprecated, use #pragma once instead (all compilers support it now) - space between multiple template brackets is no longer required (all compilers support >> now) - NULL to nullptr, OVERRIDE to override - spelling errors, whitespace, line breaks [CL 2104067 by Max Preussner in Main branch]
97 lines
2.4 KiB
C++
97 lines
2.4 KiB
C++
// Copyright 1998-2014 Epic Games, Inc. All Rights Reserved.
|
|
|
|
#pragma once
|
|
|
|
|
|
/**
|
|
* Delegate type for submitting console commands.
|
|
*
|
|
* The first parameter is the submitted command string.
|
|
*/
|
|
DECLARE_DELEGATE_OneParam(FOnSessionConsoleCommandSubmitted, const FString&)
|
|
|
|
|
|
/**
|
|
* Implements the session console's command bar widget.
|
|
*/
|
|
class SSessionConsoleCommandBar
|
|
: public SCompoundWidget
|
|
{
|
|
public:
|
|
|
|
SLATE_BEGIN_ARGS(SSessionConsoleCommandBar) { }
|
|
|
|
/** Called when the filter settings have changed. */
|
|
SLATE_EVENT(FOnSessionConsoleCommandSubmitted, OnCommandSubmitted)
|
|
|
|
/** Called when the promote to shortcut button is clicked. */
|
|
SLATE_EVENT(FOnSessionConsoleCommandSubmitted, OnPromoteToShortcutClicked)
|
|
|
|
SLATE_END_ARGS()
|
|
|
|
public:
|
|
|
|
/**
|
|
* Construct this widget
|
|
*
|
|
* @param InArgs The declaration data for this widget.
|
|
*/
|
|
void Construct( const FArguments& InArgs );
|
|
|
|
/**
|
|
* Sets the number of selected engine instances.
|
|
*
|
|
* @param Count Number of selected instances.
|
|
*/
|
|
void SetNumSelectedInstances( int Count );
|
|
|
|
protected:
|
|
|
|
/**
|
|
* Submits the entered command.
|
|
*/
|
|
void SubmitCommand( const FString& Command );
|
|
|
|
private:
|
|
|
|
// Handles changing the input text box's content.
|
|
void HandleInputTextChanged( const FText& InText );
|
|
|
|
// Handles committing the input text box's content.
|
|
void HandleInputTextCommitted( const FText& InText, ETextCommit::Type CommitInfo );
|
|
|
|
// Handles showing a history in the input text box.
|
|
void HandleInputTextShowingHistory( TArray<FString>& OutHistory );
|
|
|
|
// Handles showing suggestions in the input text box.
|
|
void HandleInputTextShowingSuggestions( const FString& Text, TArray<FString>& OutSuggestions );
|
|
|
|
//Handles clicking the promote to shortcut button
|
|
FReply HandlePromoteToShortcutButtonClicked( );
|
|
|
|
// Handles clicking the send button.
|
|
FReply HandleSendButtonClicked( );
|
|
|
|
private:
|
|
|
|
// Holds the command history.
|
|
TArray<FString> CommandHistory;
|
|
|
|
// Holds the input text box.
|
|
TSharedPtr<SSuggestionTextBox> InputTextBox;
|
|
|
|
// Holds the send button.
|
|
TSharedPtr<SButton> SendButton;
|
|
|
|
// Holds the promote to shortcut button.
|
|
TSharedPtr<SButton> PromoteToShortcutButton;
|
|
|
|
private:
|
|
|
|
// Holds a delegate that is executed when a command is submitted.
|
|
FOnSessionConsoleCommandSubmitted OnCommandSubmitted;
|
|
|
|
// Holds a delegate that is executed when the Promote To Shortcut button is clicked.
|
|
FOnSessionConsoleCommandSubmitted OnPromoteToShortcutClicked;
|
|
};
|