Nerfed icon test
created an icon for fun
This commit is contained in:
parent
26eb1da3f0
commit
71657cf8d8
BIN
Nerfed.Runtime/Assets/Textures/NerfedIcon.png
(Stored with Git LFS)
Normal file
BIN
Nerfed.Runtime/Assets/Textures/NerfedIcon.png
(Stored with Git LFS)
Normal file
Binary file not shown.
@ -87,6 +87,14 @@ public Window(GraphicsDevice graphicsDevice, WindowCreateInfo windowCreateInfo)
|
||||
Width = (uint) width;
|
||||
Height = (uint) height;
|
||||
|
||||
unsafe
|
||||
{
|
||||
byte* pixels = ImageUtils.GetPixelDataFromFile(Path.Combine(System.AppContext.BaseDirectory, "Assets", "Textures", "NerfedIcon.png"), out uint w, out uint h, out uint size);
|
||||
nint icon = SDL.SDL_CreateRGBSurfaceFrom(new IntPtr(pixels), (int)w, (int)h, 8 * 4, (int)w * 4, 0x000000FF, 0x0000FF00, 0x00FF0000, 0xFF000000);
|
||||
SDL.SDL_SetWindowIcon(Handle, icon);
|
||||
ImageUtils.FreePixelData(pixels);
|
||||
}
|
||||
|
||||
windowsById.Add(SDL.SDL_GetWindowID(Handle), this);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user