module RbSDL2::Mouse::MouseButton

Constants

SDL_BUTTON
SDL_BUTTON_LMASK
SDL_BUTTON_MMASK
SDL_BUTTON_RMASK
SDL_BUTTON_X1MASK
SDL_BUTTON_X2MASK

Public Instance Methods

any_button?(= button != 0) click to toggle source
# File lib/rb_sdl2/mouse/mouse_button.rb, line 11
def any_button? = button != 0

def left_button? = SDL_BUTTON_LMASK & button != 0

def middle_button? = SDL_BUTTON_MMASK & button != 0

def right_button? = SDL_BUTTON_RMASK & button != 0

def x1_button? = SDL_BUTTON_X1MASK & button != 0

def x2_button? = SDL_BUTTON_X2MASK & button != 0
    
left_button?(= SDL_BUTTON_LMASK & button != 0) click to toggle source
# File lib/rb_sdl2/mouse/mouse_button.rb, line 13
  def left_button? = SDL_BUTTON_LMASK & button != 0

  def middle_button? = SDL_BUTTON_MMASK & button != 0

  def right_button? = SDL_BUTTON_RMASK & button != 0

  def x1_button? = SDL_BUTTON_X1MASK & button != 0

  def x2_button? = SDL_BUTTON_X2MASK & button != 0
end
middle_button?(= SDL_BUTTON_MMASK & button != 0) click to toggle source
# File lib/rb_sdl2/mouse/mouse_button.rb, line 15
    def middle_button? = SDL_BUTTON_MMASK & button != 0

    def right_button? = SDL_BUTTON_RMASK & button != 0

    def x1_button? = SDL_BUTTON_X1MASK & button != 0

    def x2_button? = SDL_BUTTON_X2MASK & button != 0
  end
end
right_button?(= SDL_BUTTON_RMASK & button != 0) click to toggle source
# File lib/rb_sdl2/mouse/mouse_button.rb, line 17
      def right_button? = SDL_BUTTON_RMASK & button != 0

      def x1_button? = SDL_BUTTON_X1MASK & button != 0

      def x2_button? = SDL_BUTTON_X2MASK & button != 0
    end
  end
end
x1_button?(= SDL_BUTTON_X1MASK & button != 0) click to toggle source
# File lib/rb_sdl2/mouse/mouse_button.rb, line 19
    def x1_button? = SDL_BUTTON_X1MASK & button != 0

    def x2_button? = SDL_BUTTON_X2MASK & button != 0
  end
end
x2_button?(= SDL_BUTTON_X2MASK & button != 0) click to toggle source
# File lib/rb_sdl2/mouse/mouse_button.rb, line 21
  def x2_button? = SDL_BUTTON_X2MASK & button != 0
end