ifmapper 2.0.9 → 2.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Binary file
@@ -1,6 +1,6 @@
1
1
 
2
2
  begin
3
- if RUBY_VERSION.to_f < 1.9
3
+ if Gem::Version.new(RUBY_VERSION) < Gem::Version.new('1.9.0')
4
4
  require 'iconv'
5
5
  end
6
6
  rescue LoadError
@@ -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 Structured Vector Graphics (SVG)
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
- ok = false
1437
- browsers.each { |cmd|
1438
- if RUBY_PLATFORM =~ /mswin/
1439
- ok = system("start #{cmd} #{address}")
1440
- else
1441
- ok = system("#{cmd} #{address} &")
1442
- end
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
- @locationnos = FXCheckButton.new(mainFrame, BOX_SVG_LOCATIONNOS, nil, 0,
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
- @locationnos.setCheck(true)
32
+ showlocationnumbers.setCheck(true)
33
+ showlocationnumbers.tipText = BOX_SVG_SHOWLOCNUMS_TOOLTIP
16
34
  map.options['print_room_nums'] = true
17
35
 
18
- @interactive = FXCheckButton.new(mainFrame, BOX_SVG_INTERACTIVE, nil, 0,
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
- @interactive.setCheck(true)
22
- map.options['draw_interactive'] = true
23
-
24
- @connections = FXCheckButton.new(mainFrame, BOX_SVG_CONNECTIONS, nil, 0,
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
- @roomnames = FXCheckButton.new(mainFrame, BOX_SVG_ROOMNAMES, nil, 0,
31
- ICON_BEFORE_TEXT|LAYOUT_SIDE_TOP|
32
- LAYOUT_SIDE_RIGHT)
33
- @roomnames.setCheck(true)
34
- map.options['draw_roomnames'] = true
35
-
36
- @sectioncomments = FXCheckButton.new(mainFrame, BOX_SVG_SECTIONCOMMENTS, nil, 0,
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
- @sectioncomments.setCheck(true)
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
- @splitsections = FXCheckButton.new(mainFrame, BOX_SVG_SPLITSECTIONS, nil, 0,
43
- ICON_BEFORE_TEXT|LAYOUT_SIDE_TOP|
44
- LAYOUT_SIDE_RIGHT)
45
- @splitsections.setCheck(false)
46
- map.options['split_sections'] = false
47
-
48
- compassframe = FXHorizontalFrame.new(mainFrame, LAYOUT_SIDE_TOP|LAYOUT_FILL_X)
49
- FXLabel.new(compassframe, BOX_SVG_COMPASS_SIZE, nil, 0, LAYOUT_SIDE_RIGHT)
50
- @compasssize = FXSlider.new(compassframe, nil, 0,
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|LAYOUT_SIDE_TOP|LAYOUT_SIDE_RIGHT,
130
+ SLIDER_TICKS_TOP|LAYOUT_RIGHT,
53
131
  :width => 100)
54
- @compasssize.range = (0..15)
55
- @compasssize.value = 3
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
- thicknessframe = FXHorizontalFrame.new(mainFrame, LAYOUT_SIDE_TOP|LAYOUT_FILL_X)
59
- FXLabel.new(thicknessframe, BOX_SVG_LINE_THICKNESS, nil, 0, LAYOUT_SIDE_RIGHT)
60
- @linethickness = FXSlider.new(thicknessframe, nil, 0,
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|LAYOUT_SIDE_TOP|LAYOUT_SIDE_RIGHT,
155
+ SLIDER_TICKS_TOP|LAYOUT_RIGHT,
63
156
  :width => 100)
64
- @linethickness.range = (1..5)
65
- @linethickness.value = 2
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
- colourframe = FXHorizontalFrame.new(mainFrame, LAYOUT_SIDE_TOP|LAYOUT_FILL_X)
71
-
72
- FXLabel.new(colourframe, BOX_SVG_COLOUR_SCHEME, nil, 0, LAYOUT_FILL_X)
73
- pane = FXPopup.new(self)
74
- BOX_SVG_COLOUR_SCHEME_TEXT.each { |t|
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
- @colourscheme = FXOptionMenu.new(colourframe, pane, FRAME_RAISED|FRAME_THICK|
78
- JUSTIFY_HZ_APART|ICON_AFTER_TEXT|
79
- LAYOUT_CENTER_X|LAYOUT_CENTER_Y|LAYOUT_FIX_WIDTH, :width => 100)
80
- @colourscheme.currentNo = 1
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
- @locationnos.connect(SEL_COMMAND) {
92
- map.options['print_room_nums'] = (@locationnos.check == true)
93
- }
94
- @interactive.connect(SEL_COMMAND) {
95
- map.options['draw_interactive'] = (@interactive.check == true)
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
- @connections.connect(SEL_COMMAND) {
98
- map.options['draw_connections'] = (@connections.check == true)
99
- }
100
- @roomnames.connect(SEL_COMMAND) {
101
- map.options['draw_roomnames'] = (@roomnames.check == true)
102
- }
103
- @sectioncomments.connect(SEL_COMMAND) {
104
- map.options['draw_sectioncomments'] = (@sectioncomments.check == true)
105
- }
106
- @splitsections.connect(SEL_COMMAND) {
107
- map.options['split_sections'] = (@splitsections.check == true)
108
- }
109
- @linethickness.connect(SEL_COMMAND) {
110
- map.options['room_line_width'] = (@linethickness.value)
111
- map.options['conn_line_width'] = (@linethickness.value)
112
- map.options['door_line_width'] = (@linethickness.value)
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
- @compasssize.connect(SEL_COMMAND) {
115
- map.options['compass_size'] = (@compasssize.value)
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
- @colourscheme.connect(SEL_COMMAND) {
119
- case @colourscheme.currentNo
120
- when 0
121
- map.options['objs_fill_colour'] = "lightpink"
122
- map.options['corner_fill_colour'] = "lightpink"
123
- map.options['num_fill_colour'] = "lightpink"
124
- map.options['door_line_colour'] = "firebrick"
125
- when 1
126
- map.options['objs_fill_colour'] = "lightgreen"
127
- map.options['corner_fill_colour'] = "lightgreen"
128
- map.options['num_fill_colour'] = "lightgreen"
129
- map.options['door_line_colour'] = "forestgreen"
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
- # Accept
144
- FXButton.new(buttons, "&OK", nil, self, FXDialogBox::ID_ACCEPT,
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