07-30-2014, 10:44 AM 
	
	
	
		Started a new sub-project dubbed RPGUI, which is short for Ruby Platform Graphical User Interface. It's nothing BIG yet but, for now, a prototype is being built using RGSS then it will be further ported to the RGL core. Yes, it will run on the RGL core but it will not require the actual ReGaL project itself. Instead, it is what I plan on building the Project Editor systems with, BUT... it's just a GUI utilities kind of dealio, you should (in theory) be able to build a graphical interface for any kind of multimedia application.
(Of course things don't always go as planned...)
A sample screenshot of an RPGUI widget...
![[Image: RPGUI-Sample_zps8bebf630.gif]](http://i224.photobucket.com/albums/dd288/Kain_Nobel/RPGUI-Sample_zps8bebf630.gif)
And the code used to generate it...
Thus far, it uses absolutely no graphics as things are code generated, but it will (optionally) allow for custom widget graphics later on. The current theme is based on VX Ace, but a custom color A and color B can be assigned as well.
Producing this:
![[Image: GUISample_zpsf1e94c97.png]](http://i224.photobucket.com/albums/dd288/Kain_Nobel/GUISample_zpsf1e94c97.png)
This is still very early development though, but... there you have it. That's what I've been up to. That and bashing my head against the wall to get various IDEs, compilers, libraries and other development tools to chain together and work, but that's a whole other post for another day :| There is much to plan out, but hopefully the end result will be worth the effort :3
	
	
	
	
(Of course things don't always go as planned...)
A sample screenshot of an RPGUI widget...
![[Image: RPGUI-Sample_zps8bebf630.gif]](http://i224.photobucket.com/albums/dd288/Kain_Nobel/RPGUI-Sample_zps8bebf630.gif)
And the code used to generate it...
Code:
#===============================================================================
# ** Scene_SampleGUI
#===============================================================================
class Scene_SampleGUI
  #-----------------------------------------------------------------------------
  # * Initialize
  #-----------------------------------------------------------------------------
  def initialize
    @bg       = GUI::Background.new(160,120,320,240)
    @panel    = GUI::Panel.new('Panel', 168,128,304,96)
    @button1  = GUI::Button.new('OK', 79, 212, @bg.viewport)
    @button2  = GUI::Button.new('Cancel', 161, 212, @bg.viewport)
    @button2.enabled = false
    @objects = []
    @objects << @bg
    @objects << @panel
    @objects << @button1
    @objects << @button2
  end
  #-----------------------------------------------------------------------------
  # * Update
  #-----------------------------------------------------------------------------
  def update
    Input.update
    Graphics.update
    @objects.each {|object| object.update}
  end
  #-----------------------------------------------------------------------------
  # * Dispose
  #-----------------------------------------------------------------------------
  def dispose
    @objects.each {|object| object.dispose}
    @disposed = true
  end
  #-----------------------------------------------------------------------------
  # * Disposed?
  #-----------------------------------------------------------------------------
  def disposed?
    @disposed
  end
end
  
  
#===============================================================================
# ** Begin button test
#===============================================================================
begin
  gui = Scene_SampleGUI.new
  while !gui.disposed?
    gui.update
  end
end
exitThus far, it uses absolutely no graphics as things are code generated, but it will (optionally) allow for custom widget graphics later on. The current theme is based on VX Ace, but a custom color A and color B can be assigned as well.
Code:
#===============================================================================
# * GUI::RedButton
#===============================================================================
class GUI::RedButton < GUI::Button
  #-----------------------------------------------------------------------------
  # * Color A
  #-----------------------------------------------------------------------------
  def color_a
    @color_a ||= Color.new(160,96,96)
  end
  #-----------------------------------------------------------------------------
  # * Color B
  #-----------------------------------------------------------------------------
  def color_b
    @color_b ||= Color.new(128,64,64)
  end
end
#===============================================================================
# ** GUI::BlackBackground
#===============================================================================
class GUI::GreenBackground < GUI::Background
  #-----------------------------------------------------------------------------
  # * Color A
  #-----------------------------------------------------------------------------
  def color_a
    @color_a ||= Color.new(96,160,80)
  end
  #-----------------------------------------------------------------------------
  # * Color B
  #-----------------------------------------------------------------------------
  def color_b
    @color_b ||= Color.new(0,80,0)
  end
end
#===============================================================================
# ** Scene_SampleGUI
#===============================================================================
class Scene_SampleGUI
  #-----------------------------------------------------------------------------
  # * Initialize
  #-----------------------------------------------------------------------------
  def initialize
    @bg       = GUI::GreenBackground.new(160,120,320,240)
    @panel    = GUI::Panel.new('Panel', 168,128,304,96)
    @button1  = GUI::RedButton.new('OK', 79, 212, @bg.viewport)
    @button2  = GUI::Button.new('Cancel', 161, 212, @bg.viewport)
    @button2.enabled = false
    @objects = []
    @objects << @bg
    @objects << @panel
    @objects << @button1
    @objects << @button2
  end
  #-----------------------------------------------------------------------------
  # * Update
  #-----------------------------------------------------------------------------
  def update
    Input.update
    Graphics.update
    @objects.each {|object| object.update}
  end
  #-----------------------------------------------------------------------------
  # * Dispose
  #-----------------------------------------------------------------------------
  def dispose
    @objects.each {|object| object.dispose}
    @disposed = true
  end
  #-----------------------------------------------------------------------------
  # * Disposed?
  #-----------------------------------------------------------------------------
  def disposed?
    @disposed
  end
end
  
  
#===============================================================================
# ** Begin button test
#===============================================================================
begin
  gui = Scene_SampleGUI.new
  while !gui.disposed?
    gui.update
  end
end
exitProducing this:
![[Image: GUISample_zpsf1e94c97.png]](http://i224.photobucket.com/albums/dd288/Kain_Nobel/GUISample_zpsf1e94c97.png)
This is still very early development though, but... there you have it. That's what I've been up to. That and bashing my head against the wall to get various IDEs, compilers, libraries and other development tools to chain together and work, but that's a whole other post for another day :| There is much to plan out, but hopefully the end result will be worth the effort :3

 
 
 What's up, RMers?
 What's up, RMers?
 
 
![[Image: Button-BOTB.png]](https://i.postimg.cc/tTyHps78/Button-BOTB.png)
![[Image: Save-Point.gif]](https://i.postimg.cc/26znDy3v/Save-Point.gif)
![[Image: Button-You-Tube2.png]](https://i.postimg.cc/MphKJF38/Button-You-Tube2.png)
![[Image: Button-Sound-Cloud2.png]](https://i.postimg.cc/cLK4jSmm/Button-Sound-Cloud2.png)
![[Image: Button-Audio-Mack2.png]](https://i.postimg.cc/0Q8zw08x/Button-Audio-Mack2.png)
![[Image: LS-Banner.gif]](https://i.postimg.cc/9MRtf4jm/LS-Banner.gif)