mirror of
https://github.com/Facepunch/sbox-public.git
synced 2025-12-23 22:48:07 -05:00
This commit imports the C# engine code and game files, excluding C++ source code. [Source-Commit: ceb3d758046e50faa6258bc3b658a30c97743268]
37 lines
715 B
C#
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;
|
|
}
|
|
}
|