mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-15 00:24:40 +00:00
Merge branch 'BaseUIUpdateWipwork_20231219' of https://github.com/Areloch/Torque3D into development
This commit is contained in:
commit
6e101595d6
76 changed files with 4162 additions and 6304 deletions
|
|
@ -52,7 +52,7 @@ new GuiControlProfile(GuiConsoleTextProfile)
|
|||
category = "Core";
|
||||
};
|
||||
|
||||
$ConsoleDefaultFillColor = "12 14 19 175";
|
||||
$ConsoleDefaultFillColor = "0 0 0 175";
|
||||
|
||||
if(!isObject(ConsoleScrollProfile))
|
||||
new GuiControlProfile(ConsoleScrollProfile : GuiScrollProfile)
|
||||
|
|
|
|||
|
|
@ -147,25 +147,31 @@ new GuiControlProfile(GuiTextEditProfile)
|
|||
category = "Core";
|
||||
};
|
||||
|
||||
if(!isObject(GuiMenuScrollProfile))
|
||||
new GuiControlProfile(GuiMenuScrollProfile)
|
||||
if(!isObject(GuiScrollProfile))
|
||||
new GuiControlProfile(GuiScrollProfile)
|
||||
{
|
||||
opaque = true;
|
||||
fontColor = $TextMediumEmphasisColor;
|
||||
fontColorHL = $TextMediumEmphasisColor;
|
||||
fontColorNA = $TextDisabledColor;
|
||||
fontColorSEL = $TextMediumEmphasisColor;
|
||||
fillColor = "40 40 40";
|
||||
opaque = "0";
|
||||
fontColor = "200 200 200 255";
|
||||
fontColorHL = "200 200 200 255";
|
||||
fontColorNA = "108 108 108 255";
|
||||
fontColorSEL = "200 200 200 255";
|
||||
fillColor = "0 0 0 0";
|
||||
fillColorHL = "56 56 56";
|
||||
fillColorNA = "40 40 40";
|
||||
borderColor = "87 87 87";
|
||||
borderColorNA = "0 0 0";
|
||||
borderColorHL = "255 255 255";
|
||||
border = true;
|
||||
border = "0";
|
||||
bitmapAsset = "Core_GUI:scrollBar_image";
|
||||
hasBitmapArray = true;
|
||||
category = "Core";
|
||||
fontSize = 15;
|
||||
fontColors[0] = "200 200 200 255";
|
||||
fontColors[1] = "200 200 200 255";
|
||||
fontColors[2] = "108 108 108 255";
|
||||
fontColors[3] = "200 200 200 255";
|
||||
fontColors[8] = "Fuchsia";
|
||||
fontColors[9] = "255 0 255 255";
|
||||
};
|
||||
|
||||
if(!isObject(GuiOverlayProfile))
|
||||
|
|
@ -261,3 +267,24 @@ new GuiControlProfile(GuiScrollProfile)
|
|||
bitmapAsset = "Core_GUI:scrollBar_image";
|
||||
category = "Core";
|
||||
};
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
singleton GuiControlProfile( GuiInputCtrlProfile )
|
||||
{
|
||||
tab = true;
|
||||
canKeyFocus = true;
|
||||
category = "Core";
|
||||
};
|
||||
|
||||
singleton GuiControlProfile (GuiTextProfile)
|
||||
{
|
||||
justify = "left";
|
||||
fontColor = "20 20 20";
|
||||
category = "Core";
|
||||
};
|
||||
|
||||
singleton GuiControlProfile (GuiTextRightProfile : GuiTextProfile)
|
||||
{
|
||||
justify = "right";
|
||||
category = "Core";
|
||||
};
|
||||
File diff suppressed because it is too large
Load diff
|
|
@ -7,7 +7,7 @@ function Core_SFX::onCreate(%this)
|
|||
exec("./scripts/audioDescriptions." @ $TorqueScriptFileExtension);
|
||||
exec("./scripts/audioEnvironments." @ $TorqueScriptFileExtension);
|
||||
exec("./scripts/audioStates." @ $TorqueScriptFileExtension);
|
||||
|
||||
exec("./scripts/audioOptions." @ $TorqueScriptFileExtension);
|
||||
}
|
||||
|
||||
function Core_SFX::onDestroy(%this)
|
||||
|
|
|
|||
103
Templates/BaseGame/game/core/sfx/scripts/audioOptions.tscript
Normal file
103
Templates/BaseGame/game/core/sfx/scripts/audioOptions.tscript
Normal file
|
|
@ -0,0 +1,103 @@
|
|||
new SimGroup(AudioSettingsGroup)
|
||||
{
|
||||
class = "PrimaryOptionsGroup";
|
||||
displayName = "Audio";
|
||||
|
||||
new SimGroup()
|
||||
{
|
||||
class = "SubOptionsGroup";
|
||||
displayName = "Audio Devices";
|
||||
|
||||
new SimGroup(AudioSettingsProviderGroup)
|
||||
{
|
||||
class = "AudioOptionsSettings";
|
||||
|
||||
OptionName = "Audio Provider";
|
||||
Description = "";
|
||||
};
|
||||
|
||||
new SimGroup(AudioSettingsDeviceGroup)
|
||||
{
|
||||
class = "AudioOptionsSettings";
|
||||
|
||||
OptionName = "Audio Device";
|
||||
Description = "";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
function AudioSettingsGroup::populateSettings(%this)
|
||||
{
|
||||
AudioSettingsProviderGroup.clear();
|
||||
AudioSettingsDeviceGroup.clear();
|
||||
|
||||
%buffer = sfxGetAvailableDevices();
|
||||
%count = getRecordCount( %buffer );
|
||||
|
||||
for(%i = 0; %i < %count; %i++)
|
||||
{
|
||||
%record = getRecord(%buffer, %i);
|
||||
%provider = getField(%record, 0);
|
||||
%device = getField(%record, 1);
|
||||
|
||||
//When the client is actually running, we don't care about null audo devices
|
||||
if(%provider $= "null")
|
||||
continue;
|
||||
|
||||
//We can't have duplicate providers, so double check for uniqueness
|
||||
%foundProvider = false;
|
||||
foreach(%registeredProviders in AudioSettingsProviderGroup)
|
||||
{
|
||||
if(%registeredProviders.displayName $= %provider)
|
||||
{
|
||||
%foundProvider = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if(!%foundProvider)
|
||||
{
|
||||
//Provider entry
|
||||
%providerEntry = new ArrayObject()
|
||||
{
|
||||
class = "OptionsQualityLevel";
|
||||
displayName = %provider;
|
||||
key["$pref::SFX::provider"] = %provider;
|
||||
};
|
||||
|
||||
AudioSettingsProviderGroup.add(%providerEntry);
|
||||
}
|
||||
|
||||
//Device Entry
|
||||
%deviceEntry = new ArrayObject()
|
||||
{
|
||||
class = "OptionsQualityLevel";
|
||||
displayName = %device;
|
||||
provider = %provider; //this is for filtering later, if we need to
|
||||
key["$pref::SFX::device"] = %device;
|
||||
};
|
||||
|
||||
AudioSettingsDeviceGroup.add(%deviceEntry);
|
||||
}
|
||||
}
|
||||
|
||||
function AudioSettingsProviderGroup::onApply(%this)
|
||||
{
|
||||
updateAudioOptionsSettings();
|
||||
}
|
||||
|
||||
function AudioSettingsDeviceGroup::onApply(%this)
|
||||
{
|
||||
updateAudioOptionsSettings();
|
||||
}
|
||||
|
||||
function updateAudioOptionsSettings()
|
||||
{
|
||||
if ( !sfxCreateDevice( $pref::SFX::provider,
|
||||
$pref::SFX::device,
|
||||
$pref::SFX::useHardware,
|
||||
-1 ) )
|
||||
error( "Unable to create SFX device: " @ $pref::SFX::provider
|
||||
SPC $pref::SFX::device
|
||||
SPC $pref::SFX::useHardware );
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue