Files
sbox-public/engine/Sandbox.AppSystem/AppSystemFlags.cs
s&box team 71f266059a Open source release
This commit imports the C# engine code and game files, excluding C++ source code.

[Source-Commit: ceb3d758046e50faa6258bc3b658a30c97743268]
2025-11-24 09:05:18 +00:00

37 lines
715 B
C#

using NativeEngine;
using System.Runtime.InteropServices;
namespace Sandbox;
public enum AppSystemFlags
{
None = 0,
IsConsoleApp = 1 << 0,
IsGameApp = 1 << 1,
IsDedicatedServer = 1 << 2,
IsStandaloneGame = 1 << 3,
IsEditor = 1 << 4,
IsUnitTest = 1 << 5,
}
public struct AppSystemCreateInfo
{
public AppSystemFlags Flags;
public string WindowTitle;
internal MaterialSystem2AppSystemDictCreateInfo ToMaterialSystem2AppSystemDictCreateInfo()
{
var ci = new MaterialSystem2AppSystemDictCreateInfo
{
iFlags = (MaterialSystem2AppSystemDictFlags)Flags,
};
if ( !string.IsNullOrEmpty( WindowTitle ) )
{
ci.pWindowTitle = Marshal.StringToHGlobalAnsi( WindowTitle );
}
return ci;
}
}