Results 1 to 5 of 5

Thread: GUI button question

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

    Default GUI button question

    When I press enter/space that makes some GUI button to be pressed down also if it's "highlighted". Is there way to disable this?

    I'm using ClanLib 0.8.0.

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

    Default

    Is this really unknown issue for Clanlib developers? Space and enter are completely useless keys because of this. Should I give better explanation?

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

    Default

    The 0.8 GUI is a bit clunky bit I've been able to get it to behave decently with 'floating palettes' etc with some hacky work-arounds.

    After you initialize your buttons, perhaps you want to remove the focus from them, so enter won't automatically click a button?

    A way to turn off the focus is to set the focus to your main GUI root.

    Ie:

    m_pMyGUIManager->set_focus(m_pMyGUIManager);

    This way hitting <Enter> shouldn't activate any GUI elements.
    Seth A. Robinson
    Robinson Technologies

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

    Default

    That seems to work. According to docs there should be set_focusable() for components, including buttons?

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

    Thumbs up

    Yep, that works too - use set_focusable(false) on a component if it should not be focusable at any time.
    Seth A. Robinson
    Robinson Technologies

Similar Threads

  1. Button ID
    By madmark in forum Official ClanLib SDK Forums
    Replies: 2
    Last Post: 09-25-2007, 09:09 PM

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
  •