mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-04-24 13:55:34 +00:00
Merge pull request #1879 from Azaezel/sRGBSwatch
colorPicker/swatch srgb display.
This commit is contained in:
commit
b19aba2e54
7 changed files with 162 additions and 41 deletions
|
|
@ -718,6 +718,22 @@
|
|||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
};
|
||||
new GuiCheckBoxCtrl() {
|
||||
text = "use sRGB";
|
||||
groupNum = "-1";
|
||||
buttonType = "ToggleButton";
|
||||
useMouseEvents = "0";
|
||||
position = "360 105";
|
||||
extent = "66 16";
|
||||
minExtent = "8 2";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
profile = "GuiCheckBoxProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
variable = "$displayAsSRGB";
|
||||
command = "useSRGBctrl($displayAsSRGB);";
|
||||
};
|
||||
};
|
||||
};
|
||||
//--- OBJECT WRITE END ---
|
||||
|
|
@ -727,6 +743,15 @@ $ColorPickerCancelCallback = "";
|
|||
$ColorPickerUpdateCallback = "";
|
||||
$ColorCallbackType = 1; // ColorI
|
||||
|
||||
function useSRGBctrl(%colorScale)
|
||||
{
|
||||
ColorPickerDlg.useSRGB = %colorScale;
|
||||
ColorRangeSelect.useSRGB = %colorScale;
|
||||
ColorBlendSelect.useSRGB = %colorScale;
|
||||
myColor.useSRGB = %colorScale;
|
||||
oldColor.useSRGB = %colorScale;
|
||||
}
|
||||
|
||||
// This function pushes the color picker dialog and returns to a callback the selected value
|
||||
function GetColorI( %currentColor, %callback, %root, %updateCallback, %cancelCallback )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -718,6 +718,22 @@
|
|||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
};
|
||||
new GuiCheckBoxCtrl() {
|
||||
text = "use sRGB";
|
||||
groupNum = "-1";
|
||||
buttonType = "ToggleButton";
|
||||
useMouseEvents = "0";
|
||||
position = "360 105";
|
||||
extent = "66 16";
|
||||
minExtent = "8 2";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
profile = "GuiCheckBoxProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
variable = "$displayAsSRGB";
|
||||
command = "useSRGBctrl($displayAsSRGB);";
|
||||
};
|
||||
};
|
||||
};
|
||||
//--- OBJECT WRITE END ---
|
||||
|
|
@ -727,6 +743,15 @@ $ColorPickerCancelCallback = "";
|
|||
$ColorPickerUpdateCallback = "";
|
||||
$ColorCallbackType = 1; // ColorI
|
||||
|
||||
function useSRGBctrl(%colorScale)
|
||||
{
|
||||
ColorPickerDlg.useSRGB = %colorScale;
|
||||
ColorRangeSelect.useSRGB = %colorScale;
|
||||
ColorBlendSelect.useSRGB = %colorScale;
|
||||
myColor.useSRGB = %colorScale;
|
||||
oldColor.useSRGB = %colorScale;
|
||||
}
|
||||
|
||||
// This function pushes the color picker dialog and returns to a callback the selected value
|
||||
function GetColorI( %currentColor, %callback, %root, %updateCallback, %cancelCallback )
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue