mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
Added world creation menu
This commit is contained in:
parent
03a6ed0f96
commit
4e1f19c911
12 changed files with 227 additions and 52 deletions
|
|
@ -131,4 +131,22 @@ bool util::is_integer(string text) {
|
|||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
bool util::is_integer(wstring text) {
|
||||
for (wchar_t c : text) {
|
||||
if (c < L'0' || c > L'9')
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
bool util::is_valid_filename(std::wstring name) {
|
||||
for (wchar_t c : name) {
|
||||
if (c < 31 || c == '/' || c == '\\' || c == '<' || c == '>' ||
|
||||
c == ':' || c == '"' || c == '|' || c == '?' || c == '*'){
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue