About Store Forum Documentation Contact



Post Reply 
window bar: can i change it?
Author Message
yvanvds Offline
Member

Post: #1
window bar: can i change it?
Hey.

Is there any way to change the color of the blue window bar? Or perhaps have the Top Image in the gui style editor scale with the window width?

I must say, of all the splendid tools we have, the gui editor always gets on my nerves smile Last time I made the gui almost completely in Inkscape, but that is hard for updates. So I'm trying to do it with styles again, but not with much success.

I also found out that dropping a png on the image Top, Corner and such works ok, but if I use the file browser button in there my image does not show.


Cheers!

yvan
(This post was last modified: 01-18-2011 12:48 AM by yvanvds.)
01-17-2011 10:44 PM
Find all posts by this user Quote this message in a reply
Esenthel Online
Administrator

Post: #2
RE: window bar: can i change it?
you can hide the title bar, or modify Gui.image_win_bar at the start of Init()
the same thing you can do with Gui.image_progress
01-18-2011 12:49 AM
Find all posts by this user Quote this message in a reply
yvanvds Offline
Member

Post: #3
RE: window bar: can i change it?
How silly! I kept looking in the gui editor and forgot to check the code headers. There's a whole range of interesting stuff there.

I think I found most of what I want, but where is the TextDS for the main menu? I mean I added a menu directly to the Gui object. I can use tds_cmenu for the submenu, color_cmenu for the submenu background, and image_menu for the menu background. But how do I change the font and text color of the main menu?
01-18-2011 04:02 PM
Find all posts by this user Quote this message in a reply
Esenthel Online
Administrator

Post: #4
RE: window bar: can i change it?
Hello,

For that you'd need to modify the global Text_ds settings
01-18-2011 04:21 PM
Find all posts by this user Quote this message in a reply
yvanvds Offline
Member

Post: #5
RE: window bar: can i change it?
I think I did. Like this:

PHP Code:
Bool Init()
{
    
Text_ds.color Color(25510200);
    
Font orangeFont;
    
orangeFont Fonts("Gui/Text/Trebuchet48.font");
    
Text_ds.font orangeFont;
    
Text_ds.scale 0.045;

    
Gui.color_cmenu BLACK;
    
Gui.tds_cmenu Text_ds;
    
Gui.tds_text Text_ds;
    
Gui.tds_window Text_ds;
    
Gui.image_menu Images.get("Gui/skin/menu.gfx");
    
Gui.image_win_bar Images.get("Gui/skin/menu.gfx");

    
Node<CMenuElmn;

    ... (
create menu here) ...

    
Gui += menu.create(n);


    if (
obj.load("gui/skin/test.gobj")) {
        
window2 = &obj.getWindow("window");
        
window2->show();
    }
    
Gui += obj;


  return 
true;


If I see it correctly, the font has changed. But the font colour of the menu, and also of the text in the window bar have not. See here:

http://img407.imageshack.us/img407/4091/guitest2.jpg
01-18-2011 05:36 PM
Find all posts by this user Quote this message in a reply
Esenthel Online
Administrator

Post: #6
RE: window bar: can i change it?
Ill add Gui.tds_menu to next SDK
and tds_window.color will be used in next SDK (now it's ignored)
01-18-2011 10:45 PM
Find all posts by this user Quote this message in a reply
yvanvds Offline
Member

Post: #7
RE: window bar: can i change it?
That's Great! Thanks a lot.
01-18-2011 11:25 PM
Find all posts by this user Quote this message in a reply
yvanvds Offline
Member

Post: #8
RE: window bar: can i change it?
I think I found another small issue. The rectangle around a checkbox while hovering over it, is not affected by Gui.kb_lit. It just stays white. While not a matter of life and death, it does look a bit strange.

I've uploaded a screenshot here: http://img84.imageshack.us/img84/6614/guitest2.png

Sorry to pester you again :-)
01-19-2011 02:17 PM
Find all posts by this user Quote this message in a reply
Post Reply