Advanced Command Windows VXPlanned features include the basic types:
- Vertical
- Horizontal
- Grid
- Ring
- Slide Vertical (Vertical menu, but commands move instead of cursor)
- Slide Horizontal (Horizontal menu, but commands move instead of cursor)
The features from the last edition of ACW will be included as well.
Please request any features you would like in this script.
[spoiler=Advanced Command Windows VX version 0]
#==============================================================================
# ** Window_Command
#------------------------------------------------------------------------------
# This window deals with general command choices.
#==============================================================================
class Window_Command < Window_Selectable
#--------------------------------------------------------------------------
# * Public Instance Variables
#--------------------------------------------------------------------------
attr_reader :commands # command
#--------------------------------------------------------------------------
# * Object Initialization
# width : window width
# commands : command string array
# column_max : digit count (if 2 or more, horizontal selection)
# row_max : row count (0: match command count)
# spacing : blank space when items are arrange horizontally
#--------------------------------------------------------------------------
def initialize(width, commands, column_max = 1, row_max = 0, spacing = 32)
if !yield.nil?
@attributes = yield
case @attributes['type']
when 'vertical'
if row_max == 0
row_max = (commands.size + column_max - 1) / column_max
end
super(0, 0, width, row_max * WLH + 32, spacing)
@commands = commands
@item_max = commands.size
@column_max = column_max
when 'horizontal'
super(0,0,width,WLH +32, spacing)
@commands = commands
@item_max = commands.size
@row_max = 1
@column_max = @item_max
when 'grid'
#code
when 'ring'
#code
when 'slide_v'
#code
when 'slide_h'
#code
end
else
if row_max == 0
row_max = (commands.size + column_max - 1) / column_max
end
super(0, 0, width, row_max * WLH + 32, spacing)
@commands = commands
@item_max = commands.size
@column_max = column_max
end
refresh
self.index = 0
end
#--------------------------------------------------------------------------
# * Refresh
#--------------------------------------------------------------------------
def refresh
self.contents.clear
for i in 0...@item_max
draw_item(i)
end
end
#--------------------------------------------------------------------------
# * Draw Item
# index : item number
# enabled : enabled flag. When false, draw semi-transparently.
#--------------------------------------------------------------------------
def draw_item(index, enabled = true)
rect = item_rect(index)
rect.x += 4
rect.width -= 8
self.contents.clear_rect(rect)
self.contents.font.color = normal_color
self.contents.font.color.alpha = enabled ? 255 : 128
self.contents.draw_text(rect, @commands[index])
end
end
[/spoiler]
Sounds nice! Hope it would be possible to use simple call script commands when eventing!
Looking good Tsuno. Good luck.
Could you please make a description, for the people who do not know what this is?
Personally I don't understand the crap out of it.
This script (when completed) will allow you to create a number of different command window types with high-levels of customizability, all while keeping it simple.
I did this for XP (http://rmrk.net/index.php/topic,25167.0.html) but you were limited to two command window types, this version for VX will allow for 6 command window types.
The customizability, will include everything from the XP version as well as anything you guys suggest (that is possible :P ).
Could you post some screens of what it'd look like? I can't wait to see the ring!
Quote from: Tsunokiette on May 10, 2008, 01:37:26 AM
This script (when completed) will allow you to create a number of different command window types with high-levels of customizability, all while keeping it simple.
I did this for XP (http://rmrk.net/index.php/topic,25167.0.html) but you were limited to two command window types, this version for VX will allow for 6 command window types.
The customizability, will include everything from the XP version as well as anything you guys suggest (that is possible :P ).
Thank you, I look forward to it.