13 public int[]
ints =
new int[25];
54 return (
float)
ints[3] * 0.01f;
58 ints[3] = (int)(value * 100f);
90 return (
float)
ints[23] * 0.01f;
94 ints[23] = (int)(value * 100f);
102 return (
float)
ints[17] * 0.01f;
106 ints[17] = (int)(value * 100f);
114 return (
float)
ints[4] * 0.01f;
118 ints[4] = (int)(value * 100f);
126 return (
float)
ints[5] * 0.01f;
130 ints[5] = (int)(value * 100f);
138 return (
float)
ints[2] * 0.01f;
142 ints[2] = (int)(value * 100f);
324 if (
ints.Length >= 25)
341 if (
ints.Length < 25)
343 Array.Resize(ref
ints, 25);
349 FileIniDataParser fileIniDataParser =
new FileIniDataParser();
350 if (File.Exists(path))
352 EClass.
ui.Say(
"Ini file already exists.");
355 File.CreateText(path).Close();
356 IniData iniData = fileIniDataParser.ReadFile(path, Encoding.UTF8);
357 iniData.Global[
"x"] =
ints[4].ToString() ??
"";
358 iniData.Global[
"y"] =
ints[5].ToString() ??
"";
359 iniData.Global[
"z"] =
ints[2].ToString() ??
"";
360 iniData.Global[
"pivotX"] =
pivotX.ToString() ??
"";
361 iniData.Global[
"pivotY"] =
pivotY.ToString() ??
"";
362 iniData.Global[
"shadow"] =
shadow.ToString() ??
"";
363 iniData.Global[
"shadowX"] =
shadowX.ToString() ??
"";
364 iniData.Global[
"shadowY"] =
shadowY.ToString() ??
"";
365 iniData.Global[
"height"] =
ints[3].ToString() ??
"";
366 iniData.Global[
"scaleIcon"] =
scaleIcon.ToString() ??
"";
367 iniData.Global[
"liquidMod"] =
liquidMod.ToString() ??
"";
368 iniData.Global[
"hatY"] =
ints[23].ToString() ??
"";
369 iniData.Global[
"flags"] =
ints[1].ToString() ??
"";
370 fileIniDataParser.WriteFile(path, iniData);
376 IniData iniData =
new FileIniDataParser().ReadFile(path, Encoding.UTF8);
377 sourcePref.
ints[4] = iniData.Global[
"x"].ToInt();
378 sourcePref.
ints[5] = iniData.Global[
"y"].ToInt();
379 sourcePref.
ints[2] = iniData.Global[
"z"].ToInt();
380 sourcePref.pivotX = iniData.Global[
"pivotX"].ToInt();
381 sourcePref.pivotY = iniData.Global[
"pivotY"].ToInt();
382 sourcePref.shadow = iniData.Global[
"shadow"].ToInt();
383 sourcePref.shadowX = iniData.Global[
"shadowX"].ToInt();
384 sourcePref.shadowRX = -sourcePref.
shadowX;
385 int num2 = (sourcePref.shadowRY = iniData.Global[
"shadowY"].ToInt());
386 sourcePref.shadowY = num2;
387 sourcePref.
ints[3] = iniData.Global[
"height"].ToInt();
388 sourcePref.scaleIcon = iniData.Global[
"scaleIcon"].ToInt();
389 sourcePref.liquidMod = iniData.Global[
"liquidMod"].ToInt();
390 sourcePref.
ints[23] = iniData.Global[
"hatY"].ToInt();
391 sourcePref.
ints[1] = iniData.Global[
"flags"].ToInt();
void OnAfterDeserialize()
void WriteIni(string path)
static SourcePref ReadFromIni(string path)