Results 1 to 1 of 1

Thread: Patch: Input outside of gui windows (GUIWindowManagerTexture & GUIManager)

  1. #1
    Lesser Knight
    Join Date
    Jan 2011
    Location
    Vienna, Austria
    Posts
    30

    Default Patch: Input outside of gui windows (GUIWindowManagerTexture & GUIManager)

    In my project, I need to be able to detect clicks and mouse movement also in the empty space between GUI windows. In the current svn version of ClanLib 2.3, this is not possible.
    Thus, I created the attached patch, which introduces a new Callback to CL_GUIManager, that is invoked whenever input outside of GUI components happens. The callback is mostly invoked on mouse events, because key presses are still redirected to the active window. However, if there are no windows on the screen (or no active window), also key events can be handled with this function.

    The behaviour of the GUI (focus, etc) is still the same, the patch just gives the user an opportunity to react to such events. The only change is (in my opinion) a bugfix: In the current svn version, if the cursor leaves a GUI window and enters free space, func_pointer_exit is not invoked. This is changed with the patch.

    I tested all GUI examples, and they were working as before.

    Cheers,
    spin


    edit: Sorry, the patch file was a bit malformed. Corrected version is attached.
    Attached Files Attached Files
    Last edited by spin; 04-20-2012 at 08:59 AM.

Similar Threads

  1. Text Input
    By kehran in forum Novashell Game Creation System
    Replies: 0
    Last Post: 09-04-2011, 06:31 AM
  2. Windows app crashing on Maximize (Windows XP)
    By BigBMan in forum Proton SDK
    Replies: 8
    Last Post: 03-17-2011, 01:38 AM
  3. New example in upcoming v2.0.3: Input
    By sphair in forum Official ClanLib SDK Forums
    Replies: 2
    Last Post: 05-20-2009, 11:11 AM
  4. CL 0.8 Canvas patch, get-rid-of-warnings patch
    By Trigve in forum Official ClanLib SDK Forums
    Replies: 2
    Last Post: 09-30-2007, 11:08 PM
  5. Input Buffers
    By gmatt in forum Official ClanLib SDK Forums
    Replies: 7
    Last Post: 07-14-2007, 08:18 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
  •