Removing the indent reserved for icons in Item/Skill/Equipment menus

● ARCHIVED · READ-ONLY
Started by SoulCatapult 10 posts View original ↗
  1. I realize this deals with the preset scripts and might belong in the script help forum, sorry about that.

    Anyway, I don't want to use icons and I was looking for a way to decrease the indent when items are displayed in selectable windows like the item and skill menus, etc... I was able to accomplish this in Yanfly's battle system (to remove action icons), but I couldn't figure out how to do it in these other menus.

    Without icons, there is an indent before every item in a list; I want to remove the indent. This would probably involve changing the x-coordinate of the text or something like that, but I don't know how.

    Thanks.
  2. I believe this is the solution you seek. Icon drawing is handled in Window_Base, along with Draw_Item_Name for menus, which contains:

    #-------------------------------------------------------------------------- # * Draw Item Name # enabled : Enabled flag. When false, draw semi-transparently. #-------------------------------------------------------------------------- def draw_item_name(item, x, y, enabled = true, width = 172) return unless item draw_icon(item.icon_index, x, y, enabled) change_color(normal_color, enabled) draw_text(x + 24, y, width, line_height, item.name) endBasically remove the +24. You can also remove (or comment out) the Draw_Icon as a bonus for efficiency along with the removal of the +24.

    This will affect Items and Skills if I am correct.
  3. I do believe that's what I was looking for. Thank you so much, Kerbonklin. :)
  4. I think it will also affect weapons and armors.
  5. Shaz said:
    I think it will also affect weapons and armors.
    Yup, it does.
  6. Is that what you want it to do?
  7. Shaz said:
    Is that what you want it to do?
    It sure is! :)
  8. I will use this script for commercial, thank you!
  9. ronyunderen said:
    I will use this script for commercial, thank you!
    Did you format it correctly? The code posted above will not do anything on it's own.
    It is also converted to one line.

    This is the code
    Ruby:
    class Window_Base
        #--------------------------------------------------------------------------
        # * Draw Item Name
        # enabled : Enabled flag. When false, draw semi-transparently.
        #--------------------------------------------------------------------------
        def draw_item_name(item, x, y, enabled = true, width = 172)
            return unless item
            draw_icon(item.icon_index, x, y, enabled)
            change_color(normal_color, enabled)
            draw_text(x + 24, y, width, line_height, item.name)
        end
    end
    Then if you follow the instructions,
    Remove the draw_icon line and remove the + 24