class Window_MGold < Window_Base
def initialize
super(0, 0, window_width, fitting_height(1))
refresh
end
def window_width
return 160
end
def refresh
contents.clear
draw_currency_valuem(value, currency_unit, 4, 0, contents.width - 8)
draw_icon(343, 0, 0)
end
def value
$game_party.gold
end
def currency_unit
Vocab::currency_unit
end
def draw_currency_valuem(value, unit, x, y, width)
cx = text_size(unit).width
change_color(normal_color)
draw_text(x, y, width - cx - 2, line_height, value, 2)
change_color(system_color)
draw_text(x, y, width, line_height, unit, 2)
end
def open
refresh
super
end
end
class Scene_Menu < Scene_MenuBase
def create_gold_window
@gold_window = Window_MGold.new
@gold_window.x = 0
@gold_window.y = Graphics.height - @gold_window.height
end
end
class Window_MGold < Window_Base
def initialize
super(0, 0, window_width, fitting_height(1))
refresh
end
def window_width
return 160
end
def refresh
contents.clear
draw_currency_valuem(value, currency_unit, 4, 0, contents.width - 8)
draw_icon(343, 0, 0)
end
def value
$game_party.gold
end
def currency_unit
Vocab::currency_unit
end
def draw_currency_valuem(value, unit, x, y, width)
cx = text_size(unit).width
change_color(normal_color)
draw_text(x, y, width - cx - 2, line_height, value, 2)
change_color(system_color)
draw_text(x, y, width, line_height, unit, 2)
end
def open
refresh
super
end
end
class Scene_Menu < Scene_MenuBase
def create_gold_window
@gold_window = Window_MGold.new
@gold_window.x = 0
@gold_window.y = Graphics.height - @gold_window.height
end
end