-I did use the search feature, so you can't hold that against me. :P-
Screenshot
Alright, I'll get to the point.
I'm making a menu system to go along with a game I'm designing with the ZTBS.
I customized the menu so far, to display up to 9 characters at once.
But there's a problem that could cause me to have to remove my "9Character-Menu" part, and edit that back to 4.
As you can see in the screenshot, I'm on the Equips function.
It works fine, but the selector rectangle is causing me some problems.
It's huge, basically; but what I want it to do, is have it only take up 1/9th of the window, and not 1/4. What happens is, when I get to the fifth person on the equip screen, the rectangle goes off-screen, but it still selects the character if I hit enter.
I'm assuming it has something to do with Window_Selectable, but I'm not sure about that.
What I did exactly, was copy the Window_Selectable script, and paste a new one, renaming it to Window_MSelectable. (MenuSelectable)
Then for my menu system, I did the same for Window_MenuStatus, renaming it Window_CharInfo, because that's what it is.
Here's my Window_CharInfo script if you need it.
Also note that I did not make any changes in Window_MSelectable; it's the same as Window_Selectable.
So, if anyone thinks they know/does know the solution to fitting the rectangle on screen, please reply.
Thanks in advance.
Screenshot
Alright, I'll get to the point.
I'm making a menu system to go along with a game I'm designing with the ZTBS.
I customized the menu so far, to display up to 9 characters at once.
But there's a problem that could cause me to have to remove my "9Character-Menu" part, and edit that back to 4.
As you can see in the screenshot, I'm on the Equips function.
It works fine, but the selector rectangle is causing me some problems.
It's huge, basically; but what I want it to do, is have it only take up 1/9th of the window, and not 1/4. What happens is, when I get to the fifth person on the equip screen, the rectangle goes off-screen, but it still selects the character if I hit enter.
I'm assuming it has something to do with Window_Selectable, but I'm not sure about that.
What I did exactly, was copy the Window_Selectable script, and paste a new one, renaming it to Window_MSelectable. (MenuSelectable)
Then for my menu system, I did the same for Window_MenuStatus, renaming it Window_CharInfo, because that's what it is.
Here's my Window_CharInfo script if you need it.
#==============================================================================
# â– Window_CharInfo
#------------------------------------------------------------------------------
#
#==============================================================================
class Window_CharInfo < Window_MSelectable
def initialize
super(0, 0, 640, 480)
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.name = $defaultfonttype
self.contents.font.size = $defaultfontsize
refresh
self.active = false
self.index = -1
self.contents.draw_text(495, 145, 100, 100, "Commands")
end
def refresh
self.contents.clear
@item_max = $game_party.actors.size
for i in 0...$game_party.actors.size
x = 64
y = i * 50
actor = $game_party.actors
draw_actor_graphic(actor, x - 47, y + 45)
draw_actor_name(actor, x - 30, y - 5)
draw_actor_class(actor, x + 45, y - 5)
draw_actor_level(actor, x - 30, y + 17)
draw_actor_exp(actor, x + 120, y - 5)
draw_actor_hp(actor, x + 50, y + 17)
draw_actor_sp(actor, x + 210, y + 17)
end
end
def update_cursor_rect
if @index < 0
self.cursor_rect.empty
else
self.cursor_rect.set(0, @index * 116, self.width - 32, 96)
end
end
end
# â– Window_CharInfo
#------------------------------------------------------------------------------
#
#==============================================================================
class Window_CharInfo < Window_MSelectable
def initialize
super(0, 0, 640, 480)
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.name = $defaultfonttype
self.contents.font.size = $defaultfontsize
refresh
self.active = false
self.index = -1
self.contents.draw_text(495, 145, 100, 100, "Commands")
end
def refresh
self.contents.clear
@item_max = $game_party.actors.size
for i in 0...$game_party.actors.size
x = 64
y = i * 50
actor = $game_party.actors
draw_actor_graphic(actor, x - 47, y + 45)
draw_actor_name(actor, x - 30, y - 5)
draw_actor_class(actor, x + 45, y - 5)
draw_actor_level(actor, x - 30, y + 17)
draw_actor_exp(actor, x + 120, y - 5)
draw_actor_hp(actor, x + 50, y + 17)
draw_actor_sp(actor, x + 210, y + 17)
end
end
def update_cursor_rect
if @index < 0
self.cursor_rect.empty
else
self.cursor_rect.set(0, @index * 116, self.width - 32, 96)
end
end
end
Also note that I did not make any changes in Window_MSelectable; it's the same as Window_Selectable.
So, if anyone thinks they know/does know the solution to fitting the rectangle on screen, please reply.
Thanks in advance.