Results 1 to 3 of 3

Thread: mouse presses on two windows?

  1. #1

    Default mouse presses on two windows?

    Anyone know how to capture mouse presses if I open two windows simulatenously?

    I use this to capture mouse presses...
    CL_Slot mousePress = CL_Mouse::sig_key_down().connect(&handleMousePress );

    but, it only works on one of the open windows, not both of them !

    Thanks
    Richard

  2. #2
    ClanLib Developer
    Join Date
    Sep 2006
    Location
    Bergen, Norway
    Posts
    588

    Default

    If this is ClanLib 0.8, CL_Mouse is only a wrapper class.

    Internally it does

    CL_Display::get_current_window()->get_ic()->get_mouse(mouse).sig_key_down().connect(&handleMo usePress )

    when you call

    CL_Mouse::sig_key_down().connect(&handleMousePress )

    Try calling get_ic() on the displaywindows directly, see if that helps. But I have no idea how well this works in ClanLib 0.8 (multi display is better in 0.9 I think)

  3. #3

    Default

    Thanks

    it works fine, by settting up two mouse events, one for each window!#

    thanks for your help

Similar Threads

  1. mouse
    By attle in forum Novashell Game Creation System
    Replies: 5
    Last Post: 05-29-2008, 07:39 AM
  2. No focus for button under mouse when gui changes
    By LonelyStar in forum Official ClanLib SDK Forums
    Replies: 0
    Last Post: 05-05-2008, 01:49 PM
  3. resolution, mouse cursor, etc
    By Uhfgood in forum Novashell Game Creation System
    Replies: 1
    Last Post: 09-06-2007, 12:40 AM
  4. Mouse Input not caught always
    By gmatt in forum Official ClanLib SDK Forums
    Replies: 2
    Last Post: 06-26-2007, 11:13 PM
  5. Mouse Input
    By Soudeus in forum Official ClanLib SDK Forums
    Replies: 2
    Last Post: 04-25-2007, 01:57 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
  •