mirror of
https://github.com/4sval/FModel.git
synced 2026-09-26 11:07:39 -05:00
ui stuff
This commit is contained in:
@@ -94,6 +94,8 @@ public class CUE4ParseViewModel : ViewModel
|
||||
Convert.ToInt32(SystemParameters.MaximizedPrimaryScreenHeight * .85)),
|
||||
NumberOfSamples = Constants.SAMPLES_COUNT,
|
||||
WindowBorder = WindowBorder.Resizable,
|
||||
Flags = ContextFlags.ForwardCompatible,
|
||||
Profile = ContextProfile.Core,
|
||||
StartVisible = false,
|
||||
StartFocused = false,
|
||||
Title = "3D Viewer"
|
||||
@@ -779,7 +781,7 @@ public class CUE4ParseViewModel : ViewModel
|
||||
SaveAndPlaySound(Path.Combine(TabControl.SelectedTab.Directory, TabControl.SelectedTab.Header.SubstringBeforeLast('.')).Replace('\\', '/'), audioFormat, data);
|
||||
return false;
|
||||
}
|
||||
case UWorld:
|
||||
case UWorld when UserSettings.Default.PreviewWorlds:
|
||||
case UStaticMesh when UserSettings.Default.PreviewStaticMeshes:
|
||||
case USkeletalMesh when UserSettings.Default.PreviewSkeletalMeshes:
|
||||
case UMaterialInstance when UserSettings.Default.PreviewMaterials && !ModelIsOverwritingMaterial &&
|
||||
@@ -787,8 +789,8 @@ public class CUE4ParseViewModel : ViewModel
|
||||
export.Owner.Name.EndsWith($"/RenderSwitch_Materials/{export.Name}", StringComparison.OrdinalIgnoreCase) ||
|
||||
export.Owner.Name.EndsWith($"/MI_BPTile/{export.Name}", StringComparison.OrdinalIgnoreCase))):
|
||||
{
|
||||
SnooperViewer.LoadExport(cancellationToken, export);
|
||||
SnooperViewer.Run();
|
||||
if (SnooperViewer.TryLoadExport(cancellationToken, export))
|
||||
SnooperViewer.Run();
|
||||
return true;
|
||||
}
|
||||
case UMaterialInstance m when ModelIsOverwritingMaterial:
|
||||
|
||||
@@ -35,6 +35,9 @@ public class MenuCommand : ViewModelCommand<ApplicationViewModel>
|
||||
contextViewModel.CUE4Parse.TabControl.SelectedTab.Highlighter = AvalonExtensions.HighlighterSelector("json");
|
||||
contextViewModel.CUE4Parse.TabControl.SelectedTab.SetDocumentText(JsonConvert.SerializeObject(contextViewModel.CUE4Parse.GameDirectory.DirectoryFiles, Formatting.Indented), false);
|
||||
break;
|
||||
case "Views_3dViewer":
|
||||
contextViewModel.CUE4Parse.SnooperViewer.Run();
|
||||
break;
|
||||
case "Views_AudioPlayer":
|
||||
Helper.OpenWindow<AdonisWindow>("Audio Player", () => new AudioPlayer().Show());
|
||||
break;
|
||||
@@ -109,4 +112,4 @@ public class MenuCommand : ViewModelCommand<ApplicationViewModel>
|
||||
cancellationToken.ThrowIfCancellationRequested();
|
||||
foreach (var f in parent.Folders) LoopFolders(cancellationToken, f, isExpanded);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -337,22 +337,14 @@ public class GameSelectorViewModel : ViewModel
|
||||
dic[key] = val;
|
||||
}
|
||||
|
||||
if (dic.Keys.Count <= 0) return null;
|
||||
AppInfo appInfo = new();
|
||||
var appId = dic["appid"];
|
||||
var name = dic["name"];
|
||||
var installDir = dic["installDir"];
|
||||
if (!dic.TryGetValue("appid", out var appId) ||
|
||||
!dic.TryGetValue("name", out var name) ||
|
||||
!dic.TryGetValue("installDir", out var installDir)) return null;
|
||||
|
||||
var path = Path.GetDirectoryName(appMetaFile);
|
||||
var libGameRoot = Path.Combine(path, "common", installDir);
|
||||
|
||||
if (!Directory.Exists(libGameRoot)) return null;
|
||||
|
||||
appInfo.Id = appId;
|
||||
appInfo.Name = name;
|
||||
appInfo.GameRoot = libGameRoot;
|
||||
|
||||
return appInfo;
|
||||
return !Directory.Exists(libGameRoot) ? null : new AppInfo { Id = appId, Name = name, GameRoot = libGameRoot };
|
||||
}
|
||||
|
||||
private static List<string> GetSteamLibs()
|
||||
|
||||
Reference in New Issue
Block a user