collapse collapse

 Community


 User Info




Willkommen Gast. Bitte einloggen oder registrieren.

 Partnerseiten

rpgvx.net

Das Forum ist offline

Autor Thema: WindowCursor  (Gelesen 1126 mal)

Offline Colonios

  • Maker Nerd
  • VX-Kenner
  • ****
  • Beiträge: 596
  • Events <3
WindowCursor
« am: März 18, 2009, 16:24:12 »
Ok, das war jetzt Zufall, dass ich das entdeckt habe ^^
Nichts Welten bewegendes, aber das Script ist ganz nett für die Optik :)

Es Zeigt einen Cursor an (in standart Menüs, keine durch Scripts angepassten). Das Script hat jemand gemacht, dessen Namen ich wahrscheinlich einfach nicht lesen kann xD

Wenn ich richtig denke, dann müsste der Name des Scripters "Shinobi" sein, aber dass ist mehr geraten...

Install:
Spoiler for Hiden:
Einfach über Main in die Matreials Spalte einfügen. Dann noch ein Bild mit Namen "Window_cursor" als .png Datei in den Systemordner und los gehts :)

Hier der Standart Cursor:
Spoiler for Hiden:

Screens:
Spoiler for Hiden:



Original Page:

Das Script:
Spoiler for Hiden:
#==============================================================================
# šRGSS2
# STR05_–îˆóƒJ[ƒ\ƒ‹+ƒJ[ƒ\ƒ‹ŠŠ‚ç‚©ˆÚ“® v1.2 08/01/29
#
# E’ʏíƒJ[ƒ\ƒ‹‚̍¶‚É–îˆóƒJ[ƒ\ƒ‹‚ð’ljÁ‚µ‚Ü‚·B
# EƒJ[ƒ\ƒ‹ŠŠ‚ç‚©ˆÚ“®‹@”\‚‚«
#@<‘fÞ‹KŠi>
# @@• = Žw’肵‚½• * ”CˆÓ‚̃Aƒjƒƒpƒ^[ƒ“”
# @‚‚³ = Žw’肵‚½‚‚³
#
# ¦ˆê•”‚̃V[ƒ“‚É‚Í–¢‘Ήž@‹C‚ªŒü‚¢‚½‚琻ì‚µ‚Ü‚·B
#
#------------------------------------------------------------------------------
#
# XV—š—ð
# ž1.1¨1.2
#@ˆê•”ƒEƒBƒ“ƒhƒE‚ŃJ[ƒ\ƒ‹‰ŠúÀ•W‚ª”ò‚ñ‚Å‚éƒoƒO‚ðC³
# ž1.0¨1.1
#@ƒEƒBƒ“ƒhƒE‚Æ“¯‚¶ƒrƒ…[ƒ|[ƒg‚ðÝ’è‚·‚é‚悤‚ɉü—Ç
#
#==============================================================================
# ¡ STRRGSS2
#==============================================================================
module STRRGSS2
  # ƒJ[ƒ\ƒ‹ƒOƒ‰ƒtƒBƒbƒN‚̃tƒ@ƒCƒ‹–¼
  WCURSOR_FN = "Window_cursor"
  # ƒJ[ƒ\ƒ‹‚̍À•WC³
  WCURSOR_X = 0
  WCURSOR_Y = 0
end
class Sprite_WindowCursor < Sprite
  WAIT = 8    # ƒAƒjƒ[ƒVƒ‡ƒ“ƒXƒs[ƒh@’l‚ª¬‚³‚¢‚Ù‚Ç‘¬‚¢
  CW   = 24   # ƒJ[ƒ\ƒ‹•
  CH   = 24   # ƒJ[ƒ\ƒ‹‚‚³
end
#==============================================================================
# ¡ Window_Selectable
#==============================================================================
class Window_Selectable < Window_Base
  #--------------------------------------------------------------------------
  # š ’ljÁ
  #--------------------------------------------------------------------------
  def update_se_cursor
    cr = self.cursor_rect
    r = Rect.new(0, 0, 0, 0)
    y = (self.cursor_rect.height - 24) / 2
    v = nil
    v = self.viewport if self.viewport != nil
    @strcursor.viewport = v
    @strcursor.x = self.x + 16 + cr.x - 24 + STRRGSS2::WCURSOR_X
    @strcursor.y = self.y + 16 + cr.y + y  + STRRGSS2::WCURSOR_Y
    @strcursor.z = self.z + 16
    @strcursor.opacity += 64
    @strcursor.opacity = self.opacity if @strcursor.opacity > self.opacity
    @strcursor.visible = ((cr != r) and self.openness == 255)
    @strcursor.visible = false unless self.visible
    @strcursor.blink = (not self.active)
    @strcursor.update
  end
  def update_cursor_str(r,rect)
    self.cursor_rect = r
    rect = Rect.new(0, 0, 0, 0) if @index < 0
    mx = self.cursor_rect.x - rect.x
    if mx >= -1 and mx <= 1
      self.cursor_rect.x = rect.x
    elsif mx != 0
      x = self.cursor_rect.x - (mx/2.0)
      self.cursor_rect.x = x
    end
    my = self.cursor_rect.y - rect.y
    if my >= -1 and my <= 1
      self.cursor_rect.y = rect.y
    elsif my != 0
      y = self.cursor_rect.y - (my/2.0)
      self.cursor_rect.y = y
    end
    self.cursor_rect.width = rect.width
    self.cursor_rect.height = rect.height
  end
  def visible=(v)
    super
    @strcursor.visible = v
  end
  def active=(v)
    super
    @strcursor.visible = false
  end
  def dispose
    @strcursor.dispose
    super
  end
  #--------------------------------------------------------------------------
  # š ƒGƒCƒŠƒAƒX
  #--------------------------------------------------------------------------
  alias initialize_str05m initialize
  def initialize(x, y, width, height, spacing = 32)
    initialize_str05m(x, y, width, height, spacing)
    file = STRRGSS2::WCURSOR_FN
    v = nil
    v = self.viewport if self.viewport != nil
    @strcursor = Sprite_WindowCursor.new(file, v)
    @f_set = false
  end
  alias update_str05m update
  def update
    update_se_cursor unless @opening
    update_str05m
  end
  alias update_cursor_str05m update_cursor
  def update_cursor
    r = self.cursor_rect.clone unless @f_set
    update_cursor_str05m
    update_cursor_str(r, self.cursor_rect.clone) unless @f_set
    @f_set = false
  end
  #--------------------------------------------------------------------------
  # š Ä’è‹`
  #--------------------------------------------------------------------------
  def index=(index)
    @f_set = true
    @index = index
    update_cursor
    call_update_help
  end
end
#==============================================================================
# ¡ Sprite_WindowCursor
#==============================================================================
class Sprite_WindowCursor < Sprite
  #--------------------------------------------------------------------------
  # œ ŒöŠJƒCƒ“ƒXƒ^ƒ“ƒX•Ï”
  #--------------------------------------------------------------------------
  attr_accessor :blink
  #--------------------------------------------------------------------------
  # œ ƒIƒuƒWƒFƒNƒg‰Šú‰»
  #--------------------------------------------------------------------------
  def initialize(name,viewport)
    super(viewport)
    self.bitmap = Cache.system(name)
    self.src_rect.set(0, 0, CW, CH)
    self.opacity = 0
    @xx = -8
    @wait = WAIT
    @count = 0
    @blink = false
  end
  #--------------------------------------------------------------------------
  # œ ‰ð•ú
  #--------------------------------------------------------------------------
  def dispose
    super
  end
  #--------------------------------------------------------------------------
  # œ ƒtƒŒ[ƒ€XV
  #--------------------------------------------------------------------------
  def update
    super
    @xx += 1 if @xx != 0
    self.x += @xx
    @count += 1
    self.visible = false if @blink and (@count % 4) == 0
    @wait -= 1
    return if @wait > 0
    @wait = WAIT
    self.src_rect.x += CW
    self.src_rect.x = 0 if (self.bitmap.width <= self.src_rect.x)
  end
end

MfG und viel Spaß, mir bringts was ;)

 


 Bild des Monats

rooftop party

Views: 3192
By: papilion

 Umfrage

  • Wer soll das BdM gewinnen?
  • Dot Kandidat 1
  • 3 (25%)
  • Dot Kandidat 2
  • 1 (8%)
  • Dot Kandidat 3
  • 2 (16%)
  • Dot Kandidat 4
  • 0 (0%)
  • Dot Kandidat 5
  • 6 (50%)
  • Stimmen insgesamt: 12
  • View Topic

 Schnellsuche





SimplePortal 2.3.3 © 2008-2010, SimplePortal