mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-09-15 10:35:11 -04:00
Can use all valid filename ASCII characters in save level screen.
This commit is contained in:
parent
d632374a88
commit
d3c85a8cc5
@ -99,8 +99,8 @@ namespace ClassicalSharp {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public override bool IsValidChar( char c ) {
|
public override bool IsValidChar( char c ) {
|
||||||
return (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') || c == ' ' ||
|
return !(c == '/' || c == '\\' || c == '?' || c == '*' || c == ':'
|
||||||
(c >= '0' && c <= '9');
|
|| c == '<' || c == '>' || c == '|' || c == '"');
|
||||||
}
|
}
|
||||||
|
|
||||||
public override bool IsValidString( string s ) {
|
public override bool IsValidString( string s ) {
|
||||||
|
@ -107,6 +107,7 @@ namespace ClassicalSharp {
|
|||||||
static bool IsInvalidChar( char c ) {
|
static bool IsInvalidChar( char c ) {
|
||||||
// Make sure we're in the printable text range from 0x20 to 0x7E
|
// Make sure we're in the printable text range from 0x20 to 0x7E
|
||||||
return c < ' ' || c == '&' || c > '~';
|
return c < ' ' || c == '&' || c > '~';
|
||||||
|
// TODO: Uncomment this for full unicode support for save level screen?
|
||||||
}
|
}
|
||||||
|
|
||||||
public override bool HandlesKeyPress( char key ) {
|
public override bool HandlesKeyPress( char key ) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user