Hey guys;
Here's what I mean if you don't get it: I want there to be a window that shows when I open the Menu/Camp Menu/whatever you wanna call it. However; on said window I want a variable to display. I tried something but nothing happened. Nothing. Here's what I have:
Any suggestions? :\
Here's what I mean if you don't get it: I want there to be a window that shows when I open the Menu/Camp Menu/whatever you wanna call it. However; on said window I want a variable to display. I tried something but nothing happened. Nothing. Here's what I have:
Code:
module DarkOdysseyD
MenuVIcons = [188]
MenuVTexts = ['time']
end
class Window_DOMenuVar < Window_Base
def initialize(x, y)
super(x + 260, y - 260, 160, WLH * DarkOdysseyD::MenuVIcons.size + 32)
refresh
end
def time
@total_sec = Graphics.frame_count / Graphics.frame_rate
hour = @total_sec / 60 / 60
min = @total_sec / 60 % 60
sec = @total_sec % 60
if hour >= 1
return sprintf("%01d:%02d:%02d", hour, min, sec)
else
return sprintf("%01d:%02d", min, sec)
end
end
def refresh
self.contents.clear
self.contents.font.color = normal_color
self.windowskin = Cache.system('window')
y = 0
for i in 0...DarkOdysseyD::MenuVIcons.size
self.contents.draw_text(0, y, 128, WLH, eval(DarkOdysseyD::MenuVTexts[i]), 2)
draw_icon(DarkOdysseyD::MenuVIcons[i], 0, y)
y += WLH
end
end
def update
super
refresh if Graphics.frame_count / Graphics.frame_rate != @total_sec
end
end
Any suggestions? :\