void DisplaySaveStatsGUI() { if (currentSaveTree == null) { return; } EditorGUILayout.Space(); GUILayoutHelper.Horizontal(() => { EditorGUILayout.LabelField(new GUIContent("Version"), GUILayout.Width(EditorGUIUtility.labelWidth - 4)); EditorGUILayout.SelectableLabel(currentSaveTree.Header.Version.ToString(), EditorStyles.textField, GUILayout.Height(EditorGUIUtility.singleLineHeight)); }); GUILayoutHelper.Horizontal(() => { string positionText = string.Format("X={0}, Y={1}, Z={2}", currentSaveTree.Header.CharacterPosition.Position.WorldX, currentSaveTree.Header.CharacterPosition.Position.YOffset, currentSaveTree.Header.CharacterPosition.Position.WorldZ); EditorGUILayout.LabelField(new GUIContent("Player Position", "Position of player in the world."), GUILayout.Width(EditorGUIUtility.labelWidth - 4)); EditorGUILayout.SelectableLabel(positionText, EditorStyles.textField, GUILayout.Height(EditorGUIUtility.singleLineHeight)); }); GUILayoutHelper.Horizontal(() => { DFPosition mapPixel = MapsFile.WorldCoordToMapPixel(currentSaveTree.Header.CharacterPosition.Position.WorldX, currentSaveTree.Header.CharacterPosition.Position.WorldZ); string mapPixelText = string.Format("X={0}, Y={1}", mapPixel.X, mapPixel.Y); EditorGUILayout.LabelField(new GUIContent("Player Map Pixel", "Position of player on small map."), GUILayout.Width(EditorGUIUtility.labelWidth - 4)); EditorGUILayout.SelectableLabel(mapPixelText, EditorStyles.textField, GUILayout.Height(EditorGUIUtility.singleLineHeight)); }); GUILayoutHelper.Horizontal(() => { DaggerfallDateTime time = new DaggerfallDateTime(); time.FromClassicDaggerfallTime(currentSaveVars.GameTime); EditorGUILayout.LabelField(new GUIContent("Player Time", "World time of this save."), GUILayout.Width(EditorGUIUtility.labelWidth - 4)); EditorGUILayout.SelectableLabel(time.LongDateTimeString(), EditorStyles.textField, GUILayout.Height(EditorGUIUtility.singleLineHeight)); }); GUILayoutHelper.Horizontal(() => { EditorGUILayout.LabelField(new GUIContent("LocationDetail records"), GUILayout.Width(EditorGUIUtility.labelWidth - 4)); EditorGUILayout.SelectableLabel(currentSaveTree.LocationDetail.RecordCount.ToString(), EditorStyles.textField, GUILayout.Height(EditorGUIUtility.singleLineHeight)); }); GUILayoutHelper.Horizontal(() => { EditorGUILayout.LabelField(new GUIContent("RecordElement records"), GUILayout.Width(EditorGUIUtility.labelWidth - 4)); EditorGUILayout.SelectableLabel(currentSaveTree.RecordDictionary.Count.ToString(), EditorStyles.textField, GUILayout.Height(EditorGUIUtility.singleLineHeight)); }); //GUILayoutHelper.Horizontal(() => //{ // EditorGUILayout.LabelField(new GUIContent("Header.Unknown"), GUILayout.Width(EditorGUIUtility.labelWidth - 4)); // EditorGUILayout.SelectableLabel(currentSaveTree.Header.Unknown.ToString(), EditorStyles.textField, GUILayout.Height(EditorGUIUtility.singleLineHeight)); //}); //GUILayoutHelper.Horizontal(() => //{ // EditorGUILayout.LabelField(new GUIContent("CharacterPosition.Unknown"), GUILayout.Width(EditorGUIUtility.labelWidth - 4)); // EditorGUILayout.SelectableLabel(currentSaveTree.Header.CharacterPosition.Unknown.ToString(), EditorStyles.textField, GUILayout.Height(EditorGUIUtility.singleLineHeight)); //}); }
public virtual void ImportLastRankChange(uint timeOfLastRankChange) { // In classic, time of last rank change is measured by minute, not day DaggerfallDateTime classicTime = new DaggerfallDateTime(); classicTime.FromClassicDaggerfallTime(timeOfLastRankChange); lastRankChange = CalculateDaySinceZero(classicTime); }
public static string GetLoanDueDateString(int regionIndex) { if (BankAccounts[regionIndex].loanDueDate <= 0) { return(""); } if (dateTime == null) { dateTime = new DaggerfallDateTime(); } dateTime.FromClassicDaggerfallTime(BankAccounts[regionIndex].loanDueDate); string timeString = dateTime.DateString(); return(timeString); }