# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
#You can contract the author at wikipediankiba@gmail.com
require "rubygame"
require "rbGooey"
include Rubygame
TTF.setup
class Menu
def initialize
@screen = Main.new
@screen.screen_set(800 , 600)
@screen.font_set("freesansbold.ttf", 16)
@screen.bgcolor = [20,70,20]
@screen.fgcolor = [200,200,200]
@text = TextMode.new(@screen)
@text.omit = false
@mouse = Mouse_input.new
@mouse.name('mouse.png')
menu
end
def menu
@text.add"TESTING"
@text.active
@text.add("Muahhahaha!")
@text.set_pos(333,200)
@text.active
@text.textrender.render_text
q = Rubygame::Queue.instance
while 1
@screen.screen.flip
q.get.each do |event|
mouse(event)
case event
when Rubygame::KeyDownEvent
case event.key
when Rubygame::K_ESCAPE
exit
end
end
end
@mouse.update
end
end
end
Menu.new