mirror of
https://github.com/Ed94/Cog.git
synced 2026-08-03 14:18:46 +00:00
Add build info separator
This commit is contained in:
@@ -86,7 +86,12 @@ void FCogEngineWindow_BuildInfo::RenderContent()
|
|||||||
|
|
||||||
FCogWidgets::SetNextItemToShortWidth();
|
FCogWidgets::SetNextItemToShortWidth();
|
||||||
ImGui::SliderInt("Rounding", &Config->Rounding, 0, 12);
|
ImGui::SliderInt("Rounding", &Config->Rounding, 0, 12);
|
||||||
|
|
||||||
|
if (FCogWidgets::InputText("Separator", Config->Separator))
|
||||||
|
{
|
||||||
|
BuildText();
|
||||||
|
}
|
||||||
|
|
||||||
constexpr ImGuiColorEditFlags ColorEditFlags = ImGuiColorEditFlags_NoInputs | ImGuiColorEditFlags_AlphaPreviewHalf;
|
constexpr ImGuiColorEditFlags ColorEditFlags = ImGuiColorEditFlags_NoInputs | ImGuiColorEditFlags_AlphaPreviewHalf;
|
||||||
FCogImguiHelper::ColorEdit4("Background Color", Config->BackgroundColor, ColorEditFlags);
|
FCogImguiHelper::ColorEdit4("Background Color", Config->BackgroundColor, ColorEditFlags);
|
||||||
FCogImguiHelper::ColorEdit4("Border Color", Config->BorderColor, ColorEditFlags);
|
FCogImguiHelper::ColorEdit4("Border Color", Config->BorderColor, ColorEditFlags);
|
||||||
@@ -104,14 +109,18 @@ void FCogEngineWindow_BuildInfo::RenderContent()
|
|||||||
void FCogEngineWindow_BuildInfo::BuildText()
|
void FCogEngineWindow_BuildInfo::BuildText()
|
||||||
{
|
{
|
||||||
FStringBuilderBase S;
|
FStringBuilderBase S;
|
||||||
if (Config->ShowBranchName) { S.Append(BuildSettings::GetBranchName()); S.Append(" "); }
|
bool AddSeparator = false;
|
||||||
if (Config->ShowBuildDate) { S.Append(BuildSettings::GetBuildDate()); S.Append(" "); }
|
|
||||||
if (Config->ShowBuildConfiguration) { S.Append(LexToString(FApp::GetBuildConfiguration())); S.Append(" "); }
|
|
||||||
if (Config->ShowBuildTargetType) { S.Append(LexToString(FApp::GetBuildTargetType())); S.Append(" "); }
|
|
||||||
if (Config->ShowBuildUser) { S.Append(BuildSettings::GetBuildUser()); S.Append(" "); }
|
|
||||||
if (Config->ShowBuildMachine) { S.Append(BuildSettings::GetBuildMachine()); S.Append(" "); }
|
|
||||||
if (Config->ShowCurrentChangelist) { S.Appendf(TEXT("%d"), BuildSettings::GetCurrentChangelist()); S.Append(" "); }
|
|
||||||
if (Config->ShowCompatibleChangelist) { S.Appendf(TEXT("%d"),BuildSettings::GetCompatibleChangelist()); }
|
|
||||||
|
|
||||||
Text = FString(S).TrimEnd();
|
if (Config->ShowBranchName) { S.Append(BuildSettings::GetBranchName()); S.Append(Config->Separator); }
|
||||||
|
if (Config->ShowBuildDate) { S.Append(BuildSettings::GetBuildDate()); S.Append(Config->Separator); }
|
||||||
|
if (Config->ShowBuildConfiguration) { S.Append(LexToString(FApp::GetBuildConfiguration())); S.Append(Config->Separator); }
|
||||||
|
if (Config->ShowBuildTargetType) { S.Append(LexToString(FApp::GetBuildTargetType())); S.Append(Config->Separator); }
|
||||||
|
if (Config->ShowBuildUser) { S.Append(BuildSettings::GetBuildUser()); S.Append(Config->Separator); }
|
||||||
|
if (Config->ShowBuildMachine) { S.Append(BuildSettings::GetBuildMachine()); S.Append(Config->Separator); }
|
||||||
|
if (Config->ShowCurrentChangelist) { S.Appendf(TEXT("%d"), BuildSettings::GetCurrentChangelist()); S.Append(Config->Separator); }
|
||||||
|
if (Config->ShowCompatibleChangelist) { S.Appendf(TEXT("%d"),BuildSettings::GetCompatibleChangelist()); S.Append(Config->Separator); }
|
||||||
|
|
||||||
|
S.RemoveSuffix(Config->Separator.Len());
|
||||||
|
|
||||||
|
Text = FString(S);
|
||||||
}
|
}
|
||||||
@@ -79,6 +79,9 @@ public:
|
|||||||
|
|
||||||
UPROPERTY(Config)
|
UPROPERTY(Config)
|
||||||
int32 Rounding = 6;
|
int32 Rounding = 6;
|
||||||
|
|
||||||
|
UPROPERTY(Config)
|
||||||
|
FString Separator = "|";
|
||||||
|
|
||||||
UPROPERTY(Config)
|
UPROPERTY(Config)
|
||||||
FColor BackgroundColor = FColor(0, 0, 0, 80);
|
FColor BackgroundColor = FColor(0, 0, 0, 80);
|
||||||
@@ -107,6 +110,7 @@ public:
|
|||||||
Alignment = { 0, 1 };
|
Alignment = { 0, 1 };
|
||||||
Padding = { 10, 10 };
|
Padding = { 10, 10 };
|
||||||
Rounding = 6;
|
Rounding = 6;
|
||||||
|
Separator = " | ";
|
||||||
BackgroundColor = FColor(0, 0, 0, 80);
|
BackgroundColor = FColor(0, 0, 0, 80);
|
||||||
BorderColor = FColor(255, 255, 255, 50);
|
BorderColor = FColor(255, 255, 255, 50);
|
||||||
TextColor = FColor(255, 255, 255, 100);
|
TextColor = FColor(255, 255, 255, 100);
|
||||||
|
|||||||
Reference in New Issue
Block a user