赞 | 23 |
VIP | 207 |
好人卡 | 31 |
积分 | 31 |
经验 | 48797 |
最后登录 | 2024-11-30 |
在线时间 | 1535 小时 |
Lv3.寻梦者 孤独守望
- 梦石
- 0
- 星屑
- 3137
- 在线时间
- 1535 小时
- 注册时间
- 2006-10-16
- 帖子
- 4321
|
开玩笑,咱怎么可能会乱触人来着,你看这又是偷工减料示范脚本还没alias还各种偷天换日
- class Window_ItemEx < Window_Item
- def draw_item(index)
- rect = item_rect(index)
- self.contents.clear_rect(rect)
- item = @data[index]
- if item != nil
- number = $game_party.item_number(item)
- enabled = enable?(item)
- draw_item_name(item, rect.x, rect.y, enabled)
- self.contents.font.size = 8
- self.contents.draw_text(rect.x ,rect.y + 18,30 ,12, sprintf("%2d", number), 2)
- end
- end
- def item_rect(index)
- ax = index % 6
- ay = index / 6
- x = ax * 48
- y = ay * 48
- return Rect.new(x + 8,y + 8,32,32)
- end
- def draw_item_name(item, x, y, enabled = true)
- if item != nil
- draw_icon(item.icon_index, x + 4, y + 4, enabled)
- self.contents.font.color = normal_color
- end
- end
- end
- class Scene_Item
- def start
- super
- create_menu_background
- @viewport = Viewport.new(0, 0, 544, 416)
- @help_window = Window_Help.new
- @help_window.viewport = @viewport
- @item_window = Window_ItemEx.new(120, 120 - 32, 48 * 6 + 64, 48 * 3 + 64)
- @help_window.x = @item_window.x
- @help_window.y = @item_window.y + @item_window.height
- @help_window.width = @item_window.width
- @help_window.contents = Bitmap.new(@help_window.width - 32,@help_window.height - 32)
- @item_window.viewport = @viewport
- @item_window.help_window = @help_window
- @item_window.active = false
- @target_window = Window_MenuStatus.new(0, 0)
- hide_target_window
- end
- end
复制代码 |
评分
-
查看全部评分
|