Item On Event & Key Item Help Window (Patch)
Item On Event & Key Item Help Window (Patch) // Forum request; a purely visual compatibility patch.Requires:
[*]Kadafi's Item Select Help (pastebin.com/Pbgq8AEf)
[*]Galv's Use Item on Event (galvs-scripts.com/galvs-use-item-on-event/)
Customization:
[*]Adjust the vertical position of the item description window.
Screenshots:
Setup:
[*]Paste under the Materials, and under Galv and Kadafi's scripts.
Known issues:
[*]While still usable, this script is not ideal for games that show messages in the middle of the screen with this window at the same time. (Personally find that to be an ugly design choice, generally.) I might try to improve how it looks later on.
Usage Notes:
[*]Don't remove the author part of the header.
[*]Script is allowed for commercial and non-commercial projects.
[*]Users are free to modify the script as they wish for their own projects.
Code:
#==============================================================================
#
# ** Title: ZS Item On Event & Key Item Help Window (Patch) 1.0
# Created: August 2019
# Creator: ZirconStorms
# Requires: Kadafi - Item Select Help + Galv - Use Item on Event
#
#------------------------------------------------------------------------------
#
# Script is allowed for commercial and non-commercial games.
# In the game's credits or read.me, credit "ZirconStorms".
#
#==============================================================================
# Customizable Section Begins Here.
#==============================================================================
module ZSKEYITEMHELPWINDOW
BOTTOM_SCREEN_WINDOW = true
# true changes the help window's y position to the bottom of the screen.
# false shows the help window above the Key Item selection window.
NOMSG_SWITCH = 1
# Turn the switch written above on when you show the Key Item
# window onscreen without a message.
TEXTOFFSET = 32
# Only applicable for those who have BOTTOM_SCREEN_WINDOW set to true.
# Subtracts this value to adjust the "heading" text vertically.
# It's recommended you use your heading's font size value here.
end
#==============================================================================
# Customizable Section Ends Here.
#==============================================================================
class Window_KeyItem < Window_ItemList
def update_placement
#----------
self.y = 0
@message_window.help_window.y = 0
#----------
if ZSKEYITEMHELPWINDOW::BOTTOM_SCREEN_WINDOW == true
if @message_window.y == 0
self.y = y + @message_window.height
@message_window.help_window.y = Graphics.height - @message_window.help_window.height
elsif @message_window.y <= Graphics.height / 2
self.y = 0
@message_window.help_window.y = Graphics.height - @message_window.help_window.height
else
self.y = 0
@message_window.help_window.y = Graphics.height - @message_window.help_window.height
@message_window.help_window.y -= @message_window.height if $game_switches == true
end
#----------
else
if @message_window.y == 0
@message_window.help_window.y += @message_window.height
self.y += @message_window.height + @message_window.help_window.height
elsif @message_window.y <= Graphics.height / 2
self.y = Graphics.height - self.height
else
self.y += @message_window.help_window.height
@message_window.help_window.y = 0
end
#----------
end
end #update_placement
#--------------------------------------------------------------------------
alias zircon_draw_heading draw_heading
def draw_heading
zircon_draw_heading
#----------
if ZSKEYITEMHELPWINDOW::BOTTOM_SCREEN_WINDOW == false
if @message_window.y == 0
@heading.y = @message_window.height + @message_window.help_window.height + self.height
elsif @message_window.y <= Graphics.height / 2
@heading.y = @message_window.y + @message_window.height
else
@heading.y += @message_window.help_window.height
end
else
#----------
if @message_window.y == 0
@heading.y = Graphics.height - @message_window.help_window.height - ZSKEYITEMHELPWINDOW::TEXTOFFSET
elsif @message_window.y <= Graphics.height / 2
@heading.y = Graphics.height - @message_window.help_window.height - ZSKEYITEMHELPWINDOW::TEXTOFFSET
else
@heading.y = Graphics.height - @message_window.help_window.height - ZSKEYITEMHELPWINDOW::TEXTOFFSET
@heading.y -= @message_window.height if $game_switches == true
end
end
end #draw_heading
#--------------------------------------------------------------------------
end #Window_KeyItem
#==============================================================================
本贴来自国际rpgmaker官方论坛作者:tvghost处,因国际论坛即将永久关站,为了存档多年珍贵资料,署名转载到本论坛存档,由于官方帖子为英文原帖,需要中文翻译请点击论坛顶部切换语言为中文就可以将帖子翻译成中文浏览,方便大家随时查看,原文地址:https://forums.rpgmakerweb.com/threads/item-on-event-key-item-help-window-patch.111962/
页:
[1]