- Added ability to explicitly execute a guiControl's console and altConsole command

- Fixed formatting of resolution strings for the internal values, allowing them to be properly parsed and applied by the options menu/canvas
- Fixed display of Display Device on option's menu
- Fixed Issue of it not displaying any keybinds in keyboard/gamepad options if there's only a single actionmap
- Added 'hold to scroll' action to optionsMenu
- Added apply button to options menu
- Added remap button to options menu when on keyboard/gamepad keybinds categories
- Fixed up the remap logic so remapping a key only unbinds the matched device being bound, so binds for different devices are untouched
- Made keybinds options properly refresh when keybinds are changed
- Shifted keyboard "go" keybind for menu nav from Enter to Space for easier use
- Removed stick keybinds from gamepad
This commit is contained in:
Areloch 2023-12-31 12:46:48 -06:00
parent f5ab97242f
commit 67ac556ecd
14 changed files with 223 additions and 95 deletions

View file

@ -94,7 +94,7 @@ function configureCanvas()
if ($pref::Video::deviceMode != $Video::ModeFullscreen)
$pref::Video::FullScreen = false;
%modeStr = Canvas.prefsToModeStr();
echo("--------------");
echo("Attempting to set resolution to \"" @ %modeStr @ "\"");

View file

@ -9,9 +9,10 @@ function OptionsQualityLevel::isCurrent( %this )
%value = %this.getValue( %i );
if ( getVariable( %pref ) !$= %value )
{
return false;
}
}
return true;
}
@ -971,7 +972,7 @@ function VideoSettingsGroup::populateDisplaySettings(%this)
{
class = "OptionsQualityLevel";
displayName = %device;
key["$pref::Video::displayDeviceId"] = %device;
key["$pref::Video::deviceId"] = %i;
};
DisplayDevicesGroup.add(%entry);
@ -985,8 +986,9 @@ function VideoSettingsGroup::populateDisplaySettings(%this)
for(%i=0; %i < getFieldCount(%resolutionList); %i++)
{
%rawResolution = getField(%resolutionList, %i);
%prettyResolution = _makePrettyResString(%rawResolution);
%prettyResolution = _makePrettyResString(%rawResolution);
%entry = new ArrayObject()
{
class = "OptionsQualityLevel";
@ -997,6 +999,26 @@ function VideoSettingsGroup::populateDisplaySettings(%this)
DisplayResSettingsGroup.add(%entry);
}
}
else
{
if($platform !$= "windows")
%monitorRect = Canvas.getMonitorUsableRect($pref::Video::deviceId);
else
%monitorRect = Canvas.getMonitorRect($pref::Video::deviceId);
%rawResolution = getWords(%monitorRect, 2);
%prettyResolution = _makePrettyResString(%rawResolution);
%entry = new ArrayObject()
{
class = "OptionsQualityLevel";
displayName = %prettyResolution;
key["$pref::Video::Resolution"] = %rawResolution;
};
DisplayResSettingsGroup.add(%entry);
}
%refreshList = getScreenRefreshList($pref::Video::mode);
for(%i=0; %i < getFieldCount(%refreshList); %i++)
@ -1100,6 +1122,7 @@ function updateDisplayOptionsSettings()
$pref::Video::FullScreen = %newFullScreen;
$pref::Video::RefreshRate = %newRefresh;
$pref::Video::AA = %newAA;
configureCanvas();
}
}
@ -1135,6 +1158,11 @@ function PostFXLightRayOptionsGroup::onApply(%this)
function getCurrentQualityLevel(%qualityGroup)
{
/*if(%qualityGroup.getId() == DisplayResSettingsGroup.getId())
{
echo("Checking current quality level of Display Resolution");
}*/
for ( %i=0; %i < %qualityGroup.getCount(); %i++ )
{
%level = %qualityGroup.getObject( %i );
@ -1349,7 +1377,7 @@ function getScreenResolutionList(%deviceID, %deviceMode)
if ((%deviceMode == $Video::ModeBorderless) && ($platform !$= "windows"))
{
%borderlessRes = getWords(Canvas.getMonitorUsableRect(%deviceID), 2);
return _makePrettyResString(%borderlessRes);
return %borderlessRes;
}
%resCount = Canvas.getModeCount();
@ -1361,7 +1389,7 @@ function getScreenResolutionList(%deviceID, %deviceMode)
if (!Canvas.checkCanvasRes(%testResString, %deviceID, %deviceMode, false))
continue;
%testRes = _makePrettyResString( %testResString );
%testRes = getWords(%testResString, 0, 1);
//sanitize
%found = false;