macroquad icon indicating copy to clipboard operation
macroquad copied to clipboard

Windows 10: when using winres to make a custom icon for the app window, it doesn't apply to the window Macroquad creates.

Open Roxfall opened this issue 4 years ago • 2 comments

Using winres crate https://crates.io/crates/winres (with the build.rs at the bottom of the page), macroquad creates two windows: one that looks like a console, and the other one where macroquad draws things. The first window inherits the custom icon, visible in top left corner of the window and on the start bar at the bottom of the screen, alt-tab UI, task manager, etc. The second window (and it is the important one!) does not, showing a default window icon in all cases.

This first window can be hidden by using #![windows_subsystem = "windows"] in your crate root. But it doesn't solve the problem of the custom icon not showing in the macroquad window.

Expected: macroquad talks to winres crate and inherits all the attributes of the console window.

Don't hesitate to reach out to me on Discord if you need more info :) Roxfall#9911

Roxfall avatar Nov 09 '21 15:11 Roxfall

Convert an image to RGBA and add to Conf

fn window_conf() -> Conf {
    Conf {
        window_title: "Furry Fido - Конфигурация".to_owned(),
        window_resizable: false,
        window_height: 250,
        window_width: 500,
        icon: Option::Some(Icon{small: include_bytes!("../fido16.rgba").to_owned(), medium: include_bytes!("../fido32.rgba").to_owned(), big: include_bytes!("../fido64.rgba").to_owned()}),
       ..Default::default()
   }
}

ImmortalOctogen avatar Sep 17 '22 14:09 ImmortalOctogen

@ImmortalOctogen (edited your comment just a bit - added code formatting tags)

But yes, that's the way to setup an icon witn miniquad. I never used winres and do not really know how to integrate it properly.

not-fl3 avatar Sep 17 '22 16:09 not-fl3