ifmapper 1.0.0 → 1.0.6
Sign up to get free protection for your applications and to get access to all the features.
- data/HISTORY.txt +648 -627
- data/IFMapper.gemspec +29 -28
- data/IFMapper.rbw +31 -31
- data/TODO.txt +8 -7
- data/bin/IFMapper +31 -31
- data/docs/en/index.html +0 -0
- data/docs/en/start.html +3 -2
- data/docs/en/start.html~ +516 -0
- data/docs/es/index.html +0 -0
- data/docs/es/start.html +13 -14
- data/docs/es/start.html~ +1280 -0
- data/docs/images/IFMapper_main.gif +0 -0
- data/docs/images/automap.gif +0 -0
- data/docs/images/complex_connection.gif +0 -0
- data/docs/images/connection.gif +0 -0
- data/docs/images/connection_menu.gif +0 -0
- data/docs/images/room_description.gif +0 -0
- data/docs/images/room_small.gif +0 -0
- data/icons/copy.png +0 -0
- data/icons/cut.png +0 -0
- data/icons/filenew.png +0 -0
- data/icons/fileopen.png +0 -0
- data/icons/filesave.png +0 -0
- data/icons/filesaveas.png +0 -0
- data/icons/help.png +0 -0
- data/icons/kill.png +0 -0
- data/icons/nextpage.png +0 -0
- data/icons/paste.png +0 -0
- data/icons/prevpage.png +0 -0
- data/icons/printicon.png +0 -0
- data/icons/redo.png +0 -0
- data/icons/room_e.gif +0 -0
- data/icons/room_e.xpm +0 -0
- data/icons/room_n.gif +0 -0
- data/icons/room_n.xpm +0 -0
- data/icons/room_ne.gif +0 -0
- data/icons/room_ne.xpm +0 -0
- data/icons/room_nw.gif +0 -0
- data/icons/room_nw.xpm +0 -0
- data/icons/room_s.gif +0 -0
- data/icons/room_s.xpm +0 -0
- data/icons/room_se.gif +0 -0
- data/icons/room_se.xpm +0 -0
- data/icons/room_sw.gif +0 -0
- data/icons/room_sw.xpm +0 -0
- data/icons/room_w.gif +0 -0
- data/icons/room_w.xpm +0 -0
- data/icons/saveas.png +0 -0
- data/icons/undo.png +0 -0
- data/icons/winapp.png +0 -0
- data/icons/zoom.png +0 -0
- data/lib/IFMapper/AStar.rb +250 -250
- data/lib/IFMapper/Connection.rb +202 -202
- data/lib/IFMapper/FXAboutDialogBox.rb +32 -32
- data/lib/IFMapper/FXConnection.rb +364 -364
- data/lib/IFMapper/FXConnectionDialogBox.rb +124 -124
- data/lib/IFMapper/FXDCPostscript.rb +404 -404
- data/lib/IFMapper/FXDCPrint.rb +15 -15
- data/lib/IFMapper/FXItemList.rb +108 -0
- data/lib/IFMapper/FXMap.rb +2147 -2116
- data/lib/IFMapper/FXMapColorBox.rb +88 -88
- data/lib/IFMapper/FXMapDialogBox.rb +127 -127
- data/lib/IFMapper/FXMapFileDialog.rb +34 -34
- data/lib/IFMapper/FXMapperSettings.rb +206 -205
- data/lib/IFMapper/FXMapperWindow.rb +1592 -1571
- data/lib/IFMapper/FXPDFMapExporterOptionsDialogBox.rb +46 -0
- data/lib/IFMapper/FXRoom.rb +263 -263
- data/lib/IFMapper/FXRoomDialogBox.rb +159 -159
- data/lib/IFMapper/FXRoomList.rb +95 -95
- data/lib/IFMapper/FXSearchDialogBox.rb +51 -51
- data/lib/IFMapper/FXSection.rb +33 -33
- data/lib/IFMapper/FXSectionDialogBox.rb +38 -38
- data/lib/IFMapper/FXSpline.rb +52 -52
- data/lib/IFMapper/FXWarningBox.rb +51 -50
- data/lib/IFMapper/GUEReader.rb +445 -445
- data/lib/IFMapper/IFMReader.rb +584 -584
- data/lib/IFMapper/IFMWriter.rb +245 -227
- data/lib/IFMapper/Inform7Writer.rb +579 -573
- data/lib/IFMapper/InformReader.rb +478 -478
- data/lib/IFMapper/InformWriter.rb +364 -359
- data/lib/IFMapper/Map.rb +202 -200
- data/lib/IFMapper/MapPrinting.rb +162 -162
- data/lib/IFMapper/MapReader.rb +900 -900
- data/lib/IFMapper/PDFMapExporter.rb +526 -483
- data/lib/IFMapper/Room.rb +153 -151
- data/lib/IFMapper/Section.rb +234 -234
- data/lib/IFMapper/TADSReader.rb +474 -471
- data/lib/IFMapper/TADSWriter.rb +375 -370
- data/lib/IFMapper/TranscriptDialogBox.rb +0 -0
- data/lib/IFMapper/TranscriptReader.rb +1361 -1359
- data/lib/IFMapper/locales/en/Messages.rb +446 -435
- data/lib/IFMapper/locales/es/Messages.rb +451 -440
- data/lib/IFMapper/locales/es/Messages_iso-8859-1.rb +455 -440
- data/lib/IFMapper/locales/es/runme.sh +3 -3
- data/maps/A New Life.map b/data/maps/A New → Life.map +0 -0
- data/maps/AMFV.map +0 -0
- data/maps/AllRoads.map +0 -0
- data/maps/Aotearoa.map +0 -0
- data/maps/Bronze.map +0 -0
- data/maps/Bureaucracy.ifm +0 -0
- data/maps/Bureaucracy.map +0 -0
- data/maps/CityOfSecrets.map +0 -0
- data/maps/DDIV.map +0 -0
- data/maps/Following_A_Star.map +0 -0
- data/maps/Heated.map +0 -0
- data/maps/Heroine.map +0 -0
- data/maps/History Repeating.map b/data/maps/History → Repeating.map +0 -0
- data/maps/Hollywood_Hijinx.ifm +0 -0
- data/maps/Janitor.map +0 -0
- data/maps/Jigsaw.ifm +0 -0
- data/maps/Jigsaw.map +0 -0
- data/maps/LGOP.ifm +0 -0
- data/maps/Mercy.ifm +0 -0
- data/maps/Ninjas_Fate.map +0 -0
- data/maps/Pen_and_Paint.map +0 -0
- data/maps/Planetfall.ifm +0 -0
- data/maps/Planetfall.map +0 -0
- data/maps/Plundered_Hearts.ifm +0 -0
- data/maps/QuietEvening.map +0 -0
- data/maps/Ralph.ifm +0 -0
- data/maps/Reliques_of_Tolti_Alph.map +0 -0
- data/maps/Revolution.map +0 -0
- data/maps/Robots_of_Dawn.ifm +0 -0
- data/maps/SavoirFare.map +0 -0
- data/maps/Seastalker.ifm +0 -0
- data/maps/Seastalker.map +0 -0
- data/maps/Sherlock.ifm +0 -0
- data/maps/SoFar.ifm +0 -0
- data/maps/Starcross.ifm +0 -0
- data/maps/Suspended.ifm +0 -0
- data/maps/Tangle.map +0 -0
- data/maps/The_Lost_Sheep.map +0 -0
- data/maps/Unforgotten.map +0 -0
- data/maps/Warbler's Nest.map +0 -0
- data/maps/Warbler's_Nest.map +0 -0
- data/maps/Westminster_Abbey.map +0 -0
- data/maps/WinterWonderland.map +0 -0
- data/maps/Wishbringer.ifm +0 -0
- data/maps/Wishbringer2.ifm +0 -0
- data/maps/Zork1.ifm +0 -0
- data/maps/Zork2.ifm +0 -0
- data/maps/Zork3.ifm +0 -0
- data/maps/Zork_Zero.ifm +0 -0
- data/maps/anchor.ifm +0 -0
- data/maps/anchor.map +0 -0
- data/maps/atrox.ifm +0 -0
- data/maps/awaken.ifm +0 -0
- data/maps/babel.ifm +0 -0
- data/maps/balances.map +0 -0
- data/maps/ballerina.map +0 -0
- data/maps/bear.map +0 -0
- data/maps/bluechairs.map +0 -0
- data/maps/break_in.map +0 -0
- data/maps/bse.ifm +0 -0
- data/maps/building.map +0 -0
- data/maps/change.ifm +0 -0
- data/maps/christminster.map +0 -0
- data/maps/curses.ifm +0 -0
- data/maps/curves.ifm +0 -0
- data/maps/deadline.map +0 -0
- data/maps/delusions.map +0 -0
- data/maps/devours.map +0 -0
- data/maps/distress.map +0 -0
- data/maps/djinni.map +0 -0
- data/maps/dreamhold.map +0 -0
- data/maps/drift3.map +0 -0
- data/maps/eas.map +0 -0
- data/maps/eas2.map +0 -0
- data/maps/eas3.map +0 -0
- data/maps/edifice.ifm +0 -0
- data/maps/fallacy.map +0 -0
- data/maps/frozen.ifm +0 -0
- data/maps/gamlet.map +0 -0
- data/maps/glow.ifm +0 -0
- data/maps/guilty_bastards.map +0 -0
- data/maps/heist.map +0 -0
- data/maps/heroes.map +0 -0
- data/maps/inhumane.map +0 -0
- data/maps/kaged.map +0 -0
- data/maps/library.ifm +0 -0
- data/maps/lurkinghorror.map +0 -0
- data/maps/metamorphoses.map +0 -0
- data/maps/mindelec.ifm +0 -0
- data/maps/minster.ifm +0 -0
- data/maps/mite.map +0 -0
- data/maps/moonmist.map +0 -0
- data/maps/muldoon_legacy.map +0 -0
- data/maps/muse.ifm +0 -0
- data/maps/paperchase.ifm +0 -0
- data/maps/party.map +0 -0
- data/maps/pawn.map +0 -0
- data/maps/photograph.map +0 -0
- data/maps/pkgirl.map +0 -0
- data/maps/pytho.map +0 -0
- data/maps/risorgimento.map +0 -0
- data/maps/sherbet.map +0 -0
- data/maps/simple.map +0 -0
- data/maps/slouch.map +0 -0
- data/maps/space_st.ifm +0 -0
- data/maps/splashdown.map +0 -0
- data/maps/spring.map +0 -0
- data/maps/squarecircle.map +0 -0
- data/maps/stationfall.ifm +0 -0
- data/maps/theatre.ifm +0 -0
- data/maps/toonesia.ifm +0 -0
- data/maps/tortoise.ifm +0 -0
- data/maps/trinity.map +0 -0
- data/maps/vespers.map +0 -0
- data/maps/vgame.ifm +0 -0
- data/maps/wasp.map +0 -0
- data/maps/weather.ifm +0 -0
- data/maps/windhall.ifm +0 -0
- data/maps/worlds.map +0 -0
- data/maps/xtcontest.map +0 -0
- data/maps/zdungeon.map +0 -0
- data/maps/zebulon.ifm +0 -0
- data/maps/zerosum.map +0 -0
- metadata +226 -183
@@ -1,88 +1,88 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
class FXMapColorBox < FXDialogBox
|
4
|
-
|
5
|
-
def copy_from(map)
|
6
|
-
@backwell.rgba = map.options['BG Color']
|
7
|
-
@boxwell.rgba = map.options['Box BG Color']
|
8
|
-
@boxdarknesswell.rgba = map.options['Box Darkness Color']
|
9
|
-
@boxnumberwell.rgba = map.options['Box Number Color']
|
10
|
-
@boxborderwell.rgba = map.options['Box Border Color']
|
11
|
-
@arrowwell.rgba = map.options['Arrow Color']
|
12
|
-
@map = map
|
13
|
-
end
|
14
|
-
|
15
|
-
def copy_to(sender, id, event)
|
16
|
-
@map.options['BG Color'] = @backwell.rgba
|
17
|
-
@map.options['Box BG Color'] = @boxwell.rgba
|
18
|
-
@map.options['Box Darkness Color'] = @boxdarknesswell.rgba
|
19
|
-
@map.options['Box Number Color'] = @boxnumberwell.rgba
|
20
|
-
@map.options['Box Border Color'] = @boxborderwell.rgba
|
21
|
-
@map.options['Arrow Color'] = @arrowwell.rgba
|
22
|
-
@map.draw
|
23
|
-
end
|
24
|
-
|
25
|
-
def initialize(parent)
|
26
|
-
decor = DECOR_TITLE|DECOR_BORDER|DECOR_CLOSE
|
27
|
-
super(parent, BOX_COLOR, decor)
|
28
|
-
|
29
|
-
# pane for the buttons
|
30
|
-
contents = FXVerticalFrame.new(self, (FRAME_SUNKEN|LAYOUT_FILL_Y|
|
31
|
-
LAYOUT_TOP|LAYOUT_LEFT), 0, 0, 0, 0, 10, 10, 10, 10)
|
32
|
-
|
33
|
-
frame = FXHorizontalFrame.new(contents, (FRAME_SUNKEN|LAYOUT_FILL_X|
|
34
|
-
LAYOUT_TOP|LAYOUT_LEFT), 0, 0, 0, 0, 10, 10, 10, 10)
|
35
|
-
|
36
|
-
FXLabel.new(frame, BOX_BG_COLOR, nil, JUSTIFY_CENTER_X|LAYOUT_FILL_X)
|
37
|
-
@backwell = FXColorWell.new(frame, FXColor::White,
|
38
|
-
nil, 0, (LAYOUT_CENTER_X|LAYOUT_TOP|LAYOUT_LEFT|LAYOUT_SIDE_RIGHT|
|
39
|
-
LAYOUT_FIX_WIDTH|LAYOUT_FIX_HEIGHT), 0, 0, 100, 30)
|
40
|
-
@backwell.connect(SEL_COMMAND, method(:copy_to))
|
41
|
-
|
42
|
-
frame = FXHorizontalFrame.new(contents, (FRAME_SUNKEN|LAYOUT_FILL_X|
|
43
|
-
LAYOUT_TOP|LAYOUT_LEFT), 0, 0, 0, 0, 10, 10, 10, 10)
|
44
|
-
FXLabel.new(frame, BOX_ARROWS_COLOR, nil, JUSTIFY_CENTER_X|LAYOUT_FILL_X)
|
45
|
-
@arrowwell = FXColorWell.new(frame, FXColor::White,
|
46
|
-
nil, 0, (LAYOUT_CENTER_X|LAYOUT_TOP|LAYOUT_LEFT|LAYOUT_SIDE_RIGHT|
|
47
|
-
LAYOUT_FIX_WIDTH|LAYOUT_FIX_HEIGHT), 0, 0, 100, 30)
|
48
|
-
@arrowwell.connect(SEL_COMMAND, method(:copy_to))
|
49
|
-
|
50
|
-
frame = FXHorizontalFrame.new(contents, (FRAME_SUNKEN|LAYOUT_FILL_X|
|
51
|
-
LAYOUT_TOP|LAYOUT_LEFT), 0, 0, 0, 0, 10, 10, 10, 10)
|
52
|
-
FXLabel.new(frame, BOX_BOX_BG_COLOR, nil,JUSTIFY_CENTER_X|LAYOUT_FILL_X)
|
53
|
-
@boxwell = FXColorWell.new(frame, FXColor::White,
|
54
|
-
nil, 0, (LAYOUT_CENTER_X|LAYOUT_TOP|LAYOUT_LEFT|LAYOUT_SIDE_RIGHT|
|
55
|
-
LAYOUT_FIX_WIDTH|LAYOUT_FIX_HEIGHT), 0, 0, 100, 30)
|
56
|
-
@boxwell.connect(SEL_COMMAND, method(:copy_to))
|
57
|
-
|
58
|
-
frame = FXHorizontalFrame.new(contents, (FRAME_SUNKEN|LAYOUT_FILL_X|
|
59
|
-
LAYOUT_TOP|LAYOUT_LEFT), 0, 0, 0, 0, 10, 10, 10, 10)
|
60
|
-
FXLabel.new(frame, BOX_BOX_DARK_COLOR, nil,
|
61
|
-
JUSTIFY_CENTER_X|LAYOUT_FILL_X)
|
62
|
-
@boxdarknesswell = FXColorWell.new(frame, FXColor::White,
|
63
|
-
nil, 0, (LAYOUT_CENTER_X|LAYOUT_TOP|LAYOUT_LEFT|LAYOUT_SIDE_RIGHT|
|
64
|
-
LAYOUT_FIX_WIDTH|LAYOUT_FIX_HEIGHT), 0, 0, 100, 30)
|
65
|
-
@boxdarknesswell.connect(SEL_COMMAND, method(:copy_to))
|
66
|
-
|
67
|
-
frame = FXHorizontalFrame.new(contents, (FRAME_SUNKEN|LAYOUT_FILL_X|
|
68
|
-
LAYOUT_TOP|LAYOUT_LEFT), 0, 0, 0, 0, 10, 10, 10, 10)
|
69
|
-
FXLabel.new(frame, BOX_BOX_BORDER_COLOR, nil,
|
70
|
-
JUSTIFY_CENTER_X|LAYOUT_FILL_X)
|
71
|
-
@boxborderwell = FXColorWell.new(frame, FXColor::White,
|
72
|
-
nil, 0, (LAYOUT_CENTER_X|LAYOUT_TOP|LAYOUT_LEFT|LAYOUT_SIDE_RIGHT|
|
73
|
-
LAYOUT_FIX_WIDTH|LAYOUT_FIX_HEIGHT), 0, 0, 100, 30)
|
74
|
-
@boxborderwell.connect(SEL_COMMAND, method(:copy_to))
|
75
|
-
|
76
|
-
frame = FXHorizontalFrame.new(contents, (FRAME_SUNKEN|LAYOUT_FILL_X|
|
77
|
-
LAYOUT_TOP|LAYOUT_LEFT), 0, 0, 0, 0, 10, 10, 10, 10)
|
78
|
-
FXLabel.new(frame, BOX_BOX_NUMBER_COLOR, nil,
|
79
|
-
JUSTIFY_CENTER_X|LAYOUT_FILL_X)
|
80
|
-
@boxnumberwell = FXColorWell.new(frame, FXColor::White,
|
81
|
-
nil, 0, (LAYOUT_CENTER_X|LAYOUT_TOP|LAYOUT_LEFT|LAYOUT_SIDE_RIGHT|
|
82
|
-
LAYOUT_FIX_WIDTH|LAYOUT_FIX_HEIGHT), 0, 0, 100, 30)
|
83
|
-
@boxnumberwell.connect(SEL_COMMAND, method(:copy_to))
|
84
|
-
|
85
|
-
create
|
86
|
-
show
|
87
|
-
end
|
88
|
-
end
|
1
|
+
|
2
|
+
|
3
|
+
class FXMapColorBox < FXDialogBox
|
4
|
+
|
5
|
+
def copy_from(map)
|
6
|
+
@backwell.rgba = map.options['BG Color']
|
7
|
+
@boxwell.rgba = map.options['Box BG Color']
|
8
|
+
@boxdarknesswell.rgba = map.options['Box Darkness Color']
|
9
|
+
@boxnumberwell.rgba = map.options['Box Number Color']
|
10
|
+
@boxborderwell.rgba = map.options['Box Border Color']
|
11
|
+
@arrowwell.rgba = map.options['Arrow Color']
|
12
|
+
@map = map
|
13
|
+
end
|
14
|
+
|
15
|
+
def copy_to(sender, id, event)
|
16
|
+
@map.options['BG Color'] = @backwell.rgba
|
17
|
+
@map.options['Box BG Color'] = @boxwell.rgba
|
18
|
+
@map.options['Box Darkness Color'] = @boxdarknesswell.rgba
|
19
|
+
@map.options['Box Number Color'] = @boxnumberwell.rgba
|
20
|
+
@map.options['Box Border Color'] = @boxborderwell.rgba
|
21
|
+
@map.options['Arrow Color'] = @arrowwell.rgba
|
22
|
+
@map.draw
|
23
|
+
end
|
24
|
+
|
25
|
+
def initialize(parent)
|
26
|
+
decor = DECOR_TITLE|DECOR_BORDER|DECOR_CLOSE
|
27
|
+
super(parent, BOX_COLOR, decor)
|
28
|
+
|
29
|
+
# pane for the buttons
|
30
|
+
contents = FXVerticalFrame.new(self, (FRAME_SUNKEN|LAYOUT_FILL_Y|
|
31
|
+
LAYOUT_TOP|LAYOUT_LEFT), 0, 0, 0, 0, 10, 10, 10, 10)
|
32
|
+
|
33
|
+
frame = FXHorizontalFrame.new(contents, (FRAME_SUNKEN|LAYOUT_FILL_X|
|
34
|
+
LAYOUT_TOP|LAYOUT_LEFT), 0, 0, 0, 0, 10, 10, 10, 10)
|
35
|
+
|
36
|
+
FXLabel.new(frame, BOX_BG_COLOR, nil, JUSTIFY_CENTER_X|LAYOUT_FILL_X)
|
37
|
+
@backwell = FXColorWell.new(frame, FXColor::White,
|
38
|
+
nil, 0, (LAYOUT_CENTER_X|LAYOUT_TOP|LAYOUT_LEFT|LAYOUT_SIDE_RIGHT|
|
39
|
+
LAYOUT_FIX_WIDTH|LAYOUT_FIX_HEIGHT), 0, 0, 100, 30)
|
40
|
+
@backwell.connect(SEL_COMMAND, method(:copy_to))
|
41
|
+
|
42
|
+
frame = FXHorizontalFrame.new(contents, (FRAME_SUNKEN|LAYOUT_FILL_X|
|
43
|
+
LAYOUT_TOP|LAYOUT_LEFT), 0, 0, 0, 0, 10, 10, 10, 10)
|
44
|
+
FXLabel.new(frame, BOX_ARROWS_COLOR, nil, JUSTIFY_CENTER_X|LAYOUT_FILL_X)
|
45
|
+
@arrowwell = FXColorWell.new(frame, FXColor::White,
|
46
|
+
nil, 0, (LAYOUT_CENTER_X|LAYOUT_TOP|LAYOUT_LEFT|LAYOUT_SIDE_RIGHT|
|
47
|
+
LAYOUT_FIX_WIDTH|LAYOUT_FIX_HEIGHT), 0, 0, 100, 30)
|
48
|
+
@arrowwell.connect(SEL_COMMAND, method(:copy_to))
|
49
|
+
|
50
|
+
frame = FXHorizontalFrame.new(contents, (FRAME_SUNKEN|LAYOUT_FILL_X|
|
51
|
+
LAYOUT_TOP|LAYOUT_LEFT), 0, 0, 0, 0, 10, 10, 10, 10)
|
52
|
+
FXLabel.new(frame, BOX_BOX_BG_COLOR, nil,JUSTIFY_CENTER_X|LAYOUT_FILL_X)
|
53
|
+
@boxwell = FXColorWell.new(frame, FXColor::White,
|
54
|
+
nil, 0, (LAYOUT_CENTER_X|LAYOUT_TOP|LAYOUT_LEFT|LAYOUT_SIDE_RIGHT|
|
55
|
+
LAYOUT_FIX_WIDTH|LAYOUT_FIX_HEIGHT), 0, 0, 100, 30)
|
56
|
+
@boxwell.connect(SEL_COMMAND, method(:copy_to))
|
57
|
+
|
58
|
+
frame = FXHorizontalFrame.new(contents, (FRAME_SUNKEN|LAYOUT_FILL_X|
|
59
|
+
LAYOUT_TOP|LAYOUT_LEFT), 0, 0, 0, 0, 10, 10, 10, 10)
|
60
|
+
FXLabel.new(frame, BOX_BOX_DARK_COLOR, nil,
|
61
|
+
JUSTIFY_CENTER_X|LAYOUT_FILL_X)
|
62
|
+
@boxdarknesswell = FXColorWell.new(frame, FXColor::White,
|
63
|
+
nil, 0, (LAYOUT_CENTER_X|LAYOUT_TOP|LAYOUT_LEFT|LAYOUT_SIDE_RIGHT|
|
64
|
+
LAYOUT_FIX_WIDTH|LAYOUT_FIX_HEIGHT), 0, 0, 100, 30)
|
65
|
+
@boxdarknesswell.connect(SEL_COMMAND, method(:copy_to))
|
66
|
+
|
67
|
+
frame = FXHorizontalFrame.new(contents, (FRAME_SUNKEN|LAYOUT_FILL_X|
|
68
|
+
LAYOUT_TOP|LAYOUT_LEFT), 0, 0, 0, 0, 10, 10, 10, 10)
|
69
|
+
FXLabel.new(frame, BOX_BOX_BORDER_COLOR, nil,
|
70
|
+
JUSTIFY_CENTER_X|LAYOUT_FILL_X)
|
71
|
+
@boxborderwell = FXColorWell.new(frame, FXColor::White,
|
72
|
+
nil, 0, (LAYOUT_CENTER_X|LAYOUT_TOP|LAYOUT_LEFT|LAYOUT_SIDE_RIGHT|
|
73
|
+
LAYOUT_FIX_WIDTH|LAYOUT_FIX_HEIGHT), 0, 0, 100, 30)
|
74
|
+
@boxborderwell.connect(SEL_COMMAND, method(:copy_to))
|
75
|
+
|
76
|
+
frame = FXHorizontalFrame.new(contents, (FRAME_SUNKEN|LAYOUT_FILL_X|
|
77
|
+
LAYOUT_TOP|LAYOUT_LEFT), 0, 0, 0, 0, 10, 10, 10, 10)
|
78
|
+
FXLabel.new(frame, BOX_BOX_NUMBER_COLOR, nil,
|
79
|
+
JUSTIFY_CENTER_X|LAYOUT_FILL_X)
|
80
|
+
@boxnumberwell = FXColorWell.new(frame, FXColor::White,
|
81
|
+
nil, 0, (LAYOUT_CENTER_X|LAYOUT_TOP|LAYOUT_LEFT|LAYOUT_SIDE_RIGHT|
|
82
|
+
LAYOUT_FIX_WIDTH|LAYOUT_FIX_HEIGHT), 0, 0, 100, 30)
|
83
|
+
@boxnumberwell.connect(SEL_COMMAND, method(:copy_to))
|
84
|
+
|
85
|
+
create
|
86
|
+
show
|
87
|
+
end
|
88
|
+
end
|
@@ -1,127 +1,127 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
class FXMapDialogBox < FXDialogBox
|
4
|
-
|
5
|
-
def copy_to()
|
6
|
-
@map.name = @name.text
|
7
|
-
@map.creator = @creator.text
|
8
|
-
@map.navigation = (@read.checkState == 1)
|
9
|
-
|
10
|
-
if @map.navigation
|
11
|
-
@name.disable
|
12
|
-
@creator.disable
|
13
|
-
@width.disable
|
14
|
-
@height.disable
|
15
|
-
else
|
16
|
-
@name.enable
|
17
|
-
@creator.enable
|
18
|
-
@width.enable
|
19
|
-
@height.enable
|
20
|
-
end
|
21
|
-
|
22
|
-
w = @width.text.to_i
|
23
|
-
h = @height.text.to_i
|
24
|
-
|
25
|
-
@map.update_title
|
26
|
-
|
27
|
-
if w != @map.width or h != @map.height
|
28
|
-
if w < @map.width or h < @map.height
|
29
|
-
rooms = []
|
30
|
-
@map.sections.each { |s|
|
31
|
-
s.rooms.each { |r|
|
32
|
-
if r.x >= w or r.y >= h
|
33
|
-
rooms << [s, r]
|
34
|
-
end
|
35
|
-
}
|
36
|
-
}
|
37
|
-
if not rooms.empty?
|
38
|
-
d = FXWarningBox.new(@map.window, WARN_MAP_SMALL)
|
39
|
-
if d.execute == 0
|
40
|
-
copy_from(@map)
|
41
|
-
return
|
42
|
-
end
|
43
|
-
rooms.each { |p|
|
44
|
-
p[0].delete_room(p[1])
|
45
|
-
}
|
46
|
-
end
|
47
|
-
end
|
48
|
-
@map.width = w
|
49
|
-
@map.height = h
|
50
|
-
@map.zoom = @map.zoom
|
51
|
-
@map.create_pathmap
|
52
|
-
@map.draw
|
53
|
-
end
|
54
|
-
|
55
|
-
end
|
56
|
-
|
57
|
-
def copy_from(map)
|
58
|
-
@name.text = map.name
|
59
|
-
@creator.text = map.creator
|
60
|
-
@read.checkState = map.navigation
|
61
|
-
@width.text = map.width.to_s
|
62
|
-
@height.text = map.height.to_s
|
63
|
-
if map.navigation
|
64
|
-
@name.disable
|
65
|
-
@creator.disable
|
66
|
-
@width.disable
|
67
|
-
@height.disable
|
68
|
-
else
|
69
|
-
@name.enable
|
70
|
-
@creator.enable
|
71
|
-
@width.enable
|
72
|
-
@height.enable
|
73
|
-
end
|
74
|
-
@map = map
|
75
|
-
end
|
76
|
-
|
77
|
-
def initialize(parent)
|
78
|
-
decor = DECOR_TITLE|DECOR_BORDER|DECOR_CLOSE
|
79
|
-
|
80
|
-
super( parent, BOX_MAP_INFORMATION, decor, 40, 40, 0, 0 )
|
81
|
-
mainFrame = FXVerticalFrame.new(self,
|
82
|
-
FRAME_SUNKEN|FRAME_THICK|
|
83
|
-
LAYOUT_FILL_X|LAYOUT_FILL_Y)
|
84
|
-
|
85
|
-
@read = FXCheckButton.new(mainFrame, BOX_MAP_READ_ONLY, nil, 0,
|
86
|
-
ICON_BEFORE_TEXT|LAYOUT_LEFT|LAYOUT_SIDE_TOP|
|
87
|
-
LAYOUT_SIDE_RIGHT)
|
88
|
-
|
89
|
-
frame = FXHorizontalFrame.new(mainFrame, LAYOUT_SIDE_TOP|LAYOUT_FILL_X)
|
90
|
-
|
91
|
-
FXLabel.new(frame, "#{BOX_NAME}:", nil, 0, LAYOUT_FILL_X)
|
92
|
-
@name = FXTextField.new(frame, 42, nil, 0, LAYOUT_FILL_ROW)
|
93
|
-
|
94
|
-
frame = FXHorizontalFrame.new(mainFrame,
|
95
|
-
LAYOUT_FILL_X|LAYOUT_FILL_Y)
|
96
|
-
|
97
|
-
FXLabel.new(frame, BOX_MAP_CREATOR, nil, 0, LAYOUT_FILL_X)
|
98
|
-
@creator = FXTextField.new(frame, 40, nil, 0, LAYOUT_FILL_ROW)
|
99
|
-
|
100
|
-
frame = FXHorizontalFrame.new(mainFrame,
|
101
|
-
LAYOUT_SIDE_TOP|FRAME_SUNKEN|
|
102
|
-
LAYOUT_FILL_X|LAYOUT_FILL_Y)
|
103
|
-
|
104
|
-
frame2 = FXVerticalFrame.new(frame,
|
105
|
-
LAYOUT_SIDE_TOP|LAYOUT_FILL_X|LAYOUT_FILL_Y )
|
106
|
-
FXLabel.new(frame2, BOX_MAP_WIDTH, nil, 0, LAYOUT_FILL_X)
|
107
|
-
@width = FXTextField.new( frame2, 6, nil, 0,
|
108
|
-
TEXTFIELD_INTEGER|LAYOUT_FILL_ROW)
|
109
|
-
|
110
|
-
frame2 = FXVerticalFrame.new(frame,
|
111
|
-
LAYOUT_SIDE_TOP|LAYOUT_FILL_X|LAYOUT_FILL_Y )
|
112
|
-
FXLabel.new(frame2, BOX_MAP_HEIGHT, nil, 0, LAYOUT_FILL_X)
|
113
|
-
@height = FXTextField.new( frame2, 6, nil, 0,
|
114
|
-
TEXTFIELD_INTEGER|LAYOUT_FILL_ROW)
|
115
|
-
|
116
|
-
@name.connect(SEL_CHANGED) { copy_to() }
|
117
|
-
@creator.connect(SEL_CHANGED) { copy_to() }
|
118
|
-
@read.connect(SEL_COMMAND) { copy_to() }
|
119
|
-
@width.connect(SEL_COMMAND) { copy_to() }
|
120
|
-
@height.connect(SEL_COMMAND) { copy_to() }
|
121
|
-
|
122
|
-
@parent = parent
|
123
|
-
|
124
|
-
# We need to create the dialog box first, so we can use select text.
|
125
|
-
create
|
126
|
-
end
|
127
|
-
end
|
1
|
+
|
2
|
+
|
3
|
+
class FXMapDialogBox < FXDialogBox
|
4
|
+
|
5
|
+
def copy_to()
|
6
|
+
@map.name = @name.text
|
7
|
+
@map.creator = @creator.text
|
8
|
+
@map.navigation = (@read.checkState == 1)
|
9
|
+
|
10
|
+
if @map.navigation
|
11
|
+
@name.disable
|
12
|
+
@creator.disable
|
13
|
+
@width.disable
|
14
|
+
@height.disable
|
15
|
+
else
|
16
|
+
@name.enable
|
17
|
+
@creator.enable
|
18
|
+
@width.enable
|
19
|
+
@height.enable
|
20
|
+
end
|
21
|
+
|
22
|
+
w = @width.text.to_i
|
23
|
+
h = @height.text.to_i
|
24
|
+
|
25
|
+
@map.update_title
|
26
|
+
|
27
|
+
if w != @map.width or h != @map.height
|
28
|
+
if w < @map.width or h < @map.height
|
29
|
+
rooms = []
|
30
|
+
@map.sections.each { |s|
|
31
|
+
s.rooms.each { |r|
|
32
|
+
if r.x >= w or r.y >= h
|
33
|
+
rooms << [s, r]
|
34
|
+
end
|
35
|
+
}
|
36
|
+
}
|
37
|
+
if not rooms.empty?
|
38
|
+
d = FXWarningBox.new(@map.window, WARN_MAP_SMALL)
|
39
|
+
if d.execute == 0
|
40
|
+
copy_from(@map)
|
41
|
+
return
|
42
|
+
end
|
43
|
+
rooms.each { |p|
|
44
|
+
p[0].delete_room(p[1])
|
45
|
+
}
|
46
|
+
end
|
47
|
+
end
|
48
|
+
@map.width = w
|
49
|
+
@map.height = h
|
50
|
+
@map.zoom = @map.zoom
|
51
|
+
@map.create_pathmap
|
52
|
+
@map.draw
|
53
|
+
end
|
54
|
+
|
55
|
+
end
|
56
|
+
|
57
|
+
def copy_from(map)
|
58
|
+
@name.text = map.name
|
59
|
+
@creator.text = map.creator
|
60
|
+
@read.checkState = map.navigation
|
61
|
+
@width.text = map.width.to_s
|
62
|
+
@height.text = map.height.to_s
|
63
|
+
if map.navigation
|
64
|
+
@name.disable
|
65
|
+
@creator.disable
|
66
|
+
@width.disable
|
67
|
+
@height.disable
|
68
|
+
else
|
69
|
+
@name.enable
|
70
|
+
@creator.enable
|
71
|
+
@width.enable
|
72
|
+
@height.enable
|
73
|
+
end
|
74
|
+
@map = map
|
75
|
+
end
|
76
|
+
|
77
|
+
def initialize(parent)
|
78
|
+
decor = DECOR_TITLE|DECOR_BORDER|DECOR_CLOSE
|
79
|
+
|
80
|
+
super( parent, BOX_MAP_INFORMATION, decor, 40, 40, 0, 0 )
|
81
|
+
mainFrame = FXVerticalFrame.new(self,
|
82
|
+
FRAME_SUNKEN|FRAME_THICK|
|
83
|
+
LAYOUT_FILL_X|LAYOUT_FILL_Y)
|
84
|
+
|
85
|
+
@read = FXCheckButton.new(mainFrame, BOX_MAP_READ_ONLY, nil, 0,
|
86
|
+
ICON_BEFORE_TEXT|LAYOUT_LEFT|LAYOUT_SIDE_TOP|
|
87
|
+
LAYOUT_SIDE_RIGHT)
|
88
|
+
|
89
|
+
frame = FXHorizontalFrame.new(mainFrame, LAYOUT_SIDE_TOP|LAYOUT_FILL_X)
|
90
|
+
|
91
|
+
FXLabel.new(frame, "#{BOX_NAME}:", nil, 0, LAYOUT_FILL_X)
|
92
|
+
@name = FXTextField.new(frame, 42, nil, 0, LAYOUT_FILL_ROW)
|
93
|
+
|
94
|
+
frame = FXHorizontalFrame.new(mainFrame,
|
95
|
+
LAYOUT_FILL_X|LAYOUT_FILL_Y)
|
96
|
+
|
97
|
+
FXLabel.new(frame, BOX_MAP_CREATOR, nil, 0, LAYOUT_FILL_X)
|
98
|
+
@creator = FXTextField.new(frame, 40, nil, 0, LAYOUT_FILL_ROW)
|
99
|
+
|
100
|
+
frame = FXHorizontalFrame.new(mainFrame,
|
101
|
+
LAYOUT_SIDE_TOP|FRAME_SUNKEN|
|
102
|
+
LAYOUT_FILL_X|LAYOUT_FILL_Y)
|
103
|
+
|
104
|
+
frame2 = FXVerticalFrame.new(frame,
|
105
|
+
LAYOUT_SIDE_TOP|LAYOUT_FILL_X|LAYOUT_FILL_Y )
|
106
|
+
FXLabel.new(frame2, BOX_MAP_WIDTH, nil, 0, LAYOUT_FILL_X)
|
107
|
+
@width = FXTextField.new( frame2, 6, nil, 0,
|
108
|
+
TEXTFIELD_INTEGER|LAYOUT_FILL_ROW)
|
109
|
+
|
110
|
+
frame2 = FXVerticalFrame.new(frame,
|
111
|
+
LAYOUT_SIDE_TOP|LAYOUT_FILL_X|LAYOUT_FILL_Y )
|
112
|
+
FXLabel.new(frame2, BOX_MAP_HEIGHT, nil, 0, LAYOUT_FILL_X)
|
113
|
+
@height = FXTextField.new( frame2, 6, nil, 0,
|
114
|
+
TEXTFIELD_INTEGER|LAYOUT_FILL_ROW)
|
115
|
+
|
116
|
+
@name.connect(SEL_CHANGED) { copy_to() }
|
117
|
+
@creator.connect(SEL_CHANGED) { copy_to() }
|
118
|
+
@read.connect(SEL_COMMAND) { copy_to() }
|
119
|
+
@width.connect(SEL_COMMAND) { copy_to() }
|
120
|
+
@height.connect(SEL_COMMAND) { copy_to() }
|
121
|
+
|
122
|
+
@parent = parent
|
123
|
+
|
124
|
+
# We need to create the dialog box first, so we can use select text.
|
125
|
+
create
|
126
|
+
end
|
127
|
+
end
|
@@ -1,34 +1,34 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
#
|
4
|
-
# A simple class to show a filerequester that remembers the
|
5
|
-
# last directory visited.
|
6
|
-
#
|
7
|
-
class FXMapFileDialog < FXFileDialog
|
8
|
-
@@last_path = nil
|
9
|
-
|
10
|
-
KNOWN_LOAD_EXTENSIONS = [
|
11
|
-
"#{EXT_MAP_FILES} (*.map,*.gmp,*.ifm,*.inf,*.t,*.t3m)",
|
12
|
-
EXT_ALL_FILES,
|
13
|
-
]
|
14
|
-
|
15
|
-
KNOWN_SAVE_EXTENSIONS = [
|
16
|
-
"#{EXT_MAP_FILES} (*.map,*.gmp,*.ifm,*.inf,*.inform,*.t,*.t3m)",
|
17
|
-
EXT_ALL_FILES,
|
18
|
-
]
|
19
|
-
|
20
|
-
|
21
|
-
def initialize(parent, title, patterns = KNOWN_LOAD_EXTENSIONS)
|
22
|
-
opts = 0
|
23
|
-
if RUBY_PLATFORM =~ /mswin/
|
24
|
-
opts |= FILEMATCH_NOESCAPE
|
25
|
-
end
|
26
|
-
super(parent, title, opts)
|
27
|
-
setPatternList(patterns)
|
28
|
-
self.directory = @@last_path if @@last_path
|
29
|
-
if execute != 0
|
30
|
-
@@last_path = filename.sub(/[\\\/][^\\\/]+$/, '')
|
31
|
-
end
|
32
|
-
end
|
33
|
-
end
|
34
|
-
|
1
|
+
|
2
|
+
|
3
|
+
#
|
4
|
+
# A simple class to show a filerequester that remembers the
|
5
|
+
# last directory visited.
|
6
|
+
#
|
7
|
+
class FXMapFileDialog < FXFileDialog
|
8
|
+
@@last_path = nil
|
9
|
+
|
10
|
+
KNOWN_LOAD_EXTENSIONS = [
|
11
|
+
"#{EXT_MAP_FILES} (*.map,*.gmp,*.ifm,*.inf,*.t,*.t3m)",
|
12
|
+
EXT_ALL_FILES,
|
13
|
+
]
|
14
|
+
|
15
|
+
KNOWN_SAVE_EXTENSIONS = [
|
16
|
+
"#{EXT_MAP_FILES} (*.map,*.gmp,*.ifm,*.inf,*.inform,*.t,*.t3m)",
|
17
|
+
EXT_ALL_FILES,
|
18
|
+
]
|
19
|
+
|
20
|
+
|
21
|
+
def initialize(parent, title, patterns = KNOWN_LOAD_EXTENSIONS)
|
22
|
+
opts = 0
|
23
|
+
if RUBY_PLATFORM =~ /mswin/
|
24
|
+
opts |= FILEMATCH_NOESCAPE
|
25
|
+
end
|
26
|
+
super(parent, title, opts)
|
27
|
+
setPatternList(patterns)
|
28
|
+
self.directory = @@last_path if @@last_path
|
29
|
+
if execute != 0
|
30
|
+
@@last_path = filename.sub(/[\\\/][^\\\/]+$/, '')
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|