Add two more preset slots.
This commit is contained in:
parent
071b619668
commit
eeefaf8090
3 changed files with 9 additions and 6 deletions
|
|
@ -82,7 +82,7 @@ Class MFXPresetUtility
|
|||
Class OptionMenuItemMFXPresetList : OptionMenuItemOptionBase
|
||||
{
|
||||
CVar mCVar;
|
||||
String names[8];
|
||||
String names[MFX_NUMPRESETS];
|
||||
|
||||
OptionMenuItemMFXPresetList Init( String label, Name command, CVar graycheck = null, int center = 0 )
|
||||
{
|
||||
|
|
@ -94,18 +94,18 @@ Class OptionMenuItemMFXPresetList : OptionMenuItemOptionBase
|
|||
|
||||
void UpdateNames()
|
||||
{
|
||||
for ( int i=0; i<8; i++ )
|
||||
for ( int i=0; i<MFX_NUMPRESETS; i++ )
|
||||
names[i] = MFXPresetUtility.GetPresetName(i);
|
||||
}
|
||||
|
||||
override int GetSelection()
|
||||
{
|
||||
return clamp(mCVar.GetInt(),0,7);
|
||||
return clamp(mCVar.GetInt(),0,MFX_NUMPRESETS-1);
|
||||
}
|
||||
|
||||
override void SetSelection( int Selection )
|
||||
{
|
||||
mCVar.SetInt(clamp(Selection,0,7));
|
||||
mCVar.SetInt(clamp(Selection,0,MFX_NUMPRESETS-1));
|
||||
}
|
||||
|
||||
override int Draw( OptionMenuDescriptor desc, int y, int indent, bool selected )
|
||||
|
|
@ -122,11 +122,11 @@ Class OptionMenuItemMFXPresetList : OptionMenuItemOptionBase
|
|||
int Selection = GetSelection();
|
||||
if ( mkey == Menu.MKEY_Left )
|
||||
{
|
||||
if ( --Selection < 0 ) Selection = 7;
|
||||
if ( --Selection < 0 ) Selection = MFX_NUMPRESETS-1;
|
||||
}
|
||||
else if ( (mkey == Menu.MKEY_Right) || (mkey == Menu.MKEY_Enter) )
|
||||
{
|
||||
if ( ++Selection > 7 ) Selection = 0;
|
||||
if ( ++Selection >= MFX_NUMPRESETS ) Selection = 0;
|
||||
}
|
||||
else return OptionMenuItem.MenuEvent(mkey,fromcontroller);
|
||||
SetSelection(Selection);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue