Sha256: 4576a3f4ed2bc86a82c63a8455c771f33f73034815016b8d7f826a4f21a17ae3
Contents?: true
Size: 1.34 KB
Versions: 1
Compression:
Stored size: 1.34 KB
Contents
module GGLib class Cursor attr_reader :img, :visible, :imgObj def initialize(img,visible) @img=img @visible=visible @imgObj=Gosu::Image.new($window,img,true) @forced=false end def toggleVisible if not @forced @visible=!@visible end end def forceVisible(visible=true) @forced=true @visible=visible end def unforceVisible @forced=false end def visible? return visible end def visible=(visible) if not @forced @visible=visible end end def draw if @visible @imgObj.draw($window.mouse_x,$window.mouse_y,ZOrder::Cursor) end end end class MouseDragEvent attr_reader :start_x, :start_y, :end_x, :end_y, :inprogress, :starting def initialize @start_x, @start_y = 0 @end_x, @end_y = 0 @inprogress = false @starting = false end def start @start_x, @start_y = $window.mouse_x, $window.mouse_y @starting = true end def confirmStart @starting = false @inprogress = true end def end @end_x, @end_y = $window.mouse_x, $window.mouse_y @inprogress = false end def terminate @inprogress, @starting = false end end end #module GGLib
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
gglib-1.1.0 | lib/mouse.rb |