node/lib/metasm/metasm/gui/win32.rb
# draw the button on the parent widget
draw the button on the parent widget
draw the button on the parent widget
def paint(w)
		c1, c2 = @c1, @c2
		c1, c2 = c2, c1 if @down
		w.draw_string_color(:text, @x+(@w-w.font_width*@text.length)/2, @y+(@h - w.font_height)/2, @text)
		w.draw_line_color(c1, @x, @y, @x, @y+@h)
		w.draw_line_color(c1, @x, @y, @x+@w, @y)
		w.draw_line_color(c2, @x+@w, @y+@h, @x, @y+@h)
		w.draw_line_color(c2, @x+@w, @y+@h, @x+@w, @y)
	end
def paint ( w ) c1 , c2 = @c1 , @c2 c1 , c2 = c2 , c1 if @down w . draw_string_color ( :text , @x + ( @w - w . font_width * @text . length ) / 2 , @y + ( @h - w . font_height ) / 2 , @text ) w . draw_line_color ( c1 , @x , @y , @x , @y + @h ) w . draw_line_color ( c1 , @x , @y , @x + @w , @y ) w . draw_line_color ( c2 , @x + @w , @y + @h , @x , @y + @h ) w . draw_line_color ( c2 , @x + @w , @y + @h , @x + @w , @y ) end
draw the button on the parent widget
draw the button on the parent widget
w