316 {
317 array<ref JsonControlMappingInfo> control_mapping_info = new array<ref JsonControlMappingInfo>;
319 string profile_name = "";
321
322#ifdef PLATFORM_CONSOLE
323 if (!
GetGame().GetInput().IsEnabledMouseAndKeyboardEvenOnServer())
324 {
325 if (profile_name == "#STR_UAPRESET_0")
326 {
327 #ifdef PLATFORM_XBOX
329 #else
331 #endif
332 }
333 else if (profile_name == "#STR_UAPRESET_1")
334 {
335 #ifdef PLATFORM_XBOX
337 #else
339 #endif
340 }
341 else
342 {
344 file_path = "";
345 }
346 }
347#endif
349 JsonSerializer js = new JsonSerializer();
350
351 string js_error = "";
352 string line_content = "";
353 string content = "";
354 if (file_handle)
355 {
356 while (
FGets(file_handle, line_content) >= 0)
357 {
358 content += line_content;
359 }
361
363 {
364 return control_mapping_info;
365 }
366 else
367 {
368 ErrorEx(
"JSON ERROR => [TutorialsMenu]: " + js_error);
369 }
370 }
371 else
372 {
373 ErrorEx(
"FILEHANDLE ERROR => [TutorialsMenu]: " + js_error);
374 }
375
376 return control_mapping_info;
377 }
proto native Input GetInput()
proto bool ReadFromString(void variable_in, string jsonString, out string error)
Json string deserialization to script variable.
proto native CGame GetGame()
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.