Class: RuneRb::Network::RS377::MouseEventMessage::Movement

Inherits:
Struct
  • Object
show all
Includes:
System::Log
Defined in:
app/network/protocol/rs377/incoming/mouse.rb

Overview

A mouse movement event

Since:

  • 0.9.3

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from System::Log

#class_name, #err, #err!, #log, #log!, #symbolize_file

Instance Attribute Details

#clicksObject

Returns the value of attribute clicks

Returns:

  • (Object)

    the current value of clicks


4
5
6
# File 'app/network/protocol/rs377/incoming/mouse.rb', line 4

def clicks
  @clicks
end

#delta?Object

Returns the value of attribute delta?

Returns:

  • (Object)

    the current value of delta?


4
5
6
# File 'app/network/protocol/rs377/incoming/mouse.rb', line 4

def delta?
  @delta?
end

#xObject

Returns the value of attribute x

Returns:

  • (Object)

    the current value of x


4
5
6
# File 'app/network/protocol/rs377/incoming/mouse.rb', line 4

def x
  @x
end

#yObject

Returns the value of attribute y

Returns:

  • (Object)

    the current value of y


4
5
6
# File 'app/network/protocol/rs377/incoming/mouse.rb', line 4

def y
  @y
end

Instance Method Details

#inspectObject

Since:

  • 0.9.3


7
8
9
10
11
# File 'app/network/protocol/rs377/incoming/mouse.rb', line 7

def inspect
  log! RuneRb::GLOBAL[:COLOR].blue("[CLICK_COUNT:] #{self.clicks}"),
       self.delta? ? RuneRb::GLOBAL[:COLOR].cyan.bold("[X:] #{self.x}") : RuneRb::GLOBAL[:COLOR].blue.bold("[X:] #{self.x}"),
       self.delta? ? RuneRb::GLOBAL[:COLOR].cyan.bold("[X:] #{self.x}") : RuneRb::GLOBAL[:COLOR].blue.bold("[X:] #{self.x}")
end