Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7 from kbengine/master
merge
- Loading branch information
Showing
627 changed files
with
38,714 additions
and
21,119 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
62 changes: 62 additions & 0 deletions
62
kbe/res/sdk_templates/client/ue4/Source/KBEnginePlugins/Engine/ClientSDKUpdateUI.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
#include "ClientSDKUpdateUI.h" | ||
#include "Engine.h" | ||
#include "KBEvent.h" | ||
#include "KBEngine.h" | ||
#include "KBEventTypes.h" | ||
#include "SlateOptMacros.h" | ||
|
||
BEGIN_SLATE_FUNCTION_BUILD_OPTIMIZATION | ||
void SClientSDKUpdateUI::Construct(const FArguments& args) | ||
{ | ||
FTextBlockStyle textStyle = FCoreStyle::Get().GetWidgetStyle< FTextBlockStyle >("NormalText"); | ||
textStyle.SetFont(FSlateFontInfo("Veranda", 26)); | ||
textStyle.SetColorAndOpacity(FLinearColor::White); | ||
|
||
ChildSlot | ||
[ | ||
SNew(SOverlay) | ||
/*+ SOverlay::Slot() | ||
.HAlign(HAlign_Center) | ||
.VAlign(VAlign_Top) | ||
[ | ||
SNew(STextBlock) | ||
.ColorAndOpacity(FLinearColor::White) | ||
.ShadowColorAndOpacity(FLinearColor::Black) | ||
.ShadowOffset(FIntPoint(-1, 1)) | ||
.Font(FSlateFontInfo("Arial", 26)) | ||
.Text(FText::FromString("Main Menu")) | ||
]*/ | ||
+ SOverlay::Slot() | ||
.HAlign(HAlign_Center) | ||
.VAlign(VAlign_Center) | ||
[ | ||
SNew(SVerticalBox) | ||
+ SVerticalBox::Slot() | ||
.Padding(20) | ||
[ | ||
SNew(SButton) | ||
.Text(FText::FromString("Update SDK")) | ||
.TextStyle(&textStyle) | ||
.ContentPadding(FMargin(30.0, 15.0)) | ||
.ButtonColorAndOpacity(FLinearColor::Green) | ||
.HAlign(HAlign_Center) | ||
.VAlign(VAlign_Top) | ||
.OnClicked(this, &SClientSDKUpdateUI::UpdateSDKClicked) | ||
] | ||
] | ||
]; | ||
} | ||
END_SLATE_FUNCTION_BUILD_OPTIMIZATION | ||
|
||
FReply SClientSDKUpdateUI::UpdateSDKClicked() | ||
{ | ||
if (GEngine) | ||
{ | ||
GEngine->AddOnScreenDebugMessage(-1, 3.f, FColor::Yellow, TEXT("Update SDK!")); | ||
} | ||
|
||
UKBEventData_onDownloadSDK* pEventData = NewObject<UKBEventData_onDownloadSDK>(); | ||
pEventData->isDownload = true; | ||
KBENGINE_EVENT_FIRE(KBEngine::KBEventTypes::onDownloadSDK, pEventData); | ||
return FReply::Handled(); | ||
} |
19 changes: 19 additions & 0 deletions
19
kbe/res/sdk_templates/client/ue4/Source/KBEnginePlugins/Engine/ClientSDKUpdateUI.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#pragma once | ||
|
||
#include "KBEnginePluginsPrivatePCH.h" | ||
|
||
|
||
class KBENGINEPLUGINS_API SClientSDKUpdateUI : public SCompoundWidget | ||
{ | ||
|
||
public: | ||
SLATE_BEGIN_ARGS(SClientSDKUpdateUI){} | ||
|
||
SLATE_END_ARGS() | ||
|
||
void Construct(const FArguments& args); | ||
|
||
FReply UpdateSDKClicked(); | ||
|
||
|
||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.