Results 1 to 13 of 13

Thread: Buttons fonts in ClanLib 1.0.0

  1. #1
    Lesser Knight
    Join Date
    Jun 2007
    Location
    Finland
    Posts
    44

    Default Buttons fonts in ClanLib 1.0.0

    I upgraded my game to use ClanLib 1.0.0 instead of 0.8.0. Now all button fonts seem to be black, even if I try to set the font color. Any idea why? I do it like this:

    font1 = new CL_Font("Font1", resources);
    font1->set_color( 1.0f,1.0f,1.0f );
    button1 = new CL_Button(CL_Rect( x1, y1, x2, y2 ), "Text", guimanager);
    CL_Button_Silver *button_style = (CL_Button_Silver *)button1->get_style();
    button_style->set_surface_up(surfaceUp);
    button_style->set_surface_down(surfaceDown);
    button_style->set_font(font1);

  2. #2
    ClanLib Developer
    Join Date
    May 2007
    Posts
    1,824

    Default

    I don't know, I have never used 1.0.0

    But you may want to look at http://www.rtsoft.com/forums/showthread.php?t=2924 ... it may be connected

  3. #3
    Administrator Seth's Avatar
    Join Date
    Jul 2002
    Location
    Japan
    Posts
    5,343

    Default

    Assuming you're using a font that came with 0.8:

    You may need to update your font graphic (.tga? .png? Not sure..) to the one in the 1.0 distribution.

    Somewhere along the line it was retouched to be white to work with the font coloring system.
    Seth A. Robinson
    Robinson Technologies

  4. #4
    Lesser Knight
    Join Date
    Jun 2007
    Location
    Finland
    Posts
    44

    Default

    Quote Originally Posted by Seth View Post
    Assuming you're using a font that came with 0.8:
    No, I'm using my own custom fonts, all white.

  5. #5
    Lesser Knight
    Join Date
    Jun 2007
    Location
    Finland
    Posts
    44

    Default

    And note that this is only button fonts, everything else seems to be working as in 0.8.

  6. #6
    Administrator Seth's Avatar
    Join Date
    Jul 2002
    Location
    Japan
    Posts
    5,343

    Default

    Hrm, no idea there.

    The change to 1.0 was more a naming thing than actual changes, don't recall anything happening with button labels.

    Do any of the example apps (Simple GUI maybe) also show this error?
    Seth A. Robinson
    Robinson Technologies

  7. #7
    Lesser Knight
    Join Date
    Jun 2007
    Location
    Finland
    Posts
    44

    Default

    Quote Originally Posted by Seth View Post
    Do any of the example apps (Simple GUI maybe) also show this error?
    The Simple GUI has no buttons? ExampleGUIStyle seems to be working fine at least.

  8. #8
    Lesser Knight
    Join Date
    Jun 2007
    Location
    Finland
    Posts
    44

    Default

    Do you still have 0.8 anywhere available? I really need to get this work.

  9. #9

  10. #10
    Lesser Knight
    Join Date
    Jun 2007
    Location
    Finland
    Posts
    44

    Default

    Tack så mycket!

    Unfortunately, the problem still exists

    Initially, when I experienced this issue for the first time, I had a new hard disk and started everything from scratch... Also, I upgraded to Visual Studio 2008. I had been using VS 2005 before this, both Express editions. I wonder if that has something to do with this. I remember that VS 2005 required quite a lot of tweaking before you could do anything sensible with it, VS 2008 on the other hand was very easy to setup for ClanLib. Everything else seems to work perfectly, except those dang button fonts.

  11. #11
    ClanLib Developer
    Join Date
    May 2007
    Posts
    1,824

    Default

    Ensure you have updated the graphics card driver to the latest driver on the nvidia/ati download page
    else maybe update to clanlib 2.1 - See http://clanlib.org/docs/clanlib-2.1/...w/porting.html
    (clanlib.org is very slow at the moment from my pc)

  12. #12
    Administrator Seth's Avatar
    Join Date
    Jul 2002
    Location
    Japan
    Posts
    5,343

    Default

    Quote Originally Posted by Veitikka View Post
    ExampleGUIStyle seems to be working fine at least.
    The example works fine but your custom fonts don't? Hrm. I'd compare the two closely and switch to the example media as a test.
    Seth A. Robinson
    Robinson Technologies

  13. #13
    Lesser Knight
    Join Date
    Jun 2007
    Location
    Finland
    Posts
    44

    Default

    Holy Holograms! I noticed that CL_Button_Silver sets the font color black after I've set the font for it. I wonder why it hasn't done it before. Anyway, I just set the color for the font pointer again, and it works.

Similar Threads

  1. ClanLib 0.9 OpenGL Fonts
    By rombust in forum Official ClanLib SDK Forums
    Replies: 3
    Last Post: 09-05-2008, 11:45 AM
  2. my fonts are really grainy
    By babyvegas in forum Official ClanLib SDK Forums
    Replies: 4
    Last Post: 07-11-2008, 04:07 PM
  3. ClanLib gui and fonts
    By LonelyStar in forum Official ClanLib SDK Forums
    Replies: 1
    Last Post: 04-28-2008, 07:52 AM
  4. GUIs, Buttons, and the like...
    By Methius in forum Official ClanLib SDK Forums
    Replies: 4
    Last Post: 03-28-2008, 07:50 PM
  5. Dynamically generate GUI buttons,labels and stuff
    By d_oilen in forum Official ClanLib SDK Forums
    Replies: 2
    Last Post: 11-22-2006, 09:21 AM

Bookmarks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •