Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions Engine/source/console/consoleFunctions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2803,6 +2803,21 @@ DefineEngineFunction(getTimestamp, const char*, (), ,
return returnBuffer;
}

//-----------------------------------------------------------------------------

// Define the console function to get environment variable value
// like: USERNAME, SystemDrive, LOCALAPPDATA etc.
DefineEngineFunction(getEnvironment, const char*, (const char* variableName), ,
"Get the value of an environment variable.\n"
"@param variableName The name of the environment variable.\n"
"@return The value of the environment variable or an empty string if not set.")
{
const char* value = std::getenv(variableName); // Retrieve the environment variable
return value ? value : ""; // Return the value or an empty string if not found
}

//-----------------------------------------------------------------------------

#ifdef TORQUE_TOOLS_EXT_COMMANDS
DefineEngineFunction(systemCommand, S32, (const char* commandLineAction, const char* callBackFunction), (""), "")
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -404,6 +404,14 @@ function ESettingsWindow::getShapeEditorSettings(%this)

function ESettingsWindow::getThemeSettings(%this)
{
SettingsInspector.startGroup("Font");
SettingsInspector.addSettingsField("Theme/editorFont", "Editor font ( if installed | restart required )", "list", "Font used for most of the text used in the editor.",
"Open Sans,Arial,Segoe UI");
SettingsInspector.addSettingsField("Theme/codeFont", "Code font ( if installed | restart required )", "list", "Font used for diplaying code.",
"Lucida Console,Cascadia Code,Consolas");
SettingsInspector
SettingsInspector.endGroup();

SettingsInspector.startGroup("Colors");
SettingsInspector.addSettingsField("Theme/headerColor", "Headerbar Color", "ColorI", "");
SettingsInspector.addSettingsField("Theme/windowBackgroundColor", "Window Background Color", "ColorI", "");
Expand Down
Loading