PC variant (also used for MSS build when mouse and keyboard are then active input device).
407 {
408 array<ref JsonControlMappingInfo> controlMappingInfo = new array<ref JsonControlMappingInfo>;
409 string filePath;
410
414 else
416
417 string profileName = "";
419
420 #ifdef PLATFORM_CONSOLE
422 if (controllerActive)
423 {
424 if (profileName == "#STR_UAPRESET_0" || profileName == "#STR_USER")
425 {
426 #ifdef PLATFORM_MSSTORE
429 else
431 #endif
432 #ifdef PLATFORM_XBOX
435 else
437 #endif
438 #ifdef PLATFORM_PS4
440 #endif
441 }
442 else if (profileName == "#STR_UAPRESET_1")
443 {
444 #ifdef PLATFORM_MSSTORE
447 else
449 #endif
450 #ifdef PLATFORM_XBOX
453 else
455 #endif
456 #ifdef PLATFORM_PS4
458 #endif
459 }
460 else
461 {
463 filePath = "";
464 }
465 }
466 #endif
468 JsonSerializer js = new JsonSerializer();
469
470 string js_error = "";
471 string line_content = "";
472 string content = "";
473 if (file_handle)
474 {
475 while (
FGets(file_handle, line_content) >= 0)
476 {
477 content += line_content;
478 }
480
482 {
483 return controlMappingInfo;
484 }
485 else
486 {
487 ErrorEx(
"JSON ERROR => [TutorialsMenu]: " + js_error);
488 }
489 }
490 else
491 {
492 ErrorEx(
"FILEHANDLE ERROR => [TutorialsMenu]: " + js_error);
493 }
494
495 return controlMappingInfo;
496 }
proto bool ReadFromString(void variable_in, string jsonString, out string error)
Json string deserialization to script variable.
proto void CloseFile(FileHandle file)
Close the File.
proto int FGets(FileHandle file, string var)
Get line from file, every next call of this function returns next line.
proto FileHandle OpenFile(string name, FileMode mode)
Opens File.