Sha256: 378bfc0a14fde243b20311ca0682f8c5d555a2ab978d18420c3290ae5c238f4b

Contents?: true

Size: 907 Bytes

Versions: 1

Compression:

Stored size: 907 Bytes

Contents

class Shoes
  module Swt
    class Progress
      def fraction=(value)
        @real.selection = (value*100).to_i unless @real.disposed?
      end
    end

    class TextBlockPainter

      # added the return statement on line 8
      def paintControl(paint_event)
        graphics_context = paint_event.gc
        gcs_reset graphics_context
        @text_layout.setText @dsl.text
        set_styles
        if @dsl.width
          @text_layout.setWidth @dsl.width
          return if @dsl.absolute_left.nil? || @dsl.margin_left.nil? || @dsl.absolute_top.nil? || @dsl.margin_top.nil?
          @text_layout.draw graphics_context, @dsl.absolute_left + @dsl.margin_left, @dsl.absolute_top + @dsl.margin_top
          if @dsl.cursor
            move_text_cursor
          else
            (@dsl.textcursor.remove; @dsl.textcursor = nil) if @dsl.textcursor
          end
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
pirate_game-0.0.1 lib/pirate_game/shoes4_patch.rb