ifmapper 0.9.9 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/HISTORY.txt +36 -1
- data/IFMapper.gemspec +28 -0
- data/TODO.txt +1 -0
- data/docs/{index.html → en/index.html} +1 -1
- data/docs/{start.html → en/start.html} +6 -6
- data/docs/es/index.html +120 -0
- data/docs/es/start.html +1282 -0
- data/lib/IFMapper/FXConnection.rb +2 -2
- data/lib/IFMapper/FXConnectionDialogBox.rb +8 -26
- data/lib/IFMapper/FXMap.rb +36 -33
- data/lib/IFMapper/FXMapColorBox.rb +13 -16
- data/lib/IFMapper/FXMapDialogBox.rb +7 -7
- data/lib/IFMapper/FXMapFileDialog.rb +9 -4
- data/lib/IFMapper/FXMapperSettings.rb +162 -32
- data/lib/IFMapper/FXMapperWindow.rb +197 -202
- data/lib/IFMapper/FXRoomDialogBox.rb +12 -9
- data/lib/IFMapper/FXRoomList.rb +3 -3
- data/lib/IFMapper/FXSection.rb +1 -1
- data/lib/IFMapper/Inform7Writer.rb +103 -26
- data/lib/IFMapper/InformWriter.rb +15 -3
- data/lib/IFMapper/Room.rb +0 -11
- data/lib/IFMapper/TADSWriter.rb +15 -2
- data/lib/IFMapper/TranscriptDialogBox.rb +15 -103
- data/lib/IFMapper/locales/en/Messages.rb +435 -0
- data/lib/IFMapper/locales/es/Messages.rb +440 -0
- data/lib/IFMapper/locales/es/Messages_iso-8859-1.rb +440 -0
- data/lib/IFMapper/locales/es/runme.sh +3 -0
- data/maps/CityOfSecrets.map +0 -0
- data/maps/Janitor.map +0 -0
- metadata +28 -21
@@ -350,13 +350,13 @@ class FXConnection < Connection
|
|
350
350
|
dir = @room[0].exits.index(self)
|
351
351
|
x, y = @room[0].corner(self, zoom, dir)
|
352
352
|
draw_text( dc, zoom, x, y, dir,
|
353
|
-
|
353
|
+
DRAW_EXIT_TEXT[@exitText[0]], nil )
|
354
354
|
end
|
355
355
|
if @exitText[1] != 0
|
356
356
|
dir = @room[1].exits.rindex(self)
|
357
357
|
x, y = @room[1].corner(self, zoom, dir)
|
358
358
|
draw_text( dc, zoom, x, y, dir,
|
359
|
-
|
359
|
+
DRAW_EXIT_TEXT[@exitText[1]], @dir == AtoB)
|
360
360
|
end
|
361
361
|
end
|
362
362
|
|
@@ -4,12 +4,6 @@
|
|
4
4
|
#
|
5
5
|
class FXConnectionDialogBox < FXDialogBox
|
6
6
|
|
7
|
-
TYPE_TEXT = [
|
8
|
-
'Free',
|
9
|
-
'Door',
|
10
|
-
'Locked',
|
11
|
-
'Special',
|
12
|
-
]
|
13
7
|
|
14
8
|
TYPE_NUM = [
|
15
9
|
Connection::FREE, # free
|
@@ -18,18 +12,6 @@ class FXConnectionDialogBox < FXDialogBox
|
|
18
12
|
Connection::SPECIAL, # special
|
19
13
|
]
|
20
14
|
|
21
|
-
DIR_TEXT = [
|
22
|
-
'Both',
|
23
|
-
'One Way',
|
24
|
-
]
|
25
|
-
|
26
|
-
EXIT_TEXT = [
|
27
|
-
'None',
|
28
|
-
'Up',
|
29
|
-
'Down',
|
30
|
-
'In',
|
31
|
-
'Out',
|
32
|
-
]
|
33
15
|
|
34
16
|
attr_writer :map
|
35
17
|
|
@@ -89,9 +71,9 @@ class FXConnectionDialogBox < FXDialogBox
|
|
89
71
|
|
90
72
|
frame = FXHorizontalFrame.new(mainFrame, LAYOUT_SIDE_TOP|LAYOUT_FILL_X)
|
91
73
|
|
92
|
-
FXLabel.new(frame,
|
74
|
+
FXLabel.new(frame, BOX_CONNECTION_TYPE, nil, 0, LAYOUT_FILL_X)
|
93
75
|
pane = FXPopup.new(self)
|
94
|
-
|
76
|
+
BOX_CONNECTION_TYPE_TEXT.each { |t|
|
95
77
|
FXOption.new(pane, t, nil, nil, 0, JUSTIFY_HZ_APART|ICON_AFTER_TEXT)
|
96
78
|
}
|
97
79
|
@type = FXOptionMenu.new(frame, pane, FRAME_RAISED|FRAME_THICK|
|
@@ -99,9 +81,9 @@ class FXConnectionDialogBox < FXDialogBox
|
|
99
81
|
LAYOUT_CENTER_X|LAYOUT_CENTER_Y)
|
100
82
|
|
101
83
|
|
102
|
-
FXLabel.new(frame,
|
84
|
+
FXLabel.new(frame, BOX_DIRECTION, nil, 0, LAYOUT_FILL_X)
|
103
85
|
pane = FXPopup.new(self)
|
104
|
-
|
86
|
+
BOX_DIR_TEXT.each { |t|
|
105
87
|
FXOption.new(pane, t, nil, nil, 0, JUSTIFY_HZ_APART|ICON_AFTER_TEXT)
|
106
88
|
}
|
107
89
|
@dir = FXOptionMenu.new(frame, pane, FRAME_RAISED|FRAME_THICK|
|
@@ -109,17 +91,17 @@ class FXConnectionDialogBox < FXDialogBox
|
|
109
91
|
LAYOUT_CENTER_X|LAYOUT_CENTER_Y)
|
110
92
|
|
111
93
|
frame = FXHorizontalFrame.new(mainFrame, LAYOUT_SIDE_TOP|LAYOUT_FILL_X)
|
112
|
-
FXLabel.new(frame,
|
94
|
+
FXLabel.new(frame, BOX_EXIT_A_TEXT, nil, 0, LAYOUT_FILL_X)
|
113
95
|
pane = FXPopup.new(self)
|
114
|
-
|
96
|
+
BOX_EXIT_TEXT.each { |t|
|
115
97
|
FXOption.new(pane, t, nil, nil, 0, JUSTIFY_HZ_APART|ICON_AFTER_TEXT)
|
116
98
|
}
|
117
99
|
@exitA = FXOptionMenu.new(frame, pane, FRAME_RAISED|FRAME_THICK|
|
118
100
|
JUSTIFY_HZ_APART|ICON_AFTER_TEXT|
|
119
101
|
LAYOUT_CENTER_X|LAYOUT_CENTER_Y)
|
120
|
-
FXLabel.new(frame,
|
102
|
+
FXLabel.new(frame, BOX_EXIT_B_TEXT, nil, 0, LAYOUT_FILL_X)
|
121
103
|
pane = FXPopup.new(self)
|
122
|
-
|
104
|
+
BOX_EXIT_TEXT.each { |t|
|
123
105
|
FXOption.new(pane, t, nil, nil, 0, JUSTIFY_HZ_APART|ICON_AFTER_TEXT)
|
124
106
|
}
|
125
107
|
@exitB = FXOptionMenu.new(frame, pane, FRAME_RAISED|FRAME_THICK|
|
data/lib/IFMapper/FXMap.rb
CHANGED
@@ -106,7 +106,7 @@ class FXMap < Map
|
|
106
106
|
#
|
107
107
|
def delete_section
|
108
108
|
return navigation_warning if @navigation
|
109
|
-
w = FXWarningBox.new(@window,
|
109
|
+
w = FXWarningBox.new(@window, WARN_DELETE_SECTION)
|
110
110
|
return if w.execute == 0
|
111
111
|
|
112
112
|
delete_section_at(@section)
|
@@ -237,7 +237,7 @@ class FXMap < Map
|
|
237
237
|
#
|
238
238
|
def remove_connection(c)
|
239
239
|
c.failed = true
|
240
|
-
status "
|
240
|
+
status "#{ERR_PATH_FOR_CONNECTION} #{c} #{ERR_IS_BLOCKED}."
|
241
241
|
end
|
242
242
|
|
243
243
|
# Given a connection, create the path for it, if not a simple
|
@@ -542,13 +542,13 @@ class FXMap < Map
|
|
542
542
|
def update_title
|
543
543
|
title = @name.dup
|
544
544
|
if @navigation
|
545
|
-
title << '
|
545
|
+
title << ' #{TITLE_READ_ONLY}'
|
546
546
|
end
|
547
547
|
if @automap
|
548
|
-
title << '
|
548
|
+
title << ' #{TITLE_AUTOMAP}'
|
549
549
|
end
|
550
|
-
title << "
|
551
|
-
title << "
|
550
|
+
title << " #{TITLE_ZOOM} %.3f" % @zoom
|
551
|
+
title << " #{TITLE_SECTION} #{@section+1} #{TITLE_OF} #{@sections.size}"
|
552
552
|
title << " #{@sections[@section].name}"
|
553
553
|
@window.title = title
|
554
554
|
end
|
@@ -708,14 +708,14 @@ class FXMap < Map
|
|
708
708
|
if @complexConnection.kind_of?(TrueClass)
|
709
709
|
@complexConnection = [roomA, exitA]
|
710
710
|
c = new_connection( roomA, exitA, nil )
|
711
|
-
status
|
711
|
+
status MSG_COMPLEX_CONNECTION_OTHER_EXIT
|
712
712
|
else
|
713
713
|
@sections[@section].delete_connection_at(-1)
|
714
714
|
c = new_connection( @complexConnection[0],
|
715
715
|
@complexConnection[1], roomA, exitA )
|
716
716
|
if path_find(c) # Do A* path finding to connect both exits
|
717
717
|
@modified = true
|
718
|
-
status
|
718
|
+
status MSG_COMPLEX_CONNECTION_DONE
|
719
719
|
else
|
720
720
|
@sections[@section].delete_connection_at(-1)
|
721
721
|
end
|
@@ -861,17 +861,17 @@ class FXMap < Map
|
|
861
861
|
@canvas.defaultCursor = @@cursor_arrow
|
862
862
|
if sel.kind_of?(Room)
|
863
863
|
@tooltip_msg = sel.name
|
864
|
-
status "\"#{sel.name}\":
|
864
|
+
status "\"#{sel.name}\": #{MSG_CLICK_TO_SELECT_AND_MOVE}"
|
865
865
|
elsif sel.kind_of?(Connection)
|
866
|
-
status
|
866
|
+
status MSG_CLICK_CHANGE_DIR
|
867
867
|
end
|
868
868
|
else
|
869
869
|
if click_type(x, y)
|
870
870
|
@canvas.defaultCursor = @@cursor_cross
|
871
|
-
status
|
871
|
+
status MSG_CLICK_CREATE_ROOM
|
872
872
|
else
|
873
873
|
cursor_switch(x, y)
|
874
|
-
status
|
874
|
+
status MSG_CLICK_CREATE_LINK
|
875
875
|
end
|
876
876
|
end
|
877
877
|
end
|
@@ -1247,7 +1247,7 @@ class FXMap < Map
|
|
1247
1247
|
LAYOUT_SIDE_BOTTOM|FRAME_NONE|
|
1248
1248
|
LAYOUT_FILL_X|PACK_UNIFORM_WIDTH)
|
1249
1249
|
# Accept
|
1250
|
-
yes = FXButton.new(buttons,
|
1250
|
+
yes = FXButton.new(buttons, BUTTON_YES, nil, dlg, FXDialogBox::ID_ACCEPT,
|
1251
1251
|
FRAME_RAISED|FRAME_THICK|LAYOUT_FILL_X|
|
1252
1252
|
LAYOUT_RIGHT|LAYOUT_CENTER_Y)
|
1253
1253
|
yes.connect(SEL_COMMAND) {
|
@@ -1259,12 +1259,12 @@ class FXMap < Map
|
|
1259
1259
|
return false
|
1260
1260
|
end
|
1261
1261
|
}
|
1262
|
-
FXButton.new(buttons,
|
1262
|
+
FXButton.new(buttons, BUTTON_NO, nil, dlg, FXDialogBox::ID_ACCEPT,
|
1263
1263
|
FRAME_RAISED|FRAME_THICK|LAYOUT_FILL_X|
|
1264
1264
|
LAYOUT_RIGHT|LAYOUT_CENTER_Y)
|
1265
1265
|
|
1266
1266
|
# Cancel
|
1267
|
-
FXButton.new(buttons,
|
1267
|
+
FXButton.new(buttons, BUTTON_CANCEL, nil, dlg, FXDialogBox::ID_CANCEL,
|
1268
1268
|
FRAME_RAISED|FRAME_THICK|LAYOUT_FILL_X|
|
1269
1269
|
LAYOUT_RIGHT|LAYOUT_CENTER_Y)
|
1270
1270
|
yes.setDefault
|
@@ -1438,7 +1438,7 @@ class FXMap < Map
|
|
1438
1438
|
def complex_connection
|
1439
1439
|
return if @complexConnection or @navigation
|
1440
1440
|
@complexConnection = true
|
1441
|
-
status
|
1441
|
+
status MSG_COMPLEX_CONNECTION
|
1442
1442
|
end
|
1443
1443
|
|
1444
1444
|
#
|
@@ -1475,6 +1475,7 @@ class FXMap < Map
|
|
1475
1475
|
if @@roomlist
|
1476
1476
|
@@roomlist.copy_from(self)
|
1477
1477
|
else
|
1478
|
+
require 'IFMapper/FXRoomList'
|
1478
1479
|
@@roomlist = FXRoomList.new(self)
|
1479
1480
|
end
|
1480
1481
|
@@roomlist.show
|
@@ -1514,7 +1515,7 @@ class FXMap < Map
|
|
1514
1515
|
end
|
1515
1516
|
|
1516
1517
|
def cannot_automap(why)
|
1517
|
-
w = FXWarningBox.new(@window, "
|
1518
|
+
w = FXWarningBox.new(@window, "#{ERR_CANNOT_AUTOMAP}\n#{why}")
|
1518
1519
|
w.execute
|
1519
1520
|
end
|
1520
1521
|
|
@@ -1523,7 +1524,7 @@ class FXMap < Map
|
|
1523
1524
|
# Give user some warning if he tries to modify a read-only mode.
|
1524
1525
|
#
|
1525
1526
|
def navigation_warning
|
1526
|
-
w = FXWarningBox.new(@window,
|
1527
|
+
w = FXWarningBox.new(@window, ERR_READ_ONLY_MAP)
|
1527
1528
|
w.execute
|
1528
1529
|
end
|
1529
1530
|
|
@@ -1548,7 +1549,7 @@ class FXMap < Map
|
|
1548
1549
|
@pmap.at(x).at(y).kind_of?(Room)
|
1549
1550
|
store_room_selection(selection)
|
1550
1551
|
dir = Room::DIRECTIONS[idx]
|
1551
|
-
status "
|
1552
|
+
status "#{ERR_CANNOT_MOVE_SELECTION} #{dir}."
|
1552
1553
|
return
|
1553
1554
|
end
|
1554
1555
|
}
|
@@ -1608,7 +1609,7 @@ class FXMap < Map
|
|
1608
1609
|
if @complexConnection
|
1609
1610
|
if @complexConnection.kind_of?(Array)
|
1610
1611
|
@sections[@section].delete_connection_at(-1)
|
1611
|
-
status
|
1612
|
+
status MSG_COMPLEX_CONNECTION_STOPPED
|
1612
1613
|
draw
|
1613
1614
|
end
|
1614
1615
|
@complexConnection = false
|
@@ -1905,7 +1906,7 @@ class FXMap < Map
|
|
1905
1906
|
return if @mutex.locked? or not @canvas.created?
|
1906
1907
|
|
1907
1908
|
if not @image.created?
|
1908
|
-
puts "Image was not created. Try again"
|
1909
|
+
# puts "Image was not created. Try again"
|
1909
1910
|
self.zoom = @zoom
|
1910
1911
|
end
|
1911
1912
|
|
@@ -1958,7 +1959,7 @@ class FXMap < Map
|
|
1958
1959
|
@filename << '.map'
|
1959
1960
|
end
|
1960
1961
|
|
1961
|
-
status "
|
1962
|
+
status "#{MSG_SAVING} '#{@filename}'..."
|
1962
1963
|
|
1963
1964
|
# Make sure we save a valid map. This is mainly a fail-safe
|
1964
1965
|
# in case of an autosave due to a bug.
|
@@ -1970,12 +1971,12 @@ class FXMap < Map
|
|
1970
1971
|
f.puts Marshal.dump(self)
|
1971
1972
|
f.close
|
1972
1973
|
rescue => e
|
1973
|
-
status "
|
1974
|
+
status "#{ERR_COULD_NOT_SAVE} '#{@filename}': #{e}"
|
1974
1975
|
sleep 4
|
1975
1976
|
return false
|
1976
1977
|
end
|
1977
1978
|
@modified = false
|
1978
|
-
status "
|
1979
|
+
status "#{MSG_SAVED} '#{@filename}'."
|
1979
1980
|
sleep 0.5
|
1980
1981
|
return true
|
1981
1982
|
end
|
@@ -2034,13 +2035,15 @@ class FXMap < Map
|
|
2034
2035
|
end
|
2035
2036
|
|
2036
2037
|
#
|
2037
|
-
# Save the map under a new filename, bringing up a
|
2038
|
+
# Save the map under a new filename, bringing up a file requester
|
2038
2039
|
#
|
2039
2040
|
def save_as
|
2040
|
-
|
2041
|
+
require 'IFMapper/FXMapFileDialog'
|
2042
|
+
file = FXMapFileDialog.new(@window, "#{MSG_SAVE_MAP} #{@name}",
|
2043
|
+
FXMapFileDialog::KNOWN_SAVE_EXTENSIONS).filename
|
2041
2044
|
if file != ''
|
2042
2045
|
if File.exists?(file)
|
2043
|
-
dlg = FXWarningBox.new(@window, "#{file}\
|
2046
|
+
dlg = FXWarningBox.new(@window, "#{file}\n#{WARN_OVERWRITE_MAP}")
|
2044
2047
|
return if dlg.execute == 0
|
2045
2048
|
end
|
2046
2049
|
|
@@ -2082,11 +2085,11 @@ class FXMap < Map
|
|
2082
2085
|
if @automap
|
2083
2086
|
stop_automap
|
2084
2087
|
end
|
2085
|
-
|
2086
|
-
file = FXMapFileDialog.new(@window,
|
2088
|
+
require 'IFMapper/FXMapFileDialog'
|
2089
|
+
file = FXMapFileDialog.new(@window, MSG_LOAD_TRANSCRIPT,
|
2087
2090
|
[
|
2088
|
-
|
2089
|
-
|
2091
|
+
EXT_TRANSCRIPT,
|
2092
|
+
EXT_ALL_FILES
|
2090
2093
|
]).filename
|
2091
2094
|
return if file == ''
|
2092
2095
|
require 'IFMapper/TranscriptReader'
|
@@ -2096,12 +2099,12 @@ class FXMap < Map
|
|
2096
2099
|
@automap.properties(true)
|
2097
2100
|
@automap.start
|
2098
2101
|
rescue Errno::EACCES, Errno::ENOENT => e
|
2099
|
-
dlg = FXWarningBox.new(@window, "
|
2102
|
+
dlg = FXWarningBox.new(@window, "#{ERR_CANNOT_OPEN_TRANSCRIPT}\n#{e}")
|
2100
2103
|
dlg.execute
|
2101
2104
|
return
|
2102
2105
|
rescue => e
|
2103
2106
|
puts e.backtrace
|
2104
|
-
dlg = FXWarningBox.new(@window, "
|
2107
|
+
dlg = FXWarningBox.new(@window, "#{ERR_PARSE_TRANSCRIPT}\n#{e}\n#{e.backtrace}")
|
2105
2108
|
dlg.execute
|
2106
2109
|
raise
|
2107
2110
|
end
|
@@ -24,7 +24,7 @@ class FXMapColorBox < FXDialogBox
|
|
24
24
|
|
25
25
|
def initialize(parent)
|
26
26
|
decor = DECOR_TITLE|DECOR_BORDER|DECOR_CLOSE
|
27
|
-
super(parent,
|
27
|
+
super(parent, BOX_COLOR, decor)
|
28
28
|
|
29
29
|
# pane for the buttons
|
30
30
|
contents = FXVerticalFrame.new(self, (FRAME_SUNKEN|LAYOUT_FILL_Y|
|
@@ -33,55 +33,52 @@ class FXMapColorBox < FXDialogBox
|
|
33
33
|
frame = FXHorizontalFrame.new(contents, (FRAME_SUNKEN|LAYOUT_FILL_X|
|
34
34
|
LAYOUT_TOP|LAYOUT_LEFT), 0, 0, 0, 0, 10, 10, 10, 10)
|
35
35
|
|
36
|
-
FXLabel.new(frame,
|
37
|
-
JUSTIFY_CENTER_X|LAYOUT_FILL_X)
|
36
|
+
FXLabel.new(frame, BOX_BG_COLOR, nil, JUSTIFY_CENTER_X|LAYOUT_FILL_X)
|
38
37
|
@backwell = FXColorWell.new(frame, FXColor::White,
|
39
|
-
nil, 0, (LAYOUT_CENTER_X|LAYOUT_TOP|LAYOUT_LEFT|
|
38
|
+
nil, 0, (LAYOUT_CENTER_X|LAYOUT_TOP|LAYOUT_LEFT|LAYOUT_SIDE_RIGHT|
|
40
39
|
LAYOUT_FIX_WIDTH|LAYOUT_FIX_HEIGHT), 0, 0, 100, 30)
|
41
40
|
@backwell.connect(SEL_COMMAND, method(:copy_to))
|
42
41
|
|
43
42
|
frame = FXHorizontalFrame.new(contents, (FRAME_SUNKEN|LAYOUT_FILL_X|
|
44
43
|
LAYOUT_TOP|LAYOUT_LEFT), 0, 0, 0, 0, 10, 10, 10, 10)
|
45
|
-
FXLabel.new(frame,
|
46
|
-
JUSTIFY_CENTER_X|LAYOUT_FILL_X)
|
44
|
+
FXLabel.new(frame, BOX_ARROWS_COLOR, nil, JUSTIFY_CENTER_X|LAYOUT_FILL_X)
|
47
45
|
@arrowwell = FXColorWell.new(frame, FXColor::White,
|
48
|
-
nil, 0, (LAYOUT_CENTER_X|LAYOUT_TOP|LAYOUT_LEFT|
|
46
|
+
nil, 0, (LAYOUT_CENTER_X|LAYOUT_TOP|LAYOUT_LEFT|LAYOUT_SIDE_RIGHT|
|
49
47
|
LAYOUT_FIX_WIDTH|LAYOUT_FIX_HEIGHT), 0, 0, 100, 30)
|
50
48
|
@arrowwell.connect(SEL_COMMAND, method(:copy_to))
|
51
49
|
|
52
50
|
frame = FXHorizontalFrame.new(contents, (FRAME_SUNKEN|LAYOUT_FILL_X|
|
53
51
|
LAYOUT_TOP|LAYOUT_LEFT), 0, 0, 0, 0, 10, 10, 10, 10)
|
54
|
-
FXLabel.new(frame,
|
55
|
-
JUSTIFY_CENTER_X|LAYOUT_FILL_X)
|
52
|
+
FXLabel.new(frame, BOX_BOX_BG_COLOR, nil,JUSTIFY_CENTER_X|LAYOUT_FILL_X)
|
56
53
|
@boxwell = FXColorWell.new(frame, FXColor::White,
|
57
|
-
nil, 0, (LAYOUT_CENTER_X|LAYOUT_TOP|LAYOUT_LEFT|
|
54
|
+
nil, 0, (LAYOUT_CENTER_X|LAYOUT_TOP|LAYOUT_LEFT|LAYOUT_SIDE_RIGHT|
|
58
55
|
LAYOUT_FIX_WIDTH|LAYOUT_FIX_HEIGHT), 0, 0, 100, 30)
|
59
56
|
@boxwell.connect(SEL_COMMAND, method(:copy_to))
|
60
57
|
|
61
58
|
frame = FXHorizontalFrame.new(contents, (FRAME_SUNKEN|LAYOUT_FILL_X|
|
62
59
|
LAYOUT_TOP|LAYOUT_LEFT), 0, 0, 0, 0, 10, 10, 10, 10)
|
63
|
-
FXLabel.new(frame,
|
60
|
+
FXLabel.new(frame, BOX_BOX_DARK_COLOR, nil,
|
64
61
|
JUSTIFY_CENTER_X|LAYOUT_FILL_X)
|
65
62
|
@boxdarknesswell = FXColorWell.new(frame, FXColor::White,
|
66
|
-
nil, 0, (LAYOUT_CENTER_X|LAYOUT_TOP|LAYOUT_LEFT|
|
63
|
+
nil, 0, (LAYOUT_CENTER_X|LAYOUT_TOP|LAYOUT_LEFT|LAYOUT_SIDE_RIGHT|
|
67
64
|
LAYOUT_FIX_WIDTH|LAYOUT_FIX_HEIGHT), 0, 0, 100, 30)
|
68
65
|
@boxdarknesswell.connect(SEL_COMMAND, method(:copy_to))
|
69
66
|
|
70
67
|
frame = FXHorizontalFrame.new(contents, (FRAME_SUNKEN|LAYOUT_FILL_X|
|
71
68
|
LAYOUT_TOP|LAYOUT_LEFT), 0, 0, 0, 0, 10, 10, 10, 10)
|
72
|
-
FXLabel.new(frame,
|
69
|
+
FXLabel.new(frame, BOX_BOX_BORDER_COLOR, nil,
|
73
70
|
JUSTIFY_CENTER_X|LAYOUT_FILL_X)
|
74
71
|
@boxborderwell = FXColorWell.new(frame, FXColor::White,
|
75
|
-
nil, 0, (LAYOUT_CENTER_X|LAYOUT_TOP|LAYOUT_LEFT|
|
72
|
+
nil, 0, (LAYOUT_CENTER_X|LAYOUT_TOP|LAYOUT_LEFT|LAYOUT_SIDE_RIGHT|
|
76
73
|
LAYOUT_FIX_WIDTH|LAYOUT_FIX_HEIGHT), 0, 0, 100, 30)
|
77
74
|
@boxborderwell.connect(SEL_COMMAND, method(:copy_to))
|
78
75
|
|
79
76
|
frame = FXHorizontalFrame.new(contents, (FRAME_SUNKEN|LAYOUT_FILL_X|
|
80
77
|
LAYOUT_TOP|LAYOUT_LEFT), 0, 0, 0, 0, 10, 10, 10, 10)
|
81
|
-
FXLabel.new(frame,
|
78
|
+
FXLabel.new(frame, BOX_BOX_NUMBER_COLOR, nil,
|
82
79
|
JUSTIFY_CENTER_X|LAYOUT_FILL_X)
|
83
80
|
@boxnumberwell = FXColorWell.new(frame, FXColor::White,
|
84
|
-
nil, 0, (LAYOUT_CENTER_X|LAYOUT_TOP|LAYOUT_LEFT|
|
81
|
+
nil, 0, (LAYOUT_CENTER_X|LAYOUT_TOP|LAYOUT_LEFT|LAYOUT_SIDE_RIGHT|
|
85
82
|
LAYOUT_FIX_WIDTH|LAYOUT_FIX_HEIGHT), 0, 0, 100, 30)
|
86
83
|
@boxnumberwell.connect(SEL_COMMAND, method(:copy_to))
|
87
84
|
|
@@ -35,7 +35,7 @@ class FXMapDialogBox < FXDialogBox
|
|
35
35
|
}
|
36
36
|
}
|
37
37
|
if not rooms.empty?
|
38
|
-
d = FXWarningBox.new(@map.window,
|
38
|
+
d = FXWarningBox.new(@map.window, WARN_MAP_SMALL)
|
39
39
|
if d.execute == 0
|
40
40
|
copy_from(@map)
|
41
41
|
return
|
@@ -77,24 +77,24 @@ class FXMapDialogBox < FXDialogBox
|
|
77
77
|
def initialize(parent)
|
78
78
|
decor = DECOR_TITLE|DECOR_BORDER|DECOR_CLOSE
|
79
79
|
|
80
|
-
super( parent,
|
80
|
+
super( parent, BOX_MAP_INFORMATION, decor, 40, 40, 0, 0 )
|
81
81
|
mainFrame = FXVerticalFrame.new(self,
|
82
82
|
FRAME_SUNKEN|FRAME_THICK|
|
83
83
|
LAYOUT_FILL_X|LAYOUT_FILL_Y)
|
84
84
|
|
85
|
-
@read = FXCheckButton.new(mainFrame,
|
85
|
+
@read = FXCheckButton.new(mainFrame, BOX_MAP_READ_ONLY, nil, 0,
|
86
86
|
ICON_BEFORE_TEXT|LAYOUT_LEFT|LAYOUT_SIDE_TOP|
|
87
87
|
LAYOUT_SIDE_RIGHT)
|
88
88
|
|
89
89
|
frame = FXHorizontalFrame.new(mainFrame, LAYOUT_SIDE_TOP|LAYOUT_FILL_X)
|
90
90
|
|
91
|
-
FXLabel.new(frame, "
|
91
|
+
FXLabel.new(frame, "#{BOX_NAME}:", nil, 0, LAYOUT_FILL_X)
|
92
92
|
@name = FXTextField.new(frame, 42, nil, 0, LAYOUT_FILL_ROW)
|
93
93
|
|
94
94
|
frame = FXHorizontalFrame.new(mainFrame,
|
95
95
|
LAYOUT_FILL_X|LAYOUT_FILL_Y)
|
96
96
|
|
97
|
-
FXLabel.new(frame,
|
97
|
+
FXLabel.new(frame, BOX_MAP_CREATOR, nil, 0, LAYOUT_FILL_X)
|
98
98
|
@creator = FXTextField.new(frame, 40, nil, 0, LAYOUT_FILL_ROW)
|
99
99
|
|
100
100
|
frame = FXHorizontalFrame.new(mainFrame,
|
@@ -103,13 +103,13 @@ class FXMapDialogBox < FXDialogBox
|
|
103
103
|
|
104
104
|
frame2 = FXVerticalFrame.new(frame,
|
105
105
|
LAYOUT_SIDE_TOP|LAYOUT_FILL_X|LAYOUT_FILL_Y )
|
106
|
-
FXLabel.new(frame2,
|
106
|
+
FXLabel.new(frame2, BOX_MAP_WIDTH, nil, 0, LAYOUT_FILL_X)
|
107
107
|
@width = FXTextField.new( frame2, 6, nil, 0,
|
108
108
|
TEXTFIELD_INTEGER|LAYOUT_FILL_ROW)
|
109
109
|
|
110
110
|
frame2 = FXVerticalFrame.new(frame,
|
111
111
|
LAYOUT_SIDE_TOP|LAYOUT_FILL_X|LAYOUT_FILL_Y )
|
112
|
-
FXLabel.new(frame2,
|
112
|
+
FXLabel.new(frame2, BOX_MAP_HEIGHT, nil, 0, LAYOUT_FILL_X)
|
113
113
|
@height = FXTextField.new( frame2, 6, nil, 0,
|
114
114
|
TEXTFIELD_INTEGER|LAYOUT_FILL_ROW)
|
115
115
|
|