Allow mods to customize application title.
This commit is contained in:
committed by
abcdefg30
parent
3a8957c6f3
commit
f08a0b113e
@@ -482,9 +482,12 @@ namespace OpenRA
|
|||||||
Renderer.InitializeDepthBuffer(grid);
|
Renderer.InitializeDepthBuffer(grid);
|
||||||
|
|
||||||
Cursor?.Dispose();
|
Cursor?.Dispose();
|
||||||
|
|
||||||
Cursor = new CursorManager(ModData.CursorProvider);
|
Cursor = new CursorManager(ModData.CursorProvider);
|
||||||
|
|
||||||
|
var metadata = ModData.Manifest.Metadata;
|
||||||
|
if (!string.IsNullOrEmpty(metadata.WindowTitle))
|
||||||
|
Renderer.Window.SetWindowTitle(metadata.WindowTitle);
|
||||||
|
|
||||||
PerfHistory.Items["render"].HasNormalTick = false;
|
PerfHistory.Items["render"].HasNormalTick = false;
|
||||||
PerfHistory.Items["batches"].HasNormalTick = false;
|
PerfHistory.Items["batches"].HasNormalTick = false;
|
||||||
PerfHistory.Items["render_world"].HasNormalTick = false;
|
PerfHistory.Items["render_world"].HasNormalTick = false;
|
||||||
|
|||||||
@@ -72,6 +72,7 @@ namespace OpenRA
|
|||||||
|
|
||||||
IHardwareCursor CreateHardwareCursor(string name, Size size, byte[] data, int2 hotspot, bool pixelDouble);
|
IHardwareCursor CreateHardwareCursor(string name, Size size, byte[] data, int2 hotspot, bool pixelDouble);
|
||||||
void SetHardwareCursor(IHardwareCursor cursor);
|
void SetHardwareCursor(IHardwareCursor cursor);
|
||||||
|
void SetWindowTitle(string title);
|
||||||
void SetRelativeMouseMode(bool mode);
|
void SetRelativeMouseMode(bool mode);
|
||||||
void SetScaleModifier(float scale);
|
void SetScaleModifier(float scale);
|
||||||
|
|
||||||
|
|||||||
@@ -60,6 +60,7 @@ namespace OpenRA
|
|||||||
public string Version;
|
public string Version;
|
||||||
public string Website;
|
public string Website;
|
||||||
public string WebIcon32;
|
public string WebIcon32;
|
||||||
|
public string WindowTitle;
|
||||||
public bool Hidden;
|
public bool Hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ namespace OpenRA.Platforms.Default
|
|||||||
bool disposed;
|
bool disposed;
|
||||||
|
|
||||||
readonly object syncObject = new object();
|
readonly object syncObject = new object();
|
||||||
Size windowSize;
|
readonly Size windowSize;
|
||||||
Size surfaceSize;
|
Size surfaceSize;
|
||||||
float windowScale = 1f;
|
float windowScale = 1f;
|
||||||
int2? lockedMousePosition;
|
int2? lockedMousePosition;
|
||||||
@@ -405,6 +405,12 @@ namespace OpenRA.Platforms.Default
|
|||||||
SDL.SDL_ShowCursor((int)SDL.SDL_bool.SDL_FALSE);
|
SDL.SDL_ShowCursor((int)SDL.SDL_bool.SDL_FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void SetWindowTitle(string title)
|
||||||
|
{
|
||||||
|
VerifyThreadAffinity();
|
||||||
|
SDL.SDL_SetWindowTitle(window, title);
|
||||||
|
}
|
||||||
|
|
||||||
public void SetRelativeMouseMode(bool mode)
|
public void SetRelativeMouseMode(bool mode)
|
||||||
{
|
{
|
||||||
if (mode)
|
if (mode)
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ Metadata:
|
|||||||
Version: {DEV_VERSION}
|
Version: {DEV_VERSION}
|
||||||
Website: https://www.openra.net
|
Website: https://www.openra.net
|
||||||
WebIcon32: https://www.openra.net/images/icons/cnc_32x32.png
|
WebIcon32: https://www.openra.net/images/icons/cnc_32x32.png
|
||||||
|
WindowTitle: OpenRA - Tiberian Dawn
|
||||||
|
|
||||||
PackageFormats: Mix
|
PackageFormats: Mix
|
||||||
|
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ Metadata:
|
|||||||
Version: {DEV_VERSION}
|
Version: {DEV_VERSION}
|
||||||
Website: https://www.openra.net
|
Website: https://www.openra.net
|
||||||
WebIcon32: https://www.openra.net/images/icons/d2k_32x32.png
|
WebIcon32: https://www.openra.net/images/icons/d2k_32x32.png
|
||||||
|
WindowTitle: OpenRA - Dune 2000
|
||||||
|
|
||||||
PackageFormats: D2kSoundResources
|
PackageFormats: D2kSoundResources
|
||||||
|
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ Metadata:
|
|||||||
Version: {DEV_VERSION}
|
Version: {DEV_VERSION}
|
||||||
Website: https://www.openra.net
|
Website: https://www.openra.net
|
||||||
WebIcon32: https://www.openra.net/images/icons/ra_32x32.png
|
WebIcon32: https://www.openra.net/images/icons/ra_32x32.png
|
||||||
|
WindowTitle: OpenRA - Red Alert
|
||||||
|
|
||||||
PackageFormats: Mix
|
PackageFormats: Mix
|
||||||
|
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ Metadata:
|
|||||||
Version: {DEV_VERSION}
|
Version: {DEV_VERSION}
|
||||||
Website: https://www.openra.net
|
Website: https://www.openra.net
|
||||||
WebIcon32: https://www.openra.net/images/icons/ts_32x32.png
|
WebIcon32: https://www.openra.net/images/icons/ts_32x32.png
|
||||||
|
WindowTitle: OpenRA - Tiberian Sun
|
||||||
|
|
||||||
PackageFormats: Mix
|
PackageFormats: Mix
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user