Git Product home page Git Product logo

Comments (7)

flibitijibibo avatar flibitijibibo commented on July 19, 2024

To set the Window icon, you can either use SDL_SetWindowIcon yourself or use this:

https://github.com/flibitijibibo/MonoGame/blob/monogame-sdl2/MonoGame.Framework/SDL2/SDL2_GameWindow.cs#L872

We load a bitmap with the same name as the game, then set that as the icon. This works on both Windows and Linux (and OSX just uses the Mac app icns, so no need to worry there).

We don't use the built-in assembly icon due to it depending on Winforms, which has a ton of dependencies and is not portable.

from fna-mghistory.

drandell avatar drandell commented on July 19, 2024

I see :). Thanks for clearing that up, whilst i have you one final question concerning the application, when i run the .exe the following debug window is present;
http://i.imgur.com/5pBkcMM.png

It only ever says that 1 line. Just wondering if there's anyway to hide/get rid of it?

from fna-mghistory.

flibitijibibo avatar flibitijibibo commented on July 19, 2024

Odd, it really produces a separate console for that?

You can just def these out for your -DDEBUG configuration, if you need to:

https://github.com/flibitijibibo/MonoGame/blob/monogame-sdl2/MonoGame.Framework/SDL2/SDL2_GameWindow.cs#L252
https://github.com/flibitijibibo/MonoGame/blob/monogame-sdl2/MonoGame.Framework/SDL2/SDL2_GameWindow.cs#L256

EDIT: Also noteworthy is SDL2_GamePad:

https://github.com/flibitijibibo/MonoGame/blob/monogame-sdl2/MonoGame.Framework/SDL2/Input/SDL2_GamePad.cs#L402

I think those are the only places where we print in MG-SDL2, currently. VideoPlayer also prints some information, and those lines are pretty easy to pick out.

from fna-mghistory.

drandell avatar drandell commented on July 19, 2024

No change (except for the fact the window no contains no text), the cmd window is still be created :/ (Should note that this is when i run the .exe separately outside of xamarin studio and not actually in xamarin studio, also it creates the cmd window in debug (to be expected) but also in release mode as-well)

from fna-mghistory.

flibitijibibo avatar flibitijibibo commented on July 19, 2024

To be honest, I'm not sure. For Mac/Linux I just use stock MonoDevelop and for Windows I use Visual Studio Express... I haven't seen a console window for any of them, so maybe Xamarin Studio is adding some property to the assemblies?

If you find out why the console shows up on Windows, let me know. I know for sure that Mac/Linux keep things in stdout without generating a terminal, so it's gotta be specific to that OS.

from fna-mghistory.

flibitijibibo avatar flibitijibibo commented on July 19, 2024

Maybe this has something to do with it?

http://stackoverflow.com/questions/3563744/how-can-i-hide-a-console-window

Google'd for "Windows .NET console window".

from fna-mghistory.

drandell avatar drandell commented on July 19, 2024

Indeed so :). I changed the type of compile target from "Executable" to "Executable with GUI" and now no more cmd window appears (I don't notice any adhere effects so i'm gunna hope this is the ticket :P). Thanks for the help Ethan +1

from fna-mghistory.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.