Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…rque3D into NilsUI_Updates_GuiClassTweaks
  • Loading branch information
Areloch committed Sep 5, 2023
2 parents d0f914b + 1f9cc0d commit 24c758d
Show file tree
Hide file tree
Showing 58 changed files with 98 additions and 62 deletions.
28 changes: 23 additions & 5 deletions Engine/source/console/console.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,9 @@ bool alwaysUseDebugOutput = true;
bool useTimestamp = false;
bool useRealTimestamp = false;

static U32 initTime = Platform::getRealMilliseconds();
U32 startTime = initTime;

ConsoleFunctionGroupBegin( Clipboard, "Miscellaneous functions to control the clipboard and clear the console.");

DefineEngineFunction( cls, void, (), , "()"
Expand All @@ -327,14 +330,28 @@ DefineEngineFunction( getClipboard, const char*, (), , "()"
};

DefineEngineFunction( setClipboard, bool, (const char* text), , "(string text)"
"@brief Set the system clipboard.\n\n"
"@brief Set the system clipboard.\n\n"
"@internal")
{
return Platform::setClipboard(text);
};

ConsoleFunctionGroupEnd( Clipboard );

DefineEngineFunction( resetTimeStamp, void, (), , "()"
"@brief Reset the timestamp to 0 ms.\n\n"
"@ingroup Console")
{
startTime = Platform::getRealMilliseconds();
};

DefineEngineFunction( getInitTime, int, (), , "()"
"@brief Get the initialization time in miliseconds.\n\n"
"@internal")
{
return initTime;
};


void postConsoleInput( RawData data );

Expand Down Expand Up @@ -644,7 +661,7 @@ static void _printf(ConsoleLogEntry::Level level, ConsoleLogEntry::Type type, co
{
if (!active)
return;
Con::active = false;
Con::active = false;

char buffer[8192] = {};
U32 offset = 0;
Expand All @@ -664,16 +681,15 @@ static void _printf(ConsoleLogEntry::Level level, ConsoleLogEntry::Type type, co

if (useTimestamp)
{
static U32 startTime = Platform::getRealMilliseconds();
U32 curTime = Platform::getRealMilliseconds() - startTime;
offset += dSprintf(buffer + offset, sizeof(buffer) - offset, "[+%4d.%03d]", U32(curTime * 0.001), curTime % 1000);
}

if (useTimestamp || useRealTimestamp) {
if (useTimestamp || useRealTimestamp)
{
offset += dSprintf(buffer + offset, sizeof(buffer) - offset, " ");
}


dVsprintf(buffer + offset, sizeof(buffer) - offset, fmt, argptr);

for(S32 i = 0; i < gConsumers.size(); i++)
Expand Down Expand Up @@ -2652,3 +2668,5 @@ void ConsoleStackFrameSaver::restore()
gCallStack.popFrame();
}
}

//------------------------------------------------------------------------------
2 changes: 2 additions & 0 deletions Engine/source/core/color.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ const ColorI ColorI::BLACK( 0, 0, 0 );
const ColorI ColorI::RED( 255, 0, 0 );
const ColorI ColorI::GREEN( 0, 255, 0 );
const ColorI ColorI::BLUE( 0, 0, 255 );
const ColorI ColorI::DARK(24, 24, 24);
const ColorI ColorI::LIGHT(120, 120, 120);

#include "console/console.h"
#include "console/consoleTypes.h"
Expand Down
2 changes: 2 additions & 0 deletions Engine/source/core/color.h
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,8 @@ class ColorI
static const ColorI RED;
static const ColorI GREEN;
static const ColorI BLUE;
static const ColorI LIGHT;
static const ColorI DARK;
};

//-----------------------------------------------------------------------------
Expand Down
Binary file modified Templates/BaseGame/game/core/gui/images/button.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Templates/BaseGame/game/core/gui/images/checkbox.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Templates/BaseGame/game/core/gui/images/group-border.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Templates/BaseGame/game/core/gui/images/inactive-overlay.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Templates/BaseGame/game/core/gui/images/scrollBar.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Templates/BaseGame/game/core/gui/images/slider.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Templates/BaseGame/game/core/gui/images/textEdit.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Templates/BaseGame/game/core/gui/images/window.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions Templates/BaseGame/game/core/gui/scripts/profiles.tscript
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@ new GuiControlProfile(GuiMenuScrollProfile)
bitmapAsset = "Core_GUI:scrollBar_image";
hasBitmapArray = true;
category = "Core";
fontSize = 15;
};

if(!isObject(GuiOverlayProfile))
Expand Down
Binary file modified Templates/BaseGame/game/core/postFX/images/inactive-overlay.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
26 changes: 13 additions & 13 deletions Templates/BaseGame/game/data/UI/guis/loadingGui.gui
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ $guiContent = new GuiChunkedBitmapCtrl(LoadingGui) {

new GuiControl() {
position = "263 301";
extent = "497 166";
extent = "360 360";
minExtent = "8 8";
horizSizing = "center";
vertSizing = "center";
Expand All @@ -36,11 +36,11 @@ $guiContent = new GuiChunkedBitmapCtrl(LoadingGui) {
canSaveDynamicFields = "0";

new GuiBitmapCtrl() {
bitmapAsset = "UI:panel_image";
bitmapAsset = "UI:backgrounddark_image";
color = "255 255 255 255";
wrap = "0";
position = "0 0";
extent = "497 166";
extent = "360 360";
minExtent = "8 2";
horizSizing = "right";
vertSizing = "bottom";
Expand All @@ -57,11 +57,11 @@ $guiContent = new GuiChunkedBitmapCtrl(LoadingGui) {
bitmapAsset = "UI:Torque_3D_logo_alt_image";
color = "255 255 255 255";
wrap = "0";
position = "27 6";
extent = "443 139";
position = "0 0";
extent = "360 360";
minExtent = "8 2";
horizSizing = "center";
vertSizing = "bottom";
vertSizing = "center";
profile = "GuiDefaultProfile";
visible = "1";
active = "1";
Expand All @@ -79,11 +79,11 @@ $guiContent = new GuiChunkedBitmapCtrl(LoadingGui) {
anchorBottom = "0";
anchorLeft = "1";
anchorRight = "0";
position = "17 126";
extent = "464 24";
position = "30 320";
extent = "300 24";
minExtent = "8 2";
horizSizing = "center";
vertSizing = "bottom";
horizSizing = "width";
vertSizing = "top";
profile = "GuiProgressBitmapProfile";
visible = "1";
active = "1";
Expand All @@ -102,11 +102,11 @@ $guiContent = new GuiChunkedBitmapCtrl(LoadingGui) {
anchorBottom = "0";
anchorLeft = "1";
anchorRight = "0";
position = "28 144";
extent = "440 20";
position = "0 340";
extent = "360 20";
minExtent = "8 8";
horizSizing = "center";
vertSizing = "bottom";
vertSizing = "top";
profile = "GuiMenuTextProfile";
visible = "1";
active = "1";
Expand Down
23 changes: 21 additions & 2 deletions Templates/BaseGame/game/data/UI/guis/mainMenu.gui
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,30 @@ $guiContent = new GuiChunkedBitmapCtrl(MainMenuGui) {
isContainer = "1";
superClass = "UINavigation";
canSaveDynamicFields = "0";

new GuiBitmapCtrl(SideBackgroundImage) {
bitmapAsset = "UI:menu_side_background_image";
color = "255 255 255 255";
wrap = "0";
position = "0 0";
extent = "900 600";
minExtent = "8 2";
horizSizing = "right";
vertSizing = "top";
profile = "GuiDefaultProfile";
visible = "1";
active = "1";
tooltipProfile = "GuiToolTipProfile";
hovertime = "1000";
isContainer = "0";
canSave = "1";
canSaveDynamicFields = "0";
};

new GuiBitmapCtrl(MainMenuAppLogo) {
BitmapAsset = "UI:Torque_3D_logo_alt_image";
BitmapAsset = "UI:Torque_3D_logo_image";
position = "550 30";
extent = "443 139";
extent = "360 100";
horizSizing = "left";
profile = "GuiDefaultProfile";
tooltipProfile = "GuiToolTipProfile";
Expand Down
4 changes: 2 additions & 2 deletions Templates/BaseGame/game/data/UI/guis/startupGui.tscript
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ function loadStartup()
// be in consecutive numerical order
StartupGui.bitmap[0] = "UI:backgrounddark_image";
StartupGui.logo[0] = "UI:Torque_3D_logo_alt_image";
StartupGui.logoPos[0] = "178 251";
StartupGui.logoExtent[0] = "443 139";
StartupGui.logoPos[0] = "220 120";
StartupGui.logoExtent[0] = "360 360";

// Call the next() function to set our firt
// splash screen
Expand Down
Binary file modified Templates/BaseGame/game/data/UI/images/Torque_3D_logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Templates/BaseGame/game/data/UI/images/backgrounddark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Templates/BaseGame/game/data/UI/images/buttontab.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Templates/BaseGame/game/data/UI/images/chatHudBorderArray.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
<ImageAsset
canSave="true"
canSaveDynamicFields="true"
AssetName="clear_btn_d_image"
imageFile="@assetFile=clear-btn_d.png"
UseMips="true"
isHDRImage="false"
imageType="Albedo" />
AssetName="clearbtn_d_image"
imageFile="@assetFile=clear_btn_d.png"/>
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
<ImageAsset
canSave="true"
canSaveDynamicFields="true"
AssetName="clear_btn_h_image"
imageFile="@assetFile=clear-btn_h.png"
UseMips="true"
isHDRImage="false"
imageType="Albedo" />
AssetName="clearbtn_h_image"
imageFile="@assetFile=clear_btn_h.png"/>
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
<ImageAsset
canSave="true"
canSaveDynamicFields="true"
AssetName="clear_btn_n_image"
imageFile="@assetFile=clear-btn_n.png"
UseMips="true"
isHDRImage="false"
imageType="Albedo" />
AssetName="clearbtn_n_image"
imageFile="@assetFile=clear_btn_n.png"/>

This file was deleted.

This file was deleted.

This file was deleted.

Binary file modified Templates/BaseGame/game/data/UI/images/dropDown.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Templates/BaseGame/game/data/UI/images/group_border.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Templates/BaseGame/game/data/UI/images/menuSlider.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<ImageAsset
canSave="true"
canSaveDynamicFields="true"
AssetName="menu_image"
imageFile="@assetFile=menu.png"
UseMips="true"
isHDRImage="false"
imageType="Albedo" />
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<ImageAsset
canSave="true"
canSaveDynamicFields="true"
AssetName="menu_side_background_image"
imageFile="@assetFile=menu_side_background.png"
UseMips="true"
isHDRImage="false"
imageType="Albedo" />
Binary file modified Templates/BaseGame/game/data/UI/images/nextbutton_d.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Templates/BaseGame/game/data/UI/images/nextbutton_h.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Templates/BaseGame/game/data/UI/images/nextbutton_n.png
Binary file modified Templates/BaseGame/game/data/UI/images/numericslider.png
Binary file modified Templates/BaseGame/game/data/UI/images/previousbutton_d.png
Binary file modified Templates/BaseGame/game/data/UI/images/previousbutton_h.png
Binary file modified Templates/BaseGame/game/data/UI/images/previousbutton_n.png
Binary file modified Templates/BaseGame/game/data/UI/images/radioButton.png
Binary file modified Templates/BaseGame/game/data/UI/images/scrollBar.png
Binary file modified Templates/BaseGame/game/data/UI/images/separatorh.png
Binary file modified Templates/BaseGame/game/data/UI/images/separatorv.png
Binary file modified Templates/BaseGame/game/data/UI/images/sliderwbox.png
Binary file modified Templates/BaseGame/game/data/UI/images/tab.png
Binary file modified Templates/BaseGame/game/data/UI/images/tab_border.png
Binary file modified Templates/BaseGame/game/data/UI/images/textEdit.png
Binary file modified Templates/BaseGame/game/data/UI/images/textEditSliderBox.png
Binary file modified Templates/BaseGame/game/data/UI/images/window.png
22 changes: 12 additions & 10 deletions Templates/BaseGame/game/data/UI/scripts/profiles.tscript
Original file line number Diff line number Diff line change
Expand Up @@ -95,11 +95,11 @@ new GuiControlProfile( GuiMenuButtonProfile )
fontColorNA = $TextDisabledColor;
fontColorSEL = $TextMediumEmphasisColor;
fillColor = "40 40 40";
fillColorHL = "56 56 56";
fillColorHL = "49 34 37";
fillColorNA = "40 40 40";
borderColor = "87 87 87";
borderColorNA = "0 0 0";
borderColorHL = "255 255 255";
borderColorHL = "194 64 64";
fixedExtent = false;
justify = "center";
canKeyFocus = false;
Expand Down Expand Up @@ -366,16 +366,17 @@ new GuiControlProfile( GuiPopUpMenuDefault : GuiDefaultProfile )
border = 0;
borderThickness = 0;
fixedExtent = true;
bitmapAsset = "UI:scrollBar_image";
hasBitmapArray = true;

fillColor = EditorSettings.value("Theme/fieldBGColor");//"255 255 255";//100
fillColorHL = EditorSettings.value("Theme/fieldBGHLColor");//"91 101 116";
fillColorSEL = EditorSettings.value("Theme/fieldBGSELColor");//"91 101 116";
fontColor = EditorSettings.value("Theme/fieldTextColor");//"215 215 215";
fontColorHL = EditorSettings.value("Theme/fieldTextHLColor");//"215 215 215";
fontColorSEL = EditorSettings.value("Theme/fieldTextSELColor");//"215 215 215";
fontColorNA = EditorSettings.value("Theme/fieldTextColor");//"215 215 215";
borderColor = EditorSettings.value("Theme/dividerDarkColor");
profileForChildren = GuiPopupMenuItemBorder;
fillColor = "242 241 240 ";//"255 255 255";//100
fillColorHL = "228 228 235 ";//"204 203 202";
fillColorSEL = "98 100 137 ";//"204 203 202";
// font color is black
fontColorHL = "0 0 0 ";//"0 0 0";
fontColorSEL = "255 255 255";//"0 0 0";
borderColor = "100 100 100";
category = "Core";
};

Expand Down Expand Up @@ -552,4 +553,5 @@ singleton GuiControlProfile(SliderBitmapGUIProfile)
bitmapAsset = "UI:optionsMenuSliderBitmapArray_image";
hasBitmapArray = true;
opaque = false;
borderColor = "0 0 0 255";
};

0 comments on commit 24c758d

Please sign in to comment.