mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-09-30 09:03:21 -04:00
Add back in Options.Set(string, string) to avoid MissingMethod. (Thanks Cheesse), fixes #235
This commit is contained in:
parent
b3c2a21fc0
commit
94dc022567
@ -114,13 +114,13 @@ namespace ClassicalSharp.Hotkeys {
|
|||||||
|
|
||||||
public void UserRemovedHotkey( Key baseKey, byte flags ) {
|
public void UserRemovedHotkey( Key baseKey, byte flags ) {
|
||||||
string key = "hotkey-" + baseKey + "&" + flags;
|
string key = "hotkey-" + baseKey + "&" + flags;
|
||||||
Options.Set<string>( key, null );
|
Options.Set( key, null );
|
||||||
}
|
}
|
||||||
|
|
||||||
public void UserAddedHotkey( Key baseKey, byte flags, bool moreInput, string text ) {
|
public void UserAddedHotkey( Key baseKey, byte flags, bool moreInput, string text ) {
|
||||||
string key = "hotkey-" + baseKey + "&" + flags;
|
string key = "hotkey-" + baseKey + "&" + flags;
|
||||||
string value = moreInput + "&" + text;
|
string value = moreInput + "&" + text;
|
||||||
Options.Set<string>( key, value );
|
Options.Set( key, value );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -120,6 +120,18 @@ namespace ClassicalSharp {
|
|||||||
return mapping;
|
return mapping;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void Set( string key, string value ) {
|
||||||
|
key = key.ToLower();
|
||||||
|
if( value != null ) {
|
||||||
|
OptionsSet[key] = value;
|
||||||
|
} else {
|
||||||
|
OptionsSet.Remove( key );
|
||||||
|
}
|
||||||
|
|
||||||
|
if( !OptionsChanged.Contains( key ) )
|
||||||
|
OptionsChanged.Add( key );
|
||||||
|
}
|
||||||
|
|
||||||
public static void Set<T>( string key, T value ) {
|
public static void Set<T>( string key, T value ) {
|
||||||
key = key.ToLower();
|
key = key.ToLower();
|
||||||
if( value != null ) {
|
if( value != null ) {
|
||||||
|
@ -40,7 +40,7 @@ namespace Launcher {
|
|||||||
|
|
||||||
for( int yy = 0; yy < height; yy++ ) {
|
for( int yy = 0; yy < height; yy++ ) {
|
||||||
int* row = dst.GetRowPtr( y + yy );
|
int* row = dst.GetRowPtr( y + yy );
|
||||||
float t = (float)yy / height;
|
float t = (float)yy / (height - 1); // so last row has b as its colour
|
||||||
|
|
||||||
c.R = (byte)Utils.Lerp( a.R, b.R, t );
|
c.R = (byte)Utils.Lerp( a.R, b.R, t );
|
||||||
c.G = (byte)Utils.Lerp( a.G, b.G, t );
|
c.G = (byte)Utils.Lerp( a.G, b.G, t );
|
||||||
|
Loading…
x
Reference in New Issue
Block a user