mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 10:12:54 +08:00
Hoist icon stream
This commit is contained in:
parent
42f666cd24
commit
7359c422dd
@ -125,12 +125,14 @@ namespace osu.Desktop
|
|||||||
{
|
{
|
||||||
base.SetHost(host);
|
base.SetHost(host);
|
||||||
|
|
||||||
|
var iconStream = Assembly.GetExecutingAssembly().GetManifestResourceStream(GetType(), "lazer.ico");
|
||||||
|
|
||||||
switch (host.Window)
|
switch (host.Window)
|
||||||
{
|
{
|
||||||
// Legacy osuTK DesktopGameWindow
|
// Legacy osuTK DesktopGameWindow
|
||||||
case DesktopGameWindow desktopGameWindow:
|
case DesktopGameWindow desktopGameWindow:
|
||||||
desktopGameWindow.CursorState |= CursorState.Hidden;
|
desktopGameWindow.CursorState |= CursorState.Hidden;
|
||||||
desktopGameWindow.SetIconFromStream(Assembly.GetExecutingAssembly().GetManifestResourceStream(GetType(), "lazer.ico"));
|
desktopGameWindow.SetIconFromStream(iconStream);
|
||||||
desktopGameWindow.Title = Name;
|
desktopGameWindow.Title = Name;
|
||||||
desktopGameWindow.FileDrop += (_, e) => fileDrop(e.FileNames);
|
desktopGameWindow.FileDrop += (_, e) => fileDrop(e.FileNames);
|
||||||
break;
|
break;
|
||||||
@ -138,7 +140,7 @@ namespace osu.Desktop
|
|||||||
// SDL2 DesktopWindow
|
// SDL2 DesktopWindow
|
||||||
case DesktopWindow desktopWindow:
|
case DesktopWindow desktopWindow:
|
||||||
desktopWindow.CursorState.Value |= CursorState.Hidden;
|
desktopWindow.CursorState.Value |= CursorState.Hidden;
|
||||||
desktopWindow.SetIconFromStream(Assembly.GetExecutingAssembly().GetManifestResourceStream(GetType(), "lazer.ico"));
|
desktopWindow.SetIconFromStream(iconStream);
|
||||||
desktopWindow.Title = Name;
|
desktopWindow.Title = Name;
|
||||||
desktopWindow.DragDrop += f => fileDrop(new[] { f });
|
desktopWindow.DragDrop += f => fileDrop(new[] { f });
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user