Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add theme font options to editor settings & "InspectorTypeButtonProfile" profile #1324

Open
wants to merge 3 commits into
base: development
Choose a base branch
from
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 @@ -719,7 +719,7 @@
dstp += toLen;
scanp += len + fromLen;
}
return ret;

Check warning on line 722 in Engine/source/console/consoleFunctions.cpp

View workflow job for this annotation

GitHub Actions / Windows Latest MSVC

unreachable code [D:\a\Torque3D\Torque3D\build\Engine\source\Torque3D.vcxproj]
}

//-----------------------------------------------------------------------------
Expand Down Expand Up @@ -1059,7 +1059,7 @@

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

DefineEngineFunction(ColorFloatToInt, ColorI, (LinearColorF color), ,

Check warning on line 1062 in Engine/source/console/consoleFunctions.cpp

View workflow job for this annotation

GitHub Actions / MacOSX Latest Clang

'fnColorFloatToInt' has C-linkage specified, but returns user-defined type 'EngineTypeTraits<ColorI>::ReturnValueType' (aka 'ColorI') which is incompatible with C [-Wreturn-type-c-linkage]

Check warning on line 1062 in Engine/source/console/consoleFunctions.cpp

View workflow job for this annotation

GitHub Actions / MacOSX Latest Clang

'fnColorFloatToInt' has C-linkage specified, but returns user-defined type 'EngineTypeTraits<ColorI>::ReturnValueType' (aka 'ColorI') which is incompatible with C [-Wreturn-type-c-linkage]
"Convert from a float color to an integer color (0.0 - 1.0 to 0 to 255).\n"
"@param color Float color value to be converted in the form \"R G B A\", where R is red, G is green, B is blue, and A is alpha.\n"
"@return Converted color value (0 - 255)\n\n"
Expand All @@ -1071,7 +1071,7 @@
return color.toColorI();
}

DefineEngineFunction(ColorIntToFloat, LinearColorF, (ColorI color), ,

Check warning on line 1074 in Engine/source/console/consoleFunctions.cpp

View workflow job for this annotation

GitHub Actions / MacOSX Latest Clang

'fnColorIntToFloat' has C-linkage specified, but returns user-defined type 'EngineTypeTraits<LinearColorF>::ReturnValueType' (aka 'LinearColorF') which is incompatible with C [-Wreturn-type-c-linkage]

Check warning on line 1074 in Engine/source/console/consoleFunctions.cpp

View workflow job for this annotation

GitHub Actions / MacOSX Latest Clang

'fnColorIntToFloat' has C-linkage specified, but returns user-defined type 'EngineTypeTraits<LinearColorF>::ReturnValueType' (aka 'LinearColorF') which is incompatible with C [-Wreturn-type-c-linkage]
"Convert from a integer color to an float color (0 to 255 to 0.0 - 1.0).\n"
"@param color Integer color value to be converted in the form \"R G B A\", where R is red, G is green, B is blue, and A is alpha.\n"
"@return Converted color value (0.0 - 1.0)\n\n"
Expand Down Expand Up @@ -1109,7 +1109,7 @@
return Con::getReturnBuffer(s);
}

DefineEngineFunction(ColorHEXToRGB, ColorI, (const char* hex), ,

Check warning on line 1112 in Engine/source/console/consoleFunctions.cpp

View workflow job for this annotation

GitHub Actions / MacOSX Latest Clang

'fnColorHEXToRGB' has C-linkage specified, but returns user-defined type 'EngineTypeTraits<ColorI>::ReturnValueType' (aka 'ColorI') which is incompatible with C [-Wreturn-type-c-linkage]

Check warning on line 1112 in Engine/source/console/consoleFunctions.cpp

View workflow job for this annotation

GitHub Actions / MacOSX Latest Clang

'fnColorHEXToRGB' has C-linkage specified, but returns user-defined type 'EngineTypeTraits<ColorI>::ReturnValueType' (aka 'ColorI') which is incompatible with C [-Wreturn-type-c-linkage]
"Convert from a hex color value to an integer RGB (red, green, blue) color (00 - FF to 0 to 255).\n"
"@param hex Hex color value (#000000 - #FFFFFF) to be converted to an RGB (red, green, blue) value.\n"
"@return Integer color value to be converted in the form \"R G B A\", where R is red, G is green, B is blue, and A is alpha. Alpha isn't handled/converted so only pay attention to the RGB value\n\n"
Expand All @@ -1123,7 +1123,7 @@
return color;
}

DefineEngineFunction(ColorHSBToRGB, ColorI, (Point3I hsb), ,

Check warning on line 1126 in Engine/source/console/consoleFunctions.cpp

View workflow job for this annotation

GitHub Actions / MacOSX Latest Clang

'fnColorHSBToRGB' has C-linkage specified, but returns user-defined type 'EngineTypeTraits<ColorI>::ReturnValueType' (aka 'ColorI') which is incompatible with C [-Wreturn-type-c-linkage]

Check warning on line 1126 in Engine/source/console/consoleFunctions.cpp

View workflow job for this annotation

GitHub Actions / MacOSX Latest Clang

'fnColorHSBToRGB' has C-linkage specified, but returns user-defined type 'EngineTypeTraits<ColorI>::ReturnValueType' (aka 'ColorI') which is incompatible with C [-Wreturn-type-c-linkage]
"Convert from a HSB (hue, saturation, brightness) to an integer RGB (red, green, blue) color. HSB is also know as HSL or HSV as well, with the last letter standing for lightness or value.\n"
"@param hsb HSB (hue, saturation, brightness) value to be converted.\n"
"@return Integer color value to be converted in the form \"R G B A\", where R is red, G is green, B is blue, and A is alpha. Alpha isn't handled/converted so only pay attention to the RGB value\n\n"
Expand Down Expand Up @@ -2251,7 +2251,7 @@

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

DefineEngineFunction( generateUUID, Torque::UUID, (),,

Check warning on line 2254 in Engine/source/console/consoleFunctions.cpp

View workflow job for this annotation

GitHub Actions / MacOSX Latest Clang

'fngenerateUUID' has C-linkage specified, but returns user-defined type 'EngineTypeTraits<Torque::UUID>::ReturnValueType' (aka 'Torque::UUID') which is incompatible with C [-Wreturn-type-c-linkage]
"Generate a new universally unique identifier (UUID).\n\n"
"@return A newly generated UUID.\n\n"
"@ingroup Utilities" )
Expand Down Expand Up @@ -2803,6 +2803,21 @@
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
Loading