Wow its been 5 years.. I'm getting into the program again. Only beginner level at coding.
I am organizing my menus and they work as they should except for one thing.
Here you can see all is well, cursor is fine. But when I click equip this happens
Now the cursor is the wrong size. Ive been looking at the scripts since yesterday but I cant find the problem, no results on google. I will post my script, maybe someone can see the issue
I have other scripts like this for the other menus. Otherwise I just have a script that changes the font, one that changes game size and one that fixes a text bug.
I am organizing my menus and they work as they should except for one thing.
Here you can see all is well, cursor is fine. But when I click equip this happens
Code:
$data_system = load_data("Data/System.rvdata2") if $data_system == nil
class Scene_Equip < Scene_MenuBase
def start
super
create_help_window
create_status_window
create_command_window
create_slot_window
create_item_window
end
def create_status_window
@status_window = Window_EquipStatus.new(0, @help_window.height)
@status_window.viewport = @viewport
@status_window.actor = @actor
@status_window.x = 106
@status_window.y = 193
@status_window.height = 140
@status_window.width = 140
end
def create_command_window
wx = @status_window.width
wy = @help_window.height
ww = Graphics.width - @status_window.width
@command_window = Window_EquipCommand.new(wx, wy, ww)
@command_window.viewport = @viewport
@command_window.help_window = @help_window
@command_window.set_handler(:equip, method(:command_equip))
@command_window.set_handler(:optimize, method(:command_optimize))
@command_window.set_handler(:clear, method(:command_clear))
@command_window.set_handler(:cancel, method(:return_scene))
@command_window.set_handler(:pagedown, method(:next_actor))
@command_window.set_handler(:pageup, method(:prev_actor))
@command_window.x = 106
@command_window.y = 72
@command_window.height = 120
@command_window.width = 140
end
def create_slot_window
wx = @status_window.width
wy = @command_window.y + @command_window.height
ww = Graphics.width - @status_window.width
@slot_window = Window_EquipSlot.new(wx, wy, ww)
@slot_window.viewport = @viewport
@slot_window.help_window = @help_window
@slot_window.status_window = @status_window
@slot_window.actor = @actor
@slot_window.set_handler(:ok, method(:on_slot_ok))
@slot_window.set_handler(:cancel, method(:on_slot_cancel))
@slot_window.x = 247
@slot_window.y = 72
@slot_window.height = 164
@slot_window.width = 290
end
def create_item_window
wx = 0
wy = @slot_window.y + @slot_window.height
ww = Graphics.width
wh = Graphics.height - wy
@item_window = Window_EquipItem.new(wx, wy, ww, wh)
@item_window.viewport = @viewport
@item_window.help_window = @help_window
@help_window.x = 106
@help_window.y = 335
@help_window.height = fitting_height(3)
@help_window.width = 432
@item_window.status_window = @status_window
@item_window.actor = @actor
@item_window.set_handler(:ok, method(:on_item_ok))
@item_window.set_handler(:cancel, method(:on_item_cancel))
@slot_window.item_window = @item_window
@item_window.x = 247
@item_window.y = 237
@item_window.height = 96
@item_window.width = 290
end
def line_height
return 24
end
def standard_padding
return 3
end
def fitting_height(line_number)
line_number * line_height + standard_padding * 2
end
end
class Window_EquipStatus < Window_Base
def initialize(x, y)
super(x, y, window_width, window_height)
@actor = nil
@temp_actor = nil
refresh
end
def visible_line_number
return 6
end
def refresh
contents.clear
draw_actor_name(@actor, 0, 0) if @actor
draw_item(0, 20, 2)
draw_item(0, 40, 3)
draw_item(0, 60, 6)
draw_item(0, 80, 7)
end
def draw_item(x, y, param_id)
draw_param_name(x + 4, y, param_id)
draw_current_param(x + 34, y, param_id) if @actor
draw_right_arrow(x + 64, y)
draw_new_param(x + 69, y, param_id) if @temp_actor
end
end