ifmapper 2.0.9 → 2.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/HISTORY.txt +11 -0
- data/IFMapper.gemspec +31 -28
- data/docs/en/index.html +45 -24
- data/docs/en/start.html +643 -517
- data/docs/es/start.html +727 -1191
- data/docs/images/svg_export.gif +0 -0
- data/lib/IFMapper/FXMapperSettings.rb +1 -1
- data/lib/IFMapper/FXMapperWindow.rb +9 -16
- data/lib/IFMapper/FXSVGMapExporterOptionsDialogBox.rb +335 -107
- data/lib/IFMapper/IFMWriter.rb +1 -2
- data/lib/IFMapper/Inform7Writer.rb +2 -2
- data/lib/IFMapper/InformWriter.rb +2 -2
- data/lib/IFMapper/SVGMapAppend.rb +155 -0
- data/lib/IFMapper/SVGMapExporter.rb +1303 -1091
- data/lib/IFMapper/TADSWriter.rb +4 -3
- data/lib/IFMapper/locales/en/Messages.rb +84 -39
- data/lib/IFMapper/locales/es/Messages.rb +94 -29
- data/lib/IFMapper/locales/es/Messages_iso-8859-1.rb +69 -15
- metadata +6 -3
Binary file
|
@@ -58,9 +58,6 @@ end
|
|
58
58
|
|
59
59
|
class FXMapperWindow < FXMainWindow
|
60
60
|
|
61
|
-
PROGRAM_NAME = "Interactive Fiction Mapper"
|
62
|
-
AUTHOR = "Gonzalo Garramuno"
|
63
|
-
|
64
61
|
@@copy_buffer = nil
|
65
62
|
@@default_options = FXMapperSettings.new
|
66
63
|
|
@@ -482,7 +479,7 @@ class FXMapperWindow < FXMainWindow
|
|
482
479
|
end
|
483
480
|
|
484
481
|
#
|
485
|
-
# Export current map as
|
482
|
+
# Export current map as Scalable Vector Graphics (SVG)
|
486
483
|
#
|
487
484
|
def svg_export_cb(sender, sel, msg)
|
488
485
|
map = current_map
|
@@ -1065,7 +1062,7 @@ class FXMapperWindow < FXMainWindow
|
|
1065
1062
|
|
1066
1063
|
cmd = FXMenuCommand.new(submenu, MENU_PRINT_LOCATIONS, nil)
|
1067
1064
|
cmd.connect(SEL_COMMAND, method(:print_locations_cb))
|
1068
|
-
FXMenuCascade.new(filemenu, MENU_PRINT, nil, submenu)
|
1065
|
+
#FXMenuCascade.new(filemenu, MENU_PRINT, nil, submenu)
|
1069
1066
|
|
1070
1067
|
cmd = FXMenuCommand.new(filemenu, MENU_QUIT, nil)
|
1071
1068
|
cmd.connect( SEL_COMMAND, method(:close_cb) )
|
@@ -1430,19 +1427,15 @@ class FXMapperWindow < FXMainWindow
|
|
1430
1427
|
end
|
1431
1428
|
|
1432
1429
|
def docs(*opts)
|
1433
|
-
browsers = [ 'chrome', 'chromium', 'firefox', 'opera', 'explorer' ]
|
1434
1430
|
address = 'docs/' + language + '/start.html'
|
1435
1431
|
status "#{MSG_OPENING_WEB_PAGE} #{address}..."
|
1436
|
-
|
1437
|
-
|
1438
|
-
|
1439
|
-
|
1440
|
-
|
1441
|
-
|
1442
|
-
|
1443
|
-
break if ok
|
1444
|
-
}
|
1445
|
-
if not ok
|
1432
|
+
if RUBY_PLATFORM =~ /mswin|mingw|cygwin/
|
1433
|
+
system("rundll32 url.dll,FileProtocolHandler \"#{address}\"")
|
1434
|
+
elsif RUBY_PLATFORM =~ /darwin/
|
1435
|
+
system("open \"#{address}\"")
|
1436
|
+
elsif RUBY_PLATFORM =~ /linux|bsd/
|
1437
|
+
system("xdg-open \"#{address}\"")
|
1438
|
+
else
|
1446
1439
|
status ERR_COULD_NOT_OPEN_WEB_BROWSER
|
1447
1440
|
end
|
1448
1441
|
end
|
@@ -1,7 +1,7 @@
|
|
1
1
|
class FXSVGMapExporterOptionsDialogBox < FXDialogBox
|
2
2
|
|
3
3
|
def initialize(parent, title, map)
|
4
|
-
|
4
|
+
|
5
5
|
decor = DECOR_TITLE|DECOR_BORDER|DECOR_CLOSE
|
6
6
|
|
7
7
|
super( parent, title, decor, 40, 40, 0, 0 )
|
@@ -9,142 +9,370 @@ class FXSVGMapExporterOptionsDialogBox < FXDialogBox
|
|
9
9
|
FRAME_SUNKEN|FRAME_THICK|
|
10
10
|
LAYOUT_FILL_X|LAYOUT_FILL_Y)
|
11
11
|
|
12
|
-
|
12
|
+
|
13
|
+
# Show location text (draw_roomnames):
|
14
|
+
# ====================================
|
15
|
+
showlocationtext = FXCheckButton.new(mainFrame, BOX_SVG_SHOWLOCTEXT, nil, 0,
|
16
|
+
ICON_BEFORE_TEXT|LAYOUT_SIDE_TOP|
|
17
|
+
LAYOUT_SIDE_RIGHT)
|
18
|
+
showlocationtext.setCheck(true)
|
19
|
+
showlocationtext.tipText = BOX_SVG_SHOWLOCTEXT_TOOLTIP
|
20
|
+
map.options['draw_roomnames'] = true
|
21
|
+
|
22
|
+
showlocationtext.connect(SEL_COMMAND) {
|
23
|
+
map.options['draw_roomnames'] = (showlocationtext.check == true)
|
24
|
+
}
|
25
|
+
|
26
|
+
|
27
|
+
# Show location numbers (print_room_nums):
|
28
|
+
# ========================================
|
29
|
+
showlocationnumbers = FXCheckButton.new(mainFrame, BOX_SVG_SHOWLOCNUMS, nil, 0,
|
13
30
|
ICON_BEFORE_TEXT|LAYOUT_SIDE_TOP|
|
14
31
|
LAYOUT_SIDE_RIGHT)
|
15
|
-
|
32
|
+
showlocationnumbers.setCheck(true)
|
33
|
+
showlocationnumbers.tipText = BOX_SVG_SHOWLOCNUMS_TOOLTIP
|
16
34
|
map.options['print_room_nums'] = true
|
17
35
|
|
18
|
-
|
36
|
+
showlocationnumbers.connect(SEL_COMMAND) {
|
37
|
+
map.options['print_room_nums'] = (showlocationnumbers.check == true)
|
38
|
+
}
|
39
|
+
|
40
|
+
|
41
|
+
# Show interactive location information:
|
42
|
+
# ======================================
|
43
|
+
|
44
|
+
# Section title label
|
45
|
+
showinteractivelabel = FXLabel.new(mainFrame, BOX_SVG_SHOWINTERTITLE, nil, 0, LAYOUT_FILL_X)
|
46
|
+
showinteractivelabel.padTop = 10
|
47
|
+
|
48
|
+
# Objects checkbox (draw_objects):
|
49
|
+
showinteractiveobjects = FXCheckButton.new(mainFrame, BOX_SVG_SHOWINTEROBJECTS, nil, 0,
|
19
50
|
ICON_BEFORE_TEXT|LAYOUT_SIDE_TOP|
|
20
51
|
LAYOUT_SIDE_RIGHT)
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
ICON_BEFORE_TEXT|LAYOUT_SIDE_TOP|
|
26
|
-
LAYOUT_SIDE_RIGHT)
|
27
|
-
@connections.setCheck(true)
|
28
|
-
map.options['draw_connections'] = true
|
52
|
+
showinteractiveobjects.setCheck(true)
|
53
|
+
showinteractiveobjects.padLeft = 20
|
54
|
+
showinteractiveobjects.tipText = BOX_SVG_SHOWINTEROBJECTS_TOOLTIP
|
55
|
+
map.options['draw_objects'] = true
|
29
56
|
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
57
|
+
showinteractiveobjects.connect(SEL_COMMAND) {
|
58
|
+
map.options['draw_objects'] = (showinteractiveobjects.check == true)
|
59
|
+
}
|
60
|
+
|
61
|
+
# Tasks checkbox (draw_tasks):
|
62
|
+
showinteractivetasks = FXCheckButton.new(mainFrame, BOX_SVG_SHOWINTERTASKS, nil, 0,
|
63
|
+
ICON_BEFORE_TEXT|LAYOUT_SIDE_TOP|
|
64
|
+
LAYOUT_SIDE_RIGHT)
|
65
|
+
showinteractivetasks.setCheck(true)
|
66
|
+
showinteractivetasks.padLeft = 20
|
67
|
+
showinteractivetasks.tipText = BOX_SVG_SHOWINTERTASKS_TOOLTIP
|
68
|
+
map.options['draw_tasks'] = true
|
69
|
+
|
70
|
+
showinteractivetasks.connect(SEL_COMMAND) {
|
71
|
+
map.options['draw_tasks'] = (showinteractivetasks.check == true)
|
72
|
+
}
|
73
|
+
|
74
|
+
# Comments checkbox (draw_comments):
|
75
|
+
showinteractivecomments = FXCheckButton.new(mainFrame, BOX_SVG_SHOWINTERCOMMENTS, nil, 0,
|
76
|
+
ICON_BEFORE_TEXT|LAYOUT_SIDE_TOP|
|
77
|
+
LAYOUT_SIDE_RIGHT)
|
78
|
+
showinteractivecomments.setCheck(true)
|
79
|
+
showinteractivecomments.padLeft = 20
|
80
|
+
showinteractivecomments.tipText = BOX_SVG_SHOWINTERCOMMENTS_TOOLTIP
|
81
|
+
map.options['draw_comments'] = true
|
82
|
+
|
83
|
+
showinteractivecomments.connect(SEL_COMMAND) {
|
84
|
+
map.options['draw_comments'] = (showinteractivecomments.check == true)
|
85
|
+
}
|
86
|
+
|
87
|
+
# Description checkbox (draw_description):
|
88
|
+
showinteractivedescription = FXCheckButton.new(mainFrame, BOX_SVG_SHOWINTERDESCRIPTION, nil, 0,
|
89
|
+
ICON_BEFORE_TEXT|LAYOUT_SIDE_TOP|
|
90
|
+
LAYOUT_SIDE_RIGHT)
|
91
|
+
showinteractivedescription.setCheck(true)
|
92
|
+
showinteractivedescription.padLeft = 20
|
93
|
+
showinteractivedescription.tipText = BOX_SVG_SHOWINTERDESCRIPTION_TOOLTIP
|
94
|
+
map.options['draw_description'] = true
|
95
|
+
|
96
|
+
showinteractivedescription.connect(SEL_COMMAND) {
|
97
|
+
map.options['draw_description'] = (showinteractivedescription.check == true)
|
98
|
+
}
|
99
|
+
|
100
|
+
|
101
|
+
# Show section comments (draw_sectioncomments):
|
102
|
+
# =============================================
|
103
|
+
showsectioncomments = FXCheckButton.new(mainFrame, BOX_SVG_SHOWSECTCOMMENTS, nil, 0,
|
37
104
|
ICON_BEFORE_TEXT|LAYOUT_SIDE_TOP|
|
38
105
|
LAYOUT_SIDE_RIGHT)
|
39
|
-
|
106
|
+
showsectioncomments.setCheck(true)
|
107
|
+
showsectioncomments.tipText = BOX_SVG_SHOWSECTCOMMENTS_TOOLTIP
|
108
|
+
showsectioncomments.padTop = 10
|
109
|
+
showsectioncomments.padBottom = 10
|
40
110
|
map.options['draw_sectioncomments'] = true
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
111
|
+
|
112
|
+
showsectioncomments.connect(SEL_COMMAND) {
|
113
|
+
map.options['draw_sectioncomments'] = (showsectioncomments.check == true)
|
114
|
+
}
|
115
|
+
|
116
|
+
|
117
|
+
# Compass size (compass_size):
|
118
|
+
# =============================================
|
119
|
+
|
120
|
+
# Horizontal frame to hold label and slider
|
121
|
+
compasssizeframe = FXHorizontalFrame.new(mainFrame, LAYOUT_SIDE_TOP|LAYOUT_FILL_X)
|
122
|
+
|
123
|
+
# Compass size label
|
124
|
+
compasssizelabel = FXLabel.new(compasssizeframe, BOX_SVG_COMPASSSIZE, nil, 0, LAYOUT_LEFT)
|
125
|
+
compasssizelabel.tipText = BOX_SVG_COMPASSSIZE_TOOLTIP
|
126
|
+
|
127
|
+
# Compass size slider
|
128
|
+
compasssizeslider = FXSlider.new(compasssizeframe, nil, 0,
|
51
129
|
SLIDER_HORIZONTAL|LAYOUT_FIX_WIDTH|
|
52
|
-
SLIDER_TICKS_TOP|
|
130
|
+
SLIDER_TICKS_TOP|LAYOUT_RIGHT,
|
53
131
|
:width => 100)
|
54
|
-
|
55
|
-
|
132
|
+
compasssizeslider.range = (0..15)
|
133
|
+
compasssizeslider.value = 3
|
134
|
+
compasssizeslider.tipText = BOX_SVG_COMPASSSIZE_TOOLTIP
|
56
135
|
map.options['compass_size'] = 3
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
136
|
+
|
137
|
+
compasssizeslider.connect(SEL_COMMAND) {
|
138
|
+
map.options['compass_size'] = (compasssizeslider.value)
|
139
|
+
}
|
140
|
+
|
141
|
+
|
142
|
+
# Location line thickness (room_line_width):
|
143
|
+
# =============================================
|
144
|
+
|
145
|
+
# Horizontal frame to hold label and slider
|
146
|
+
locationlinethicknessframe = FXHorizontalFrame.new(mainFrame, LAYOUT_SIDE_TOP|LAYOUT_FILL_X)
|
147
|
+
|
148
|
+
# Location line thickness label
|
149
|
+
locationlinethicknesslabel = FXLabel.new(locationlinethicknessframe, BOX_SVG_LOCTHICKNESS, nil, 0, LAYOUT_LEFT)
|
150
|
+
locationlinethicknesslabel.tipText = BOX_SVG_LOCTHICKNESS_TOOLTIP
|
151
|
+
|
152
|
+
# Location line thickness slider
|
153
|
+
locationlinethicknessslider = FXSlider.new(locationlinethicknessframe, nil, 0,
|
61
154
|
SLIDER_HORIZONTAL|LAYOUT_FIX_WIDTH|
|
62
|
-
SLIDER_TICKS_TOP|
|
155
|
+
SLIDER_TICKS_TOP|LAYOUT_RIGHT,
|
63
156
|
:width => 100)
|
64
|
-
|
65
|
-
|
157
|
+
locationlinethicknessslider.range = (0..5)
|
158
|
+
locationlinethicknessslider.value = 2
|
159
|
+
locationlinethicknessslider.tipText = BOX_SVG_LOCTHICKNESS_TOOLTIP
|
66
160
|
map.options['room_line_width'] = 2
|
161
|
+
|
162
|
+
locationlinethicknessslider.connect(SEL_COMMAND) {
|
163
|
+
if locationlinethicknessslider.value == 0
|
164
|
+
locationlinethicknessslider.value = 1
|
165
|
+
end
|
166
|
+
map.options['room_line_width'] = (locationlinethicknessslider.value)
|
167
|
+
}
|
168
|
+
|
169
|
+
|
170
|
+
# Connection line thickness (conn_line_width, door_line_width, draw_connections):
|
171
|
+
# ===============================================================================
|
172
|
+
|
173
|
+
# Horizontal frame to hold label and slider
|
174
|
+
connectionlinethicknessframe = FXHorizontalFrame.new(mainFrame, LAYOUT_SIDE_TOP|LAYOUT_FILL_X)
|
175
|
+
|
176
|
+
# Connection line thickness label
|
177
|
+
connectionlinethicknesslabel = FXLabel.new(connectionlinethicknessframe, BOX_SVG_CONNTHICKNESS, nil, 0, LAYOUT_LEFT)
|
178
|
+
connectionlinethicknesslabel.tipText = BOX_SVG_CONNTHICKNESS_TOOLTIP
|
179
|
+
|
180
|
+
# Connection line thickness slider
|
181
|
+
connectionlinethicknessslider = FXSlider.new(connectionlinethicknessframe, nil, 0,
|
182
|
+
SLIDER_HORIZONTAL|LAYOUT_FIX_WIDTH|
|
183
|
+
SLIDER_TICKS_TOP|LAYOUT_RIGHT,
|
184
|
+
:width => 100)
|
185
|
+
connectionlinethicknessslider.range = (0..5)
|
186
|
+
connectionlinethicknessslider.value = 2
|
187
|
+
connectionlinethicknessslider.tipText = BOX_SVG_CONNTHICKNESS_TOOLTIP
|
67
188
|
map.options['conn_line_width'] = 2
|
68
189
|
map.options['door_line_width'] = 2
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
FXOption.new(pane, t, nil, nil, 0, JUSTIFY_HZ_APART|ICON_AFTER_TEXT)
|
190
|
+
map.options['draw_connections'] = true
|
191
|
+
|
192
|
+
connectionlinethicknessslider.connect(SEL_COMMAND) {
|
193
|
+
map.options['conn_line_width'] = (connectionlinethicknessslider.value)
|
194
|
+
map.options['door_line_width'] = (connectionlinethicknessslider.value)
|
195
|
+
map.options['draw_connections'] = (connectionlinethicknessslider.value > 0)
|
76
196
|
}
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
197
|
+
|
198
|
+
|
199
|
+
# Colour scheme (objs_fill_colour, corner_fill_colour, num_fill_colour, door_line_colour):
|
200
|
+
# ========================================================================================
|
201
|
+
|
202
|
+
# Horizontal frame to hold label and popup menu
|
203
|
+
colourschemeframe = FXHorizontalFrame.new(mainFrame, LAYOUT_SIDE_TOP|LAYOUT_FILL_X)
|
204
|
+
|
205
|
+
# Colour scheme label
|
206
|
+
colourschemelabel = FXLabel.new(colourschemeframe, BOX_SVG_COLOURSCHEME, nil, 0, LAYOUT_LEFT)
|
207
|
+
colourschemelabel.tipText = BOX_SVG_COLOURSCHEME_TOOLTIP
|
208
|
+
|
209
|
+
# Colour scheme popup
|
210
|
+
colourschemepopup = FXPopup.new(self)
|
211
|
+
BOX_SVG_COLOURSCHEME_OPTIONS.each { |colourschemeoption|
|
212
|
+
FXOption.new(colourschemepopup, colourschemeoption, nil, nil, 0, JUSTIFY_HZ_APART|ICON_AFTER_TEXT)
|
213
|
+
}
|
214
|
+
|
215
|
+
# Colour scheme options menu
|
216
|
+
colourschemeoptionsmenu = FXOptionMenu.new(colourschemeframe, colourschemepopup, FRAME_RAISED|FRAME_THICK|
|
217
|
+
JUSTIFY_HZ_APART|ICON_AFTER_TEXT|LAYOUT_RIGHT|LAYOUT_FIX_WIDTH, :width => 100)
|
218
|
+
colourschemeoptionsmenu.currentNo = 1
|
219
|
+
colourschemeoptionsmenu.tipText = BOX_SVG_COLOURSCHEME_TOOLTIP
|
81
220
|
map.options['objs_fill_colour'] = "lightgreen"
|
82
221
|
map.options['corner_fill_colour'] = "lightgreen"
|
83
222
|
map.options['num_fill_colour'] = "lightgreen"
|
84
223
|
map.options['door_line_colour'] = "forestgreen"
|
85
|
-
|
86
|
-
|
87
|
-
buttons = FXHorizontalFrame.new(mainFrame,
|
88
|
-
LAYOUT_SIDE_BOTTOM|LAYOUT_FILL_X|
|
89
|
-
PACK_UNIFORM_WIDTH)
|
90
224
|
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
225
|
+
colourschemeoptionsmenu.connect(SEL_COMMAND) {
|
226
|
+
case colourschemeoptionsmenu.currentNo
|
227
|
+
when 0
|
228
|
+
map.options['objs_fill_colour'] = "lightpink"
|
229
|
+
map.options['corner_fill_colour'] = "lightpink"
|
230
|
+
map.options['num_fill_colour'] = "lightpink"
|
231
|
+
map.options['door_line_colour'] = "firebrick"
|
232
|
+
when 1
|
233
|
+
map.options['objs_fill_colour'] = "lightgreen"
|
234
|
+
map.options['corner_fill_colour'] = "lightgreen"
|
235
|
+
map.options['num_fill_colour'] = "lightgreen"
|
236
|
+
map.options['door_line_colour'] = "forestgreen"
|
237
|
+
when 2
|
238
|
+
map.options['objs_fill_colour'] = "yellow"
|
239
|
+
map.options['corner_fill_colour'] = "yellow"
|
240
|
+
map.options['num_fill_colour'] = "yellow"
|
241
|
+
map.options['door_line_colour'] = "goldenrod"
|
242
|
+
when 3
|
243
|
+
map.options['objs_fill_colour'] = "lightblue"
|
244
|
+
map.options['corner_fill_colour'] = "lightblue"
|
245
|
+
map.options['num_fill_colour'] = "lightblue"
|
246
|
+
map.options['door_line_colour'] = "darkslateblue"
|
247
|
+
end
|
96
248
|
}
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
249
|
+
|
250
|
+
|
251
|
+
# Export options radio buttons (split_sections, current_section_only, selected_elements_only):
|
252
|
+
# ============================================================================================
|
253
|
+
|
254
|
+
# Horiz line to separate this section
|
255
|
+
FXHorizontalSeparator.new(mainFrame)
|
256
|
+
|
257
|
+
# Vertical frame to hold the label and radio buttons
|
258
|
+
exportoptionsframe = FXVerticalFrame.new(mainFrame, LAYOUT_FILL_X)
|
259
|
+
|
260
|
+
# Data target - handles selection/deselection of radio buttons
|
261
|
+
exportoptionsdatatarget = FXDataTarget.new(0)
|
262
|
+
|
263
|
+
# Export label
|
264
|
+
FXLabel.new(exportoptionsframe, "Export:")
|
265
|
+
|
266
|
+
# Export - All combined radio button
|
267
|
+
exportoptionsallcombined = FXRadioButton.new(exportoptionsframe, BOX_SVG_EXPORTALLCOMBINED, exportoptionsdatatarget, FXDataTarget::ID_OPTION)
|
268
|
+
exportoptionsallcombined.tipText = BOX_SVG_EXPORTALLCOMBINED_TOOLTIP
|
269
|
+
|
270
|
+
# Export - All individual files radio button
|
271
|
+
exportoptionsallindividual = FXRadioButton.new(exportoptionsframe, BOX_SVG_EXPORTALLINDIV, exportoptionsdatatarget, FXDataTarget::ID_OPTION+1)
|
272
|
+
exportoptionsallindividual.tipText = BOX_SVG_EXPORTALLINDIV_TOOLTIP
|
273
|
+
|
274
|
+
# Export - Current individual file radio button
|
275
|
+
exportoptionscurrentindividual = FXRadioButton.new(exportoptionsframe, BOX_SVG_EXPORTCURRENTINDIV, exportoptionsdatatarget, FXDataTarget::ID_OPTION+2)
|
276
|
+
exportoptionscurrentindividual.tipText = BOX_SVG_EXPORTCURRENTINDIV_TOOLTIP
|
277
|
+
|
278
|
+
map.options['split_sections'] = false
|
279
|
+
map.options['current_section_only'] = false
|
280
|
+
map.options['selected_elements_only'] = false
|
281
|
+
|
282
|
+
# Draw selected elements only checkbox
|
283
|
+
exportoptionsselectedonly = FXCheckButton.new(mainFrame, BOX_SVG_EXPORTSELONLY, nil, 0,
|
284
|
+
ICON_BEFORE_TEXT|LAYOUT_SIDE_TOP|JUSTIFY_LEFT|
|
285
|
+
LAYOUT_SIDE_RIGHT)
|
286
|
+
exportoptionsselectedonly.setCheck(false)
|
287
|
+
exportoptionsselectedonly.disable
|
288
|
+
exportoptionsselectedonly.tipText = BOX_SVG_EXPORTSELONLY_TOOLTIP
|
289
|
+
map.options['selected_elements_only'] = false
|
290
|
+
|
291
|
+
# Draw location text for selected only checkbox
|
292
|
+
drawlocationforselectedonly = FXCheckButton.new(mainFrame, BOX_SVG_EXPORTALLLOCSSELTXT, nil, 0,
|
293
|
+
ICON_BEFORE_TEXT|LAYOUT_SIDE_TOP|JUSTIFY_LEFT|LAYOUT_SIDE_RIGHT)
|
294
|
+
drawlocationforselectedonly.setCheck(false)
|
295
|
+
drawlocationforselectedonly.disable
|
296
|
+
drawlocationforselectedonly.tipText = BOX_SVG_EXPORTALLLOCSSELTXT_TOOLTIP
|
297
|
+
map.options['text_for_selected_only'] = false
|
298
|
+
|
299
|
+
exportoptionsdatatarget.connect(SEL_COMMAND) {
|
300
|
+
case exportoptionsdatatarget.value
|
301
|
+
when 0
|
302
|
+
exportoptionsselectedonly.disable
|
303
|
+
# exportoptionsselectedonly.setCheck(false)
|
304
|
+
drawlocationforselectedonly.disable
|
305
|
+
# drawlocationforselectedonly.setCheck(false)
|
306
|
+
map.options['split_sections'] = false
|
307
|
+
map.options['current_section_only'] = false
|
308
|
+
# map.options['selected_elements_only'] = false
|
309
|
+
# map.options['location_text_for_selected_only'] = false
|
310
|
+
showlocationtext.enable
|
311
|
+
map.options['draw_roomnames'] = showlocationtext.check
|
312
|
+
when 1
|
313
|
+
exportoptionsselectedonly.disable
|
314
|
+
# exportoptionsselectedonly.setCheck(false)
|
315
|
+
drawlocationforselectedonly.disable
|
316
|
+
# drawlocationforselectedonly.setCheck(false)
|
317
|
+
map.options['split_sections'] = true
|
318
|
+
map.options['current_section_only'] = false
|
319
|
+
# map.options['selected_elements_only'] = false
|
320
|
+
# map.options['location_text_for_selected_only'] = false
|
321
|
+
showlocationtext.enable
|
322
|
+
map.options['draw_roomnames'] = showlocationtext.check
|
323
|
+
when 2
|
324
|
+
exportoptionsselectedonly.enable
|
325
|
+
drawlocationforselectedonly.enable
|
326
|
+
map.options['split_sections'] = true
|
327
|
+
map.options['current_section_only'] = true
|
328
|
+
if drawlocationforselectedonly.check
|
329
|
+
showlocationtext.disable
|
330
|
+
map.options['draw_roomnames'] = false
|
331
|
+
end
|
332
|
+
end
|
113
333
|
}
|
114
|
-
|
115
|
-
|
334
|
+
|
335
|
+
exportoptionsselectedonly.connect(SEL_COMMAND) {
|
336
|
+
map.options['selected_elements_only'] = (exportoptionsselectedonly.check == true)
|
337
|
+
if exportoptionsselectedonly.check
|
338
|
+
drawlocationforselectedonly.disable
|
339
|
+
drawlocationforselectedonly.setCheck(false)
|
340
|
+
else
|
341
|
+
drawlocationforselectedonly.enable
|
342
|
+
end
|
116
343
|
}
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
when 2
|
131
|
-
map.options['objs_fill_colour'] = "yellow"
|
132
|
-
map.options['corner_fill_colour'] = "yellow"
|
133
|
-
map.options['num_fill_colour'] = "yellow"
|
134
|
-
map.options['door_line_colour'] = "goldenrod"
|
135
|
-
when 3
|
136
|
-
map.options['objs_fill_colour'] = "lightblue"
|
137
|
-
map.options['corner_fill_colour'] = "lightblue"
|
138
|
-
map.options['num_fill_colour'] = "lightblue"
|
139
|
-
map.options['door_line_colour'] = "darkslateblue"
|
140
|
-
end
|
344
|
+
|
345
|
+
drawlocationforselectedonly.connect(SEL_COMMAND) {
|
346
|
+
map.options['text_for_selected_only'] = (drawlocationforselectedonly.check == true)
|
347
|
+
if drawlocationforselectedonly.check
|
348
|
+
showlocationtext.disable
|
349
|
+
map.options['draw_roomnames'] = false
|
350
|
+
exportoptionsselectedonly.disable
|
351
|
+
exportoptionsselectedonly.setCheck(false)
|
352
|
+
else
|
353
|
+
showlocationtext.enable
|
354
|
+
map.options['draw_roomnames'] = showlocationtext.check
|
355
|
+
exportoptionsselectedonly.enable
|
356
|
+
end
|
141
357
|
}
|
142
|
-
|
143
|
-
|
144
|
-
|
358
|
+
|
359
|
+
|
360
|
+
|
361
|
+
# Dialog button(s):
|
362
|
+
# =================
|
363
|
+
|
364
|
+
# Horizontal frame to hold button
|
365
|
+
dialogbuttonsframe = FXHorizontalFrame.new(mainFrame,
|
366
|
+
LAYOUT_SIDE_BOTTOM|LAYOUT_FILL_X|
|
367
|
+
PACK_UNIFORM_WIDTH)
|
368
|
+
|
369
|
+
# OK button
|
370
|
+
FXButton.new(dialogbuttonsframe, "&OK", nil, self, FXDialogBox::ID_ACCEPT,
|
145
371
|
FRAME_RAISED|LAYOUT_FILL_X|FRAME_THICK|LAYOUT_RIGHT|LAYOUT_CENTER_Y)
|
146
372
|
|
373
|
+
|
374
|
+
|
147
375
|
create
|
148
|
-
|
376
|
+
|
149
377
|
end
|
150
378
|
end
|