Digital Watch
Member
I'm using this cursor script:
What I want to do is when a window is not active (IE, in the menu you select Equip, then the active window changes and you select the actor to equip. When you're selecting the actor, the cursor in the main window stays, but the color changes to indicate the window isn't active)
I want the cursor to change to this color:
Does anyone have any idea how I would go about doing this? You can't do anything with self.active in the cursor script because that will ALWAYS return true.
Thanks in advance.
Code:
#==============================================================================
# ++ 矢å°åž‹ã‚»ãƒ¬ã‚¯ãƒˆã‚«ãƒ¼ã‚½ãƒ«ã€€ver. 1.12 ++
# Script by パラ犬
# http://2d6.parasite.jp/
#
# Edited by Digital Watch
#------------------------------------------------------------------------------
# コマンドé¸æŠžæ™‚ã®ã‚«ãƒ¼ã‚½ãƒ«ã‚’ä»»æ„ã®ç”»åƒã«ã—ã¾ã™ã€‚
#==============================================================================
module PARA_LEFT_CURSOR
# カーソル画åƒãƒ•ã‚¡ã‚¤ãƒ«å(「Graphics/Picturesã€ãƒ•ã‚©ãƒ«ãƒ€å†…)
FILE_NAME = "cursor"
# 表示タイプ( 0:矢å°ã®ã¿ 1:矢å°ï¼‹å››è§’カーソル )
TYPE = 0
end
# ↑ è¨å®šé …ç›®ã“ã“ã¾ã§
#------------------------------------------------------------------------------
#==============================================================================
# â– Window_Base
#==============================================================================
class Window_Base
#--------------------------------------------------------------------------
# ◠カーソルã®çŸ©å½¢æ›´æ–°
#--------------------------------------------------------------------------
alias cursor_rect_para_lcr cursor_rect
def cursor_rect=(rect)
if PARA_LEFT_CURSOR::TYPE == 1
super(rect)
end
empty = Rect.new(0,0,0,0)
if rect != empty and self.visible != false and @index != -1
if @cursor == nil or @cursor.disposed?
# スプライトを作æˆ
@cursor = Sprite.new
@cursor.bitmap = RPG::Cache.picture(PARA_LEFT_CURSOR::FILE_NAME)
#@cursor.color = Color.new(128, 128, 128, 128)
end
# カーソルスプライトã®ä½ç½®ã‚’移動
#@cursor.x = self.x + rect.x
@cursor.x = self.x + rect.x - 5
cy = (rect.height-32) / 2
@cursor.y = self.y + cy + rect.y + 16
@cursor.z = self.z + 2
elsif @cursor != nil
@cursor.dispose
end
end
#--------------------------------------------------------------------------
# ◠解放
#--------------------------------------------------------------------------
alias dispose_para_cur dispose
def dispose
super
if @cursor != nil
@cursor.dispose
end
end
#--------------------------------------------------------------------------
# â— self.visible
#--------------------------------------------------------------------------
def visible=(bool)
super
# ウインドウãŒä¸å¯è¦–ã®æ™‚ã¯ã‚«ãƒ¼ã‚½ãƒ«ã‚’消去
if @cursor != nil and bool == false
@cursor.dispose
end
end
#--------------------------------------------------------------------------
# â— self.x
#--------------------------------------------------------------------------
def x=(x)
super
if @index != nil
# カーソルã®çŸ©å½¢ã‚’æ›´æ–°
update_cursor_rect
end
end
#--------------------------------------------------------------------------
# â— self.y
#--------------------------------------------------------------------------
def y=(y)
super
if @index != nil
# カーソルã®çŸ©å½¢ã‚’æ›´æ–°
update_cursor_rect
end
end
end
What I want to do is when a window is not active (IE, in the menu you select Equip, then the active window changes and you select the actor to equip. When you're selecting the actor, the cursor in the main window stays, but the color changes to indicate the window isn't active)
I want the cursor to change to this color:
Code:
Color.new(128, 128, 128, 128)
Does anyone have any idea how I would go about doing this? You can't do anything with self.active in the cursor script because that will ALWAYS return true.
Thanks in advance.