-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmaru_MapNameWindow.rb
76 lines (71 loc) · 2.89 KB
/
maru_MapNameWindow.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
#★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★
#
#Create a map name window in the menu
#
#★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★
#==============================================================================
# ■ Window_Mapname
#------------------------------------------------------------------------------
# Window displays the map name.
#==============================================================================
class Window_Mapname < Window_Selectable
#--------------------------------------------------------------------------
# ● Object initialization
#--------------------------------------------------------------------------
def initialize
super(0,0, window_width, fitting_height(2))
refresh
end
#--------------------------------------------------------------------------
# ● Window width
#--------------------------------------------------------------------------
def window_width
return 160
end
#--------------------------------------------------------------------------
# ● Number of items
#--------------------------------------------------------------------------
def item_max
return 2
end
#--------------------------------------------------------------------------
# ● Refresh
#--------------------------------------------------------------------------
def refresh
contents.clear
change_color(system_color)
draw_text(0,0,item_width,item_height, "Location")
change_color(normal_color)
draw_text(0,24,item_width,item_height, $game_map.display_name)
end
#--------------------------------------------------------------------------
# ● Open window
#--------------------------------------------------------------------------
def open
refresh
super
end
end
#==============================================================================
# ■ Scene_Menu
#------------------------------------------------------------------------------
# Class that performs menu screen processing.
#==============================================================================
class Scene_Menu < Scene_MenuBase
#--------------------------------------------------------------------------
# ● Start map window
#--------------------------------------------------------------------------
alias m_start start
def start
m_start
create_map_window
end
#--------------------------------------------------------------------------
# ● Create map window
#--------------------------------------------------------------------------
def create_map_window
@map_window = Window_Mapname.new
@map_window.x = 0
@map_window.y = Graphics.height - @gold_window.height - @map_window.height
end
end