ifmapper 1.1.6 → 1.2.0

Sign up to get free protection for your applications and to get access to all the features.
data/IFMapper.gemspec CHANGED
@@ -2,7 +2,7 @@ require "rubygems"
2
2
 
3
3
  spec = Gem::Specification.new do |spec|
4
4
  spec.name = "ifmapper"
5
- spec.version = '1.1.6'
5
+ spec.version = '1.2.0'
6
6
  spec.author = "Gonzalo Garramuno"
7
7
  spec.email = 'ggarra13@gmail.com'
8
8
  spec.homepage = 'http://www.rubyforge.org/projects/ifmapper/'
data/icons/compass.svg ADDED
@@ -0,0 +1,172 @@
1
+ <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2
+ <!-- Created with Inkscape (http://www.inkscape.org/) -->
3
+ <!-- compass-rose-basic-thin-letters public domain SVG compass -->
4
+ <!-- http://wiki.openstreetmap.org/wiki/Compass_Rose#compass-rose-basic-thin-letters-->
5
+ <svg
6
+ xmlns:svg="http://www.w3.org/2000/svg"
7
+ xmlns="http://www.w3.org/2000/svg"
8
+ version="1.0"
9
+ width="64"
10
+ height="64"
11
+ id="svg7149">
12
+ <defs
13
+ id="defs7151" />
14
+ <g
15
+ transform="matrix(0.9127916,0,0,0.9127916,2.9107116,3.3284038)"
16
+ id="g7792"
17
+ style="stroke:#000000;stroke-opacity:1">
18
+ <g
19
+ transform="matrix(0.2952397,-0.2952397,0.2952397,0.2952397,8.1557814,25.617231)"
20
+ id="g7711"
21
+ style="stroke:#000000;stroke-opacity:1">
22
+ <g
23
+ id="g7713"
24
+ style="stroke:#000000;stroke-opacity:1">
25
+ <path
26
+ d="M 30,0.16877013 L 30,49.049843 L 35,44.049843 L 30,0.16877013 z"
27
+ id="path7715"
28
+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.29764605px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
29
+ <path
30
+ d="M 29.690956,0.16877013 L 29.690956,49.049843 L 24.690956,43.964041 L 29.690956,0.16877013 z"
31
+ id="path7717"
32
+ style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.29764605px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
33
+ </g>
34
+ <g
35
+ transform="matrix(0,1,-1,0,79.044144,19.353188)"
36
+ id="g7719"
37
+ style="stroke:#000000;stroke-opacity:1">
38
+ <path
39
+ d="M 30,0.16877013 L 30,49.049843 L 35,44.049843 L 30,0.16877013 z"
40
+ id="path7721"
41
+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.29764605px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
42
+ <path
43
+ d="M 29.690956,0.16877013 L 29.690956,49.049843 L 24.690956,43.964041 L 29.690956,0.16877013 z"
44
+ id="path7723"
45
+ style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.29764605px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
46
+ </g>
47
+ <g
48
+ transform="matrix(-1,0,0,-1,59.690956,98.397332)"
49
+ id="g7725"
50
+ style="stroke:#000000;stroke-opacity:1">
51
+ <path
52
+ d="M 30,0.16877013 L 30,49.049843 L 35,44.049843 L 30,0.16877013 z"
53
+ id="path7727"
54
+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.29764605px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
55
+ <path
56
+ d="M 29.690956,0.16877013 L 29.690956,49.049843 L 24.690956,43.964041 L 29.690956,0.16877013 z"
57
+ id="path7729"
58
+ style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.29764605px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
59
+ </g>
60
+ <g
61
+ transform="matrix(0,-1,1,0,-19.353188,79.044144)"
62
+ id="g7731"
63
+ style="stroke:#000000;stroke-opacity:1">
64
+ <path
65
+ d="M 30,0.16877013 L 30,49.049843 L 35,44.049843 L 30,0.16877013 z"
66
+ id="path7733"
67
+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.29764605px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
68
+ <path
69
+ d="M 29.690956,0.16877013 L 29.690956,49.049843 L 24.690956,43.964041 L 29.690956,0.16877013 z"
70
+ id="path7735"
71
+ style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.29764605px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
72
+ </g>
73
+ </g>
74
+ <g
75
+ transform="matrix(0.50835,0,0,0.50835,16.320802,6.3209209)"
76
+ id="g7697"
77
+ style="stroke:#000000;stroke-opacity:1">
78
+ <g
79
+ id="g7671"
80
+ style="stroke:#000000;stroke-opacity:1">
81
+ <path
82
+ d="M 30,0.16877013 L 30,49.049843 L 35,44.049843 L 30,0.16877013 z"
83
+ id="path2393"
84
+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.29764605px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
85
+ <path
86
+ d="M 29.690956,0.16877013 L 29.690956,49.049843 L 24.690956,43.964041 L 29.690956,0.16877013 z"
87
+ id="path7160"
88
+ style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.29764605px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
89
+ </g>
90
+ <g
91
+ transform="matrix(0,1,-1,0,79.044144,19.353188)"
92
+ id="g7679"
93
+ style="stroke:#000000;stroke-opacity:1">
94
+ <path
95
+ d="M 30,0.16877013 L 30,49.049843 L 35,44.049843 L 30,0.16877013 z"
96
+ id="path7681"
97
+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.29764605px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
98
+ <path
99
+ d="M 29.690956,0.16877013 L 29.690956,49.049843 L 24.690956,43.964041 L 29.690956,0.16877013 z"
100
+ id="path7683"
101
+ style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.29764605px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
102
+ </g>
103
+ <g
104
+ transform="matrix(-1,0,0,-1,59.690956,98.397332)"
105
+ id="g7685"
106
+ style="stroke:#000000;stroke-opacity:1">
107
+ <path
108
+ d="M 30,0.16877013 L 30,49.049843 L 35,44.049843 L 30,0.16877013 z"
109
+ id="path7687"
110
+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.29764605px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
111
+ <path
112
+ d="M 29.690956,0.16877013 L 29.690956,49.049843 L 24.690956,43.964041 L 29.690956,0.16877013 z"
113
+ id="path7689"
114
+ style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.29764605px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
115
+ </g>
116
+ <g
117
+ transform="matrix(0,-1,1,0,-19.353188,79.044144)"
118
+ id="g7691"
119
+ style="stroke:#000000;stroke-opacity:1">
120
+ <path
121
+ d="M 30,0.16877013 L 30,49.049843 L 35,44.049843 L 30,0.16877013 z"
122
+ id="path7693"
123
+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.29764605px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
124
+ <path
125
+ d="M 29.690956,0.16877013 L 29.690956,49.049843 L 24.690956,43.964041 L 29.690956,0.16877013 z"
126
+ id="path7695"
127
+ style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.29764605px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
128
+ </g>
129
+ </g>
130
+ </g>
131
+ <text
132
+ x="28.247892"
133
+ y="7.6937027"
134
+ id="text7784"
135
+ xml:space="preserve"
136
+ style="font-size:10px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:0.91279161px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans;-inkscape-font-specification:Bitstream Vera Sans"><tspan
137
+ x="28.247892"
138
+ y="7.6937027"
139
+ id="tspan7786"
140
+ style="font-size:10px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;stroke-width:0.91279161;font-family:Bitstream Vera Sans;-inkscape-font-specification:Bitstream Vera Sans">N</tspan></text>
141
+ <text
142
+ x="28.688822"
143
+ y="62.650463"
144
+ id="text7788"
145
+ xml:space="preserve"
146
+ style="font-size:10px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:100%;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:0.91279161px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans;-inkscape-font-specification:Bitstream Vera Sans"><tspan
147
+ x="28.688822"
148
+ y="62.650463"
149
+ id="tspan7790"
150
+ style="font-size:10px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:100%;writing-mode:lr-tb;text-anchor:start;stroke-width:0.91279161;font-family:Bitstream Vera Sans;-inkscape-font-specification:Bitstream Vera Sans">S</tspan></text>
151
+ <text
152
+ x="0"
153
+ y="34.960857"
154
+ id="text7820"
155
+ xml:space="preserve"
156
+ style="font-size:10px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:100%;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:0.91279161px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans;-inkscape-font-specification:Bitstream Vera Sans"><tspan
157
+ x="0"
158
+ y="34.960857"
159
+ id="tspan7822"
160
+ style="font-size:10px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:100%;writing-mode:lr-tb;text-anchor:start;stroke-width:0.91279161;font-family:Bitstream Vera Sans;-inkscape-font-specification:Bitstream Vera Sans">W</tspan></text>
161
+ <text
162
+ x="55.531315"
163
+ y="34.960857"
164
+ id="text7824"
165
+ xml:space="preserve"
166
+ style="font-size:10px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:100%;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:0.91279161px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans;-inkscape-font-specification:Bitstream Vera Sans"><tspan
167
+ x="55.531315"
168
+ y="34.960857"
169
+ id="tspan7826"
170
+ style="font-size:10px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:100%;writing-mode:lr-tb;text-anchor:start;stroke-width:0.91279161;font-family:Bitstream Vera Sans;-inkscape-font-specification:Bitstream Vera Sans">E</tspan></text>
171
+ </svg>
172
+
@@ -48,7 +48,7 @@ require 'IFMapper/FXWarningBox'
48
48
  class FXMapperWindow < FXMainWindow
49
49
 
50
50
  PROGRAM_NAME = "Interactive Fiction Mapper"
51
- VERSION = '1.1.6'
51
+ VERSION = '1.2.0'
52
52
  AUTHOR = "Gonzalo Garramuno"
53
53
 
54
54
  @@copy_buffer = nil
@@ -471,6 +471,37 @@ class FXMapperWindow < FXMainWindow
471
471
  map.export_tads( d.filename ) if d.filename != ''
472
472
  end
473
473
 
474
+ #
475
+ # Export current map as Structured Vector Graphics (SVG)
476
+ #
477
+ def svg_export_cb(sender, sel, msg)
478
+ map = current_map
479
+ return unless map
480
+
481
+ begin
482
+ require 'IFMapper/SVGMapExporter'
483
+ rescue LoadError => e
484
+ w = FXWarningBox.new( self, "#{e}")
485
+ w.execute
486
+ return
487
+ end
488
+
489
+ require 'IFMapper/FXSVGMapExporterOptionsDialogBox'
490
+ cmd = FXSVGMapExporterOptionsDialogBox.new(self, MSG_SAVE_MAP_AS_SVG,
491
+ map).execute
492
+
493
+ return if cmd == 0
494
+
495
+ require 'IFMapper/FXMapFileDialog'
496
+ d = FXMapFileDialog.new(self, MSG_SAVE_MAP_AS_SVG,
497
+ [
498
+ FMT_SVG
499
+ ])
500
+ if d.filename != ''
501
+ map.svg_export(d.filename)
502
+ end
503
+ end
504
+
474
505
 
475
506
  #
476
507
  # Export current map as Acrobat PDF
@@ -995,6 +1026,9 @@ class FXMapperWindow < FXMainWindow
995
1026
 
996
1027
  cmd = FXMenuCommand.new(submenu, MENU_EXPORT_PDF, nil)
997
1028
  cmd.connect(SEL_COMMAND, method(:pdf_export_cb))
1029
+
1030
+ cmd = FXMenuCommand.new(submenu, MENU_EXPORT_SVG, nil)
1031
+ cmd.connect(SEL_COMMAND, method(:svg_export_cb))
998
1032
 
999
1033
  cmd = FXMenuCommand.new(submenu, MENU_EXPORT_TRIZBORT, nil)
1000
1034
  cmd.connect(SEL_COMMAND, method(:trizbort_export_cb))
@@ -1114,7 +1148,7 @@ class FXMapperWindow < FXMainWindow
1114
1148
  update_section
1115
1149
  end
1116
1150
  }
1117
- cmd = FXMenuCommand.new(submenu, MENU_RENAME_SECTION)
1151
+ cmd = FXMenuCommand.new(submenu, MENU_SECTION_INFO)
1118
1152
  cmd.connect(SEL_COMMAND) {
1119
1153
  map = current_map
1120
1154
  if map
@@ -0,0 +1,150 @@
1
+ class FXSVGMapExporterOptionsDialogBox < FXDialogBox
2
+
3
+ def initialize(parent, title, map)
4
+
5
+ decor = DECOR_TITLE|DECOR_BORDER|DECOR_CLOSE
6
+
7
+ super( parent, title, decor, 40, 40, 0, 0 )
8
+ mainFrame = FXVerticalFrame.new(self,
9
+ FRAME_SUNKEN|FRAME_THICK|
10
+ LAYOUT_FILL_X|LAYOUT_FILL_Y)
11
+
12
+ @locationnos = FXCheckButton.new(mainFrame, BOX_SVG_LOCATIONNOS, nil, 0,
13
+ ICON_BEFORE_TEXT|LAYOUT_SIDE_TOP|
14
+ LAYOUT_SIDE_RIGHT)
15
+ @locationnos.setCheck(true)
16
+ map.options['print_room_nums'] = true
17
+
18
+ @interactive = FXCheckButton.new(mainFrame, BOX_SVG_INTERACTIVE, nil, 0,
19
+ ICON_BEFORE_TEXT|LAYOUT_SIDE_TOP|
20
+ 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
29
+
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,
37
+ ICON_BEFORE_TEXT|LAYOUT_SIDE_TOP|
38
+ LAYOUT_SIDE_RIGHT)
39
+ @sectioncomments.setCheck(true)
40
+ 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,
51
+ SLIDER_HORIZONTAL|LAYOUT_FIX_WIDTH|
52
+ SLIDER_TICKS_TOP|LAYOUT_SIDE_TOP|LAYOUT_SIDE_RIGHT,
53
+ :width => 100)
54
+ @compasssize.range = (0..15)
55
+ @compasssize.value = 3
56
+ 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,
61
+ SLIDER_HORIZONTAL|LAYOUT_FIX_WIDTH|
62
+ SLIDER_TICKS_TOP|LAYOUT_SIDE_TOP|LAYOUT_SIDE_RIGHT,
63
+ :width => 100)
64
+ @linethickness.range = (1..5)
65
+ @linethickness.value = 2
66
+ map.options['room_line_width'] = 2
67
+ map.options['conn_line_width'] = 2
68
+ 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)
76
+ }
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
81
+ map.options['objs_fill_colour'] = "lightgreen"
82
+ map.options['corner_fill_colour'] = "lightgreen"
83
+ map.options['num_fill_colour'] = "lightgreen"
84
+ 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
+
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)
96
+ }
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)
113
+ }
114
+ @compasssize.connect(SEL_COMMAND) {
115
+ map.options['compass_size'] = (@compasssize.value)
116
+ }
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
141
+ }
142
+
143
+ # Accept
144
+ FXButton.new(buttons, "&OK", nil, self, FXDialogBox::ID_ACCEPT,
145
+ FRAME_RAISED|LAYOUT_FILL_X|FRAME_THICK|LAYOUT_RIGHT|LAYOUT_CENTER_Y)
146
+
147
+ create
148
+
149
+ end
150
+ end
@@ -4,12 +4,14 @@ class FXSectionDialogBox < FXDialogBox
4
4
 
5
5
  def copy_to()
6
6
  @section.name = @name.text
7
+ @section.comments = @comments.text
7
8
  @map.update_title
8
9
  end
9
10
 
10
11
  def copy_from(section)
11
12
  @name.text = section.name.to_s
12
13
  @section = section
14
+ @comments.text = section.comments
13
15
  end
14
16
 
15
17
  def initialize(map)
@@ -25,11 +27,20 @@ class FXSectionDialogBox < FXDialogBox
25
27
  FXLabel.new(frame, "Name: ", nil, 0, LAYOUT_FILL_X)
26
28
  @name = FXTextField.new(frame, 40, nil, 0, LAYOUT_FILL_ROW)
27
29
 
30
+ commentsframe = FXVerticalFrame.new(mainFrame, LAYOUT_SIDE_TOP|LAYOUT_FILL_X)
31
+
32
+
33
+ FXLabel.new(commentsframe, "Section Comments:", nil, 0, LAYOUT_FILL_X)
34
+ @comments = FXText.new(commentsframe, nil, 0, LAYOUT_FILL_X)
35
+ @comments.visibleRows = 4;
36
+ @comments.visibleColumns = 32;
37
+
28
38
  frame = FXVerticalFrame.new(mainFrame,
29
39
  LAYOUT_SIDE_TOP|LAYOUT_FILL_X|LAYOUT_FILL_Y)
30
40
 
31
41
 
32
42
  @name.connect(SEL_CHANGED) { copy_to() }
43
+ @comments.connect(SEL_CHANGED) { copy_to() }
33
44
  @map = map
34
45
 
35
46
  # We need to create the dialog box first, so we can use select text.