class TranscriptDialogBox < FXDialogBox LOCATION_TEXT = [ " West of House You are standing in an open field west of a white house, with a boarded front door. ", " (You are now in the driveway.) (You're sitting in the sports car.) You are by the front gate of the Tresyllian Castle. You can hear the ocean beating urgently against the rocks far below. ", " You are now in the driveway entrance. You are standing at the foot of the driveway, the entrance to the Linder property. The entire lot is screened from the street and the neighbors by a wooden fence, except on the east side, which fronts on dense bamboo woods. ", ] LOCATION2_TEXT = [ " West of House ", " (You are in the driveway.) ", " (driveway entrance) ", ] IDENTIFY_TYPE = [ 'By Descriptions', 'By Short Name', ] SHORTNAME_TYPE = [ 'Classic', 'Moonmist Style', 'Witness Style', ] def copy_from(transcript) @transcript = transcript @type.currentNo = transcript.identify @short.currentNo = transcript.shortName @show.text = LOCATION_TEXT[@short.currentNo] @show2.text = LOCATION2_TEXT[@short.currentNo] parent = transcript.map.window end def copy_to() @transcript.identify = @type.currentNo @transcript.shortName = @short.currentNo @show.text = LOCATION_TEXT[@short.currentNo] @show2.text = LOCATION2_TEXT[@short.currentNo] end def initialize(transcript) map = transcript.map pos = [40, 40] maxW = map.window.width - 390 maxH = map.window.height - 300 pos[0] = maxW if pos[0] > maxW pos[1] = maxH if pos[1] > maxH decor = DECOR_TITLE|DECOR_BORDER|DECOR_CLOSE super( map.window, 'Transcript Options', decor, pos[0], pos[1], 0, 0 ) mainFrame = FXVerticalFrame.new(self, FRAME_SUNKEN|FRAME_THICK| LAYOUT_FILL_X|LAYOUT_FILL_Y) frame = FXHorizontalFrame.new(mainFrame, LAYOUT_SIDE_TOP|LAYOUT_FILL_X) FXLabel.new(frame, "Identify Locations: ", nil, 0, LAYOUT_FILL_X) pane = FXPopup.new(self) IDENTIFY_TYPE.each { |t| FXOption.new(pane, t, nil, nil, 0, JUSTIFY_HZ_APART|ICON_AFTER_TEXT) } @type = FXOptionMenu.new(frame, pane, FRAME_RAISED|FRAME_THICK| JUSTIFY_HZ_APART|ICON_AFTER_TEXT| LAYOUT_CENTER_X|LAYOUT_CENTER_Y) frame = FXHorizontalFrame.new(mainFrame, LAYOUT_SIDE_TOP|LAYOUT_FILL_X) FXLabel.new(frame, "Short Name Type: ", nil, 0, LAYOUT_FILL_X) pane = FXPopup.new(self) SHORTNAME_TYPE.each { |t| FXOption.new(pane, t, nil, nil, 0, JUSTIFY_HZ_APART|ICON_AFTER_TEXT) } @short = FXOptionMenu.new(frame, pane, FRAME_RAISED|FRAME_THICK| JUSTIFY_HZ_APART|ICON_AFTER_TEXT| LAYOUT_CENTER_X|LAYOUT_CENTER_Y) frame = FXVerticalFrame.new(mainFrame, LAYOUT_SIDE_TOP|LAYOUT_FILL_X) FXLabel.new(frame, "Sample Verbose Mode: ", nil, 0, LAYOUT_FILL_X) @show = FXText.new(frame, nil, 0, LAYOUT_FILL_X|LAYOUT_FILL_Y) @show.visibleRows = 7 @show.visibleColumns = 60 @show.disable FXLabel.new(frame, "Sample Brief Mode: ", nil, 0, LAYOUT_FILL_X) @show2 = FXText.new(frame, nil, 0, LAYOUT_FILL_X|LAYOUT_FILL_Y) @show2.visibleRows = 3 @show2.visibleColumns = 60 @show2.disable @type.connect(SEL_COMMAND) { copy_to } @short.connect(SEL_COMMAND) { copy_to } copy_from(transcript) end end