Gui Profiles that inherit system look and feel
by Steve Lamperti · in Torque Game Engine · 12/22/2005 (3:22 pm) · 9 replies
I'm looking for a way to set up the Gui profiles to query the system for the right colors and other elements to inherit the user selected look and feel of the OS. (This would basically make the torque project look like any other Windows or Mac application.) Does anyone know of a resource that heads in this direction? I know I could do it myself by writing a fair bit of code, but I was hoping someone had already done it. Any suggestions are welcome.
#2
I do mean inheriting the user's customized settings. I'll check out what the demo does, but I think that it's the same as my project already does. I saw that it did something different on windows then on the mac.
12/22/2005 (5:11 pm)
@Ben I do mean inheriting the user's customized settings. I'll check out what the demo does, but I think that it's the same as my project already does. I saw that it did something different on windows then on the mac.
#3
since checkboxes etc are all bitmaps in torque.
simple rectangular elements like plain buttons might be doable tho.
12/22/2005 (6:14 pm)
Might be difficult,since checkboxes etc are all bitmaps in torque.
simple rectangular elements like plain buttons might be doable tho.
#4
For Mac, you'll need to read files in the user's home directory.
12/22/2005 (7:55 pm)
Well, it might take some finess. But if you change the bitmap array formats to window's bitmap arrays (AS FAR AS I KNOW) you could just tap into C:\Windows\Resources\Themes <-- Will take a resourcemanager hack to get outside torque directory. Then also use something to read the settings in windows.For Mac, you'll need to read files in the user's home directory.
#5
12/23/2005 (1:22 am)
Either that or have a choice of look and feel setups that mimic Mac and Windows common setups and let the user choose. Doing it automatically will probably not be consistent and will most likely change with the next version upgrade of Windows.
#6
12/23/2005 (1:37 am)
It is totaly possible to modulate a bitmap's color in Torque.
#7
12/23/2005 (2:16 pm)
You can get all the user's color selections some fairly well known API calls. (Check MSDN, I haven't looked at that part of win32 in years. :) Then you could tint using the bitmap color stuff. Seems like a lot of work for minimal gain, but I'm sure it would be an interesting resource.
#9
I would advise having default values, then when Torque starts have it check the API's and use what it finds and keep the rest as standard values. You could probably build the rest into the controls themselves. If all else fails you could always capture the window Torque is launched in, into a image and try to programaticaly cut it up to get the title and button styles. Then pick the base colour from the button image and go from there?.
Let us all know how you get on.
12/27/2005 (2:53 pm)
Very interesting. Will be following this one.I would advise having default values, then when Torque starts have it check the API's and use what it finds and keep the rest as standard values. You could probably build the rest into the controls themselves. If all else fails you could always capture the window Torque is launched in, into a image and try to programaticaly cut it up to get the title and button styles. Then pick the base colour from the button image and go from there?.
Let us all know how you get on.
Associate Kyle Carter