Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 
Share Thread:
Reddit Facebook Twitter
[fixed] Why CTRL+R not equal to MMB ?
10-30-2015, 02:27 AM
Post: #5
RE: [ggaliens] Why CTRL+R not equal to MMB ?
This is seems like a fix ...
Code:
get_mouse_state() ->
    wx:batch(fun() ->
             MS = wx_misc:getMouseState(),
             #wxMouseState{x=X0, y=Y0,  %% integer()
                   leftDown=Left,
                   middleDown=Middle,
                   rightDown=Right %% bool()
                  } = MS,
             {X,Y} = wxWindow:screenToClient(get(gl_canvas), {X0,Y0}),

             C = wings_io:is_modkey_pressed(?CTRL_BITS),
             if (C andalso Right) ->  % example ... used by Nendo two button folks.
                 {gui_state([{Left,   ?SDL_BUTTON_LMASK},
                     {true, ?SDL_BUTTON_MMASK},
                     {false,  ?SDL_BUTTON_RMASK}], 0), X, Y};
             true ->
                 {gui_state([{Left,   ?SDL_BUTTON_LMASK},
                     {Middle, ?SDL_BUTTON_MMASK},
                     {Right,  ?SDL_BUTTON_RMASK}], 0), X, Y}
             end
         end).
Reply


Messages In This Thread
RE: [ggaliens] Why CTRL+R not equal to MMB ? - ggaliens - 10-30-2015 02:27 AM

Forum Jump:


User(s) browsing this thread: 1 Guest(s)