
Issue: GameWindow Icon Support
Posted Friday, 21 November, 2008 - 17:54 by JTalton| Project: | The Open Toolkit library |
| Version: | 1.0-beta-1 |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
Jump to:
Description
I am getting to the point in my project where it would be nice to post screen shots. It would be nice to have Icon support for the GameWindow.


Comments
#21
but maybe I write a stupid thing, but WinGLNative class have the public Icon property, and if this property is set, the icon will be updated...
is not possible make a Icon property also for GameWindow class and go down into the class tree to set the Icon into the winglnative class??
thanks!
#22
Yes, it is!
I just wanted to see if it is possible to do this automatically, so that you don't have to set the Application Icon from the project properties once and then go and set it through code again. Ideally, you could just set the Application Icon and the GameWindow would pick and use it in the taskbar and the window itself automatically - but this may not be possible (still working on it).
#23
#24
#25
#26
try { return Icon.ExtractAssociatedIcon(System.Reflection.Assembly.GetEntryAssembly().Location); }your code works with Location instead of CodeBase
of course the client (is that the right term) or QuickStart in this case... must select something other then (Default Icon) in project settings... because the default setting of (Default Icon) does not embed any icon in the exe (Right click on any shortcut in windows and choose change icon and browse to any dll or exe) and just relies on the operating system to display a default icon
#27
Rev. 2347 implements icon support. This is not automatic - you need to add an icon resource (or load an icon via other means) and assign it to the Icon property.
It is not possible to add automatic icon support in a cross-platform manner (i.e. via the /win32icon compiler switch), as this method embeds the icon directly to the PE executable (rather than a .Net resource).
The implementation should also work correctly on Linux, but this needs testing. Mac OS X support is not available at this point.
#28
i think you misunderstood my last post?
you don't need to use the /win32icon compiler switch (projects settings) you can just read the icon (if any) that was set with it? and your code
try { return Icon.ExtractAssociatedIcon(System.Reflection.Assembly.GetEntryAssembly().CodeBase); }does that... if you use the Location property instead of the CodeBase property#29
Actually, the issue is that
Icon.ExtractAssociatedIconis not implemented on Mono, so this approach won't work in a cross-platform manner.The only solution is to take the WinForms approach and provide an Icon property that must be set on its own.
#30
ah... thanks and thanks for property :)