#!ruby # -*- mode: ruby; coding: utf-8 -*- # Last updated: <2016/01/11 21:35:23 +0900> require_relative './lib/dxrubyws' control = WS::WSControl.new(200, 100, 100, 100) control.image = Image.new(100, 100, C_WHITE) control.extend WS::Draggable control.add_handler(:drag_move) do |obj, dx, dy| control.x += dx control.y += dy end WS.desktop.add_control(control) Window.loop do WS.update end