mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-13 03:33:48 +00:00
Fixes handling of click/activation events on keybind options ctrls so clicking on it at all activates it, instead of needing to click on the button image specifically
Adjust the scaling of the options rows to be a consistent 50/50 divide between the options name and the actual options values to make the layout and scaling consistent Fixes key remapping behavior to work properly Added SubHeader text gui profile that is centered Made the remapping gui control be stylistically consistent to messageboxes
This commit is contained in:
parent
abbfb634f3
commit
f2585fea4d
5 changed files with 65 additions and 114 deletions
|
|
@ -205,12 +205,13 @@ function controlSetChanged()
|
|||
fillRemapList();
|
||||
}
|
||||
|
||||
function doKeyRemap( %rowIndex )
|
||||
function doKeyRemap( %row )
|
||||
{
|
||||
%rowIndex = %row.getParent().getObjectIndex(%row);
|
||||
%rowIndex--; //Offset the rowIndex to account for controlset option
|
||||
%name = $RemapName[%rowIndex];
|
||||
|
||||
RemapDlg-->OptRemapText.setValue( "Re-bind \"" @ %name @ "\" to..." );
|
||||
RemapDlg-->OptRemapText.text = "Re-bind \"" @ %name @ "\" to..." ;
|
||||
OptRemapInputCtrl.index = %rowIndex;
|
||||
Canvas.pushDialog( RemapDlg );
|
||||
|
||||
|
|
@ -223,7 +224,7 @@ function doKeyRemap( %rowIndex )
|
|||
function ControlsMenuRebindButton::onClick(%this)
|
||||
{
|
||||
%name = $RemapName[%this.keybindIndex];
|
||||
RemapDlg-->OptRemapText.setValue( "Re-bind \"" @ %name @ "\" to..." );
|
||||
RemapDlg-->OptRemapText.text = "Re-bind \"" @ %name @ "\" to..." ;
|
||||
|
||||
OptRemapInputCtrl.index = %this.keybindIndex;
|
||||
OptRemapInputCtrl.optionIndex = %this.optionIndex;
|
||||
|
|
@ -305,16 +306,12 @@ function OptRemapInputCtrl::onInputEvent( %this, %device, %action )
|
|||
%prevCmdName = $RemapName[%prevMapIndex];
|
||||
Canvas.pushDialog( RemapConfirmDlg );
|
||||
|
||||
RemapConfirmationText.setText("\"" @ %mapName @ "\" is already bound to \""
|
||||
@ %prevCmdName @ "\"! Do you wish to replace this mapping?");
|
||||
RemapConfirmationYesButton.command = "redoMapping(" @ %device @ ", " @ %actionMap @ ", \"" @ %action @ "\", \"" @
|
||||
%remapWarnText = "\"" @ %mapName @ "\" is already bound to \"" @ %prevCmdName @ "\"! Do you wish to replace this mapping?";
|
||||
%doRemapCommand = "redoMapping(" @ %device @ ", " @ %actionMap @ ", \"" @ %action @ "\", \"" @
|
||||
%cmd @ "\", " @ %prevMapIndex @ ", " @ %this.index @ "); Canvas.popDialog();";
|
||||
RemapConfirmationNoButton.command = "Canvas.popDialog();";
|
||||
%cancelCommand = "Canvas.popDialog();";
|
||||
|
||||
/*MessageBoxYesNo( "Warning",
|
||||
"\"" @ %mapName @ "\" is already bound to \""
|
||||
@ %prevCmdName @ "\"!\nDo you wish to replace this mapping?",
|
||||
%callback, "" );*/
|
||||
MessageBoxYesNo( "Key already in use", %remapWarnText, %doRemapCommand, %cancelCommand );
|
||||
}
|
||||
|
||||
function findRemapCmdIndex( %command )
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue