Initial import
This commit is contained in:
48
Scripts/RPG/Window_Gold.rb
Normal file
48
Scripts/RPG/Window_Gold.rb
Normal file
@@ -0,0 +1,48 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
#==============================================================================
|
||||
# ** Window_Gold
|
||||
#------------------------------------------------------------------------------
|
||||
# This window displays the party's gold.
|
||||
#==============================================================================
|
||||
|
||||
class Window_Gold < Window_Base
|
||||
#--------------------------------------------------------------------------
|
||||
# * Object Initialization
|
||||
#--------------------------------------------------------------------------
|
||||
def initialize
|
||||
super(0, 0, window_width, fitting_height(1))
|
||||
refresh
|
||||
end
|
||||
#--------------------------------------------------------------------------
|
||||
# * Get Window Width
|
||||
#--------------------------------------------------------------------------
|
||||
def window_width
|
||||
return 160
|
||||
end
|
||||
#--------------------------------------------------------------------------
|
||||
# * Refresh
|
||||
#--------------------------------------------------------------------------
|
||||
def refresh
|
||||
contents.clear
|
||||
draw_currency_value(value, currency_unit, 4, 0, contents.width - 8)
|
||||
end
|
||||
#--------------------------------------------------------------------------
|
||||
# * Get Party Gold
|
||||
#--------------------------------------------------------------------------
|
||||
def value
|
||||
$game_party.gold
|
||||
end
|
||||
#--------------------------------------------------------------------------
|
||||
# Get Currency Unit
|
||||
#--------------------------------------------------------------------------
|
||||
def currency_unit
|
||||
Vocab::currency_unit
|
||||
end
|
||||
#--------------------------------------------------------------------------
|
||||
# * Open Window
|
||||
#--------------------------------------------------------------------------
|
||||
def open
|
||||
refresh
|
||||
super
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user