Sha256: 81793e05c0c2d8ee6a0cd230bff78e9bb17c35c372f99a2acfa378339627e6f3

Contents?: true

Size: 463 Bytes

Versions: 15

Compression:

Stored size: 463 Bytes

Contents

# -*- coding: utf-8 -*-
require 'dxruby'

c = 255
r = 1

font = Font.new(32)
i = Image.new(640, 480)

Window.loop do
  c -= Input.x
  if c > 255
    c = 255
  end
  if c < 0
    c = 0
  end

  r -= Input.y
  if r > 20
    r = 20
  end
  if r < 1
    r = 1
  end

  Window.drawFont(0, 0, "C:#{c} R:#{r}", font)

  if  Input.mouseDown?(M_LBUTTON)
    x = Input.mousePosX
    y = Input.mousePosY
    i.circleFill(x, y, r, [c, c, c])
  end
  Window.draw(0, 0, i)
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
dxruby_sdl-0.0.17 samples/kadai2.rb
dxruby_sdl-0.0.16 samples/kadai2.rb
dxruby_sdl-0.0.15 samples/kadai2.rb
dxruby_sdl-0.0.14 samples/kadai2.rb
dxruby_sdl-0.0.13 samples/kadai2.rb
dxruby_sdl-0.0.12 samples/kadai2.rb
dxruby_sdl-0.0.11 samples/kadai2.rb
dxruby_sdl-0.0.10 samples/kadai2.rb
dxruby_sdl-0.0.9 samples/kadai2.rb
dxruby_sdl-0.0.8 samples/kadai2.rb
dxruby_sdl-0.0.7 samples/kadai2.rb
dxruby_sdl-0.0.6 samples/kadai2.rb
dxruby_sdl-0.0.5 samples/kadai2.rb
dxruby_sdl-0.0.4 samples/kadai2.rb
dxruby_sdl-0.0.3 samples/kadai2.rb