Small pet pive: Shared GUI Skins.
by AllynMcelrath · in Torque Game Engine · 10/11/2006 (7:15 am) · 8 replies
Small pet pive: Shared GUI Skins.
Something that has slightly annoyed me and something I hope my get changed in the future.
The world editor and all its parts share the same bitmap file or formatting (text and color ETC) as the rest of the game.
While I was skinning my interface , at the time I didn't think about it, but once you skin any control by editing its bitmap or the like, or even changing font size and color in the global since, you will inadvertently skin the editors and any related windows.
I have since gone forward and started separating the two letting the editors use the stock window skins, while leaving custom ones for the "Game".
I'm guessing this isn't major, but I bet a lot of users don't think about it, so if you drastically change things like say, the popup windows skin, things like size and the like, you have also just skinned the console window, or the lighting kits editor, and while the window is correct for your game.... It does some wonky things to those other windows in the editor. Or, if you change the font you wish to use for your game, and its size, all the fonts in the editor are now also changed.
In my opinion, this isn't good. As you can screw things up in your editor. The editor in my mind and for sanity should not be affected by changes you do to the GUI of your game.
So, if the folks at GG agree with me, I humbly request that in the next release you separate the two interfaces to use separate skins and settings.
Think of the new user.
Thanks.
Something that has slightly annoyed me and something I hope my get changed in the future.
The world editor and all its parts share the same bitmap file or formatting (text and color ETC) as the rest of the game.
While I was skinning my interface , at the time I didn't think about it, but once you skin any control by editing its bitmap or the like, or even changing font size and color in the global since, you will inadvertently skin the editors and any related windows.
I have since gone forward and started separating the two letting the editors use the stock window skins, while leaving custom ones for the "Game".
I'm guessing this isn't major, but I bet a lot of users don't think about it, so if you drastically change things like say, the popup windows skin, things like size and the like, you have also just skinned the console window, or the lighting kits editor, and while the window is correct for your game.... It does some wonky things to those other windows in the editor. Or, if you change the font you wish to use for your game, and its size, all the fonts in the editor are now also changed.
In my opinion, this isn't good. As you can screw things up in your editor. The editor in my mind and for sanity should not be affected by changes you do to the GUI of your game.
So, if the folks at GG agree with me, I humbly request that in the next release you separate the two interfaces to use separate skins and settings.
Think of the new user.
Thanks.
#2
When I get a chance ill look at where I changed it in mine, but I still think the windows and other skinable items need to be separated.
10/11/2006 (10:07 am)
I haven't ruled out that the font issues is me, where are you changing them at?When I get a chance ill look at where I changed it in mine, but I still think the windows and other skinable items need to be separated.
#3
10/11/2006 (10:23 am)
Hmm, that's odd Allyn. I haven't had this problem. For example, if I want a GuiWindowCtrl that has a different bitmap than the stock one, I just create a new profile and assign the new bitmap that way. Nothing else changes. I've changed pretty much everything too: fonts, opacity, coloring, bitmaps, ect. I see your point and the origin of the frustration, I just never ran into this using my development methods.
#4
In that is defined the GuiDefaultProfile, which is a default profile for GuiControlProfiles. That shows you some of the things you can change for various GuiControlProfiles, such as font, fontSize, fontColor, and so on.
Below that, you'll see other GuiControlProfiles defined using other names, and some of those change the font and fontSize. To use that profile, you create a Gui using your custom-defined profile.
So, for example, I've create a GuiControlProfile called GuiMenuButtonProfile, which has a different font and fontSize than the default Arial 14. For my main menu, I then create a series of GuiButtonCtrls using the profile "GuiMenuButtonProfile". Now I've got custom buttons using my style of text, without messing with the default profile used by the editor.
10/11/2006 (10:37 am)
Well, as far as fonts are concerned, you just have to look at a file like /common/ui/defaultProfiles.cs.In that is defined the GuiDefaultProfile, which is a default profile for GuiControlProfiles. That shows you some of the things you can change for various GuiControlProfiles, such as font, fontSize, fontColor, and so on.
Below that, you'll see other GuiControlProfiles defined using other names, and some of those change the font and fontSize. To use that profile, you create a Gui using your custom-defined profile.
So, for example, I've create a GuiControlProfile called GuiMenuButtonProfile, which has a different font and fontSize than the default Arial 14. For my main menu, I then create a series of GuiButtonCtrls using the profile "GuiMenuButtonProfile". Now I've got custom buttons using my style of text, without messing with the default profile used by the editor.
#5
When you design game GUIs, change the profile of the widgets you create to use your Game-specific profiles.
Then, make sure you load your gameProfiles.cs file before you load your game GUIs, and you're all set.
10/11/2006 (11:46 am)
The way to go is to create a GameDefaultProfile, which sets up the defaults how you want them for your game, and then derive GameButtonProfile, GameWindowProfile and friends from that. Leave the defaultProfiles.cs alone, as they live in the "common" directory.When you design game GUIs, change the profile of the widgets you create to use your Game-specific profiles.
Then, make sure you load your gameProfiles.cs file before you load your game GUIs, and you're all set.
#6
10/11/2006 (11:54 am)
This is true, I neglected to mention that.
#7
10/11/2006 (12:02 pm)
Anyone hear an echo in here? =)
#8
But IMO, one of two things needs to happen.
1. The elements are separated in the Stock torque download.
or
2. There is documentation available for new users about this processes. (IE:"Making your own GUI widgets")
I suppose if the first won't be considered by GG, then ill write another TDN article....
The reason I'm now in the position i am in is because of a lack of articles or Tutorials on the subject.
In fact most of the forum threads and articles i could find pointed me to those files to edit them...so here I am.
Thank you for all your responses.
EDIT: Sorry, that may have come off wrong. Consider it a lesson learned for me, but I am thinking about new users here, because of the lack of info, and my personal experience I now have to spend time separating out the two after the fact. Being an artiest first, I wanted to skin the GUI, so I went looking for articles and postings about it, I also just kind of scanned my project for anything GUI related that had an image, and once found...skined it, ending up where I am now.
10/12/2006 (1:44 pm)
I understand what you are all saying, and I am now doing this.But IMO, one of two things needs to happen.
1. The elements are separated in the Stock torque download.
or
2. There is documentation available for new users about this processes. (IE:"Making your own GUI widgets")
I suppose if the first won't be considered by GG, then ill write another TDN article....
The reason I'm now in the position i am in is because of a lack of articles or Tutorials on the subject.
In fact most of the forum threads and articles i could find pointed me to those files to edit them...so here I am.
Thank you for all your responses.
EDIT: Sorry, that may have come off wrong. Consider it a lesson learned for me, but I am thinking about new users here, because of the lack of info, and my personal experience I now have to spend time separating out the two after the fact. Being an artiest first, I wanted to skin the GUI, so I went looking for articles and postings about it, I also just kind of scanned my project for anything GUI related that had an image, and once found...skined it, ending up where I am now.
Torque 3D Owner Rubes