DayZ 1.27
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено

◆ GetControlMappingInfo()

array< ref JsonControlMappingInfo > GetControlMappingInfo ( )
protected

См. определение в файле ControlsXbox.c строка 272

273 {
275
276 string file_path = "xbox/pagedatacontroller.json";
277 #ifdef PLATFORM_PS4
278 file_path = "ps4/pagedatacontroller.json";
279 #endif
280 FileHandle file_handle = OpenFile(file_path, FileMode.READ);
282
283 string js_error = "";
284 string line_content = "";
285 string content = "";
286 if (file_handle)
287 {
288 while (FGets(file_handle, line_content) >= 0)
289 {
290 content += line_content;
291 }
292 CloseFile(file_handle);
293
294 if (js.ReadFromString(control_mapping_info, content, js_error))
295 {
296 return control_mapping_info;
297 }
298 else
299 {
300 ErrorEx("JSON ERROR => [ControlMappingInfo.json]: "+ js_error,ErrorExSeverity.INFO);
301 }
302 }
303
304 return control_mapping_info;
305 }
proto bool ReadFromString(void variable_in, string jsonString, out string error)
Json string deserialization to script variable.
Class for sending RPC over network.
Определения gameplay.c:50
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
ErrorExSeverity
Определения EnDebug.c:62
enum ShapeType ErrorEx
FileMode
Определения EnSystem.c:383
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.
int[] FileHandle
Определения EnSystem.c:390

Перекрестные ссылки CloseFile(), ErrorEx, FGets(), OpenFile() и JsonSerializer::ReadFromString().