ifmapper 1.1.1 → 1.1.2

Sign up to get free protection for your applications and to get access to all the features.
data/HISTORY.txt CHANGED
@@ -1,3 +1,9 @@
1
+ v1.1.2 Improvements:
2
+ - Made room box use tabs for comments, descriptions and objects.
3
+ - Made dark rooms select as orange.
4
+ - Added support for dark rooms and descriptions in
5
+ TrizbortReader/Writer.
6
+
1
7
  v1.1.1 Improvements:
2
8
  - Added support for Trizbort maps for reading and writing.
3
9
  - Made failed connections turn cyan upon selection.
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.1'
5
+ spec.version = '1.1.2'
6
6
  spec.author = "Gonzalo Garramuno"
7
7
  spec.email = 'ggarra13@gmail.com'
8
8
  spec.homepage = 'http://www.rubyforge.org/projects/ifmapper/'
@@ -181,7 +181,7 @@ class FXMapperSettings < Hash
181
181
 
182
182
  # Location options
183
183
  'Location Tasks' => true,
184
- 'Location Description' => false,
184
+ 'Location Description' => true,
185
185
  'Location Numbers' => true,
186
186
 
187
187
  # Grid options
@@ -46,7 +46,7 @@ require 'IFMapper/FXWarningBox'
46
46
  class FXMapperWindow < FXMainWindow
47
47
 
48
48
  PROGRAM_NAME = "Interactive Fiction Mapper"
49
- VERSION = '1.1.1'
49
+ VERSION = '1.1.2'
50
50
  AUTHOR = "Gonzalo Garramuño"
51
51
 
52
52
  @@copy_buffer = nil
@@ -180,6 +180,9 @@ class FXRoom < Room
180
180
  def draw_box(dc, zoom, idx, opt)
181
181
  if @selected
182
182
  dc.foreground = 'yellow'
183
+ if @darkness
184
+ dc.foreground = 'orange'
185
+ end
183
186
  else
184
187
  if @darkness
185
188
  dc.foreground = opt['Box Darkness Color']
@@ -108,35 +108,34 @@ class FXRoomDialogBox < FXDialogBox
108
108
  LAYOUT_SIDE_TOP|LAYOUT_SIDE_LEFT|
109
109
  LAYOUT_FILL_X|LAYOUT_FILL_Y)
110
110
 
111
- frame2 = FXHorizontalFrame.new(leftFrame, LAYOUT_SIDE_TOP|LAYOUT_FILL_X)
112
- FXLabel.new(frame2, BOX_OBJECTS, nil, 0, LAYOUT_FILL_X)
113
- @darkness = FXCheckButton.new(frame2, BOX_DARKNESS, nil, 0,
114
- ICON_BEFORE_TEXT|LAYOUT_CENTER_X|
111
+ @darkness = FXCheckButton.new(leftFrame, BOX_DARKNESS, nil, 0,
112
+ ICON_BEFORE_TEXT|LAYOUT_LEFT|
115
113
  LAYOUT_SIDE_RIGHT)
116
-
117
- @objects = FXText.new(leftFrame, nil, 0, LAYOUT_FILL_X|LAYOUT_FILL_Y)
114
+ @tab = FXTabBook.new(leftFrame, :opts => LAYOUT_FILL_X|LAYOUT_FILL_Y|
115
+ LAYOUT_LEFT)
116
+
117
+ FXTabItem.new(@tab, BOX_OBJECTS, nil, 0, LAYOUT_FILL_X)
118
+ boxFrame = FXHorizontalFrame.new(@tab, FRAME_THICK|FRAME_RAISED)
119
+ @objects = FXText.new(boxFrame, nil, 0, LAYOUT_FILL_X|LAYOUT_FILL_Y)
118
120
  @objects.visibleRows = 8
119
121
  @objects.visibleColumns = 40
120
122
 
121
- @tasksFrame = FXVerticalFrame.new(leftFrame, LAYOUT_SIDE_TOP|LAYOUT_FILL_X|
122
- LAYOUT_FILL_Y)
123
- FXLabel.new(@tasksFrame, BOX_TASKS, nil, 0, LAYOUT_FILL_X)
123
+ FXTabItem.new(@tab, BOX_TASKS, nil)
124
+ @tasksFrame = FXHorizontalFrame.new(@tab, FRAME_THICK|FRAME_RAISED)
124
125
  @tasks = FXText.new(@tasksFrame, nil, 0, LAYOUT_FILL_X|LAYOUT_FILL_Y)
125
126
  @tasks.visibleRows = 8
126
127
  @tasks.visibleColumns = 40
127
128
 
128
- @commentFrame = FXVerticalFrame.new(leftFrame, LAYOUT_SIDE_TOP|
129
- LAYOUT_FILL_X|LAYOUT_FILL_Y)
130
- FXLabel.new(@commentFrame, BOX_COMMENTS, nil, 0, LAYOUT_FILL_X)
129
+ FXTabItem.new(@tab, BOX_COMMENTS, nil)
130
+ @commentFrame = FXHorizontalFrame.new(@tab, FRAME_THICK|FRAME_RAISED)
131
131
  @comment = FXText.new(@commentFrame, nil, 0, LAYOUT_FILL_X|LAYOUT_FILL_Y)
132
132
  @comment.visibleRows = 8
133
133
  @comment.visibleColumns = 40
134
134
 
135
135
  ######## Add description
136
- @descFrame = FXVerticalFrame.new(all, LAYOUT_SIDE_TOP|LAYOUT_FILL_X|
137
- LAYOUT_SIDE_RIGHT|LAYOUT_FILL_Y)
138
- FXLabel.new(@descFrame, BOX_DESCRIPTION, nil, 0, LAYOUT_FILL_X)
139
- @desc = FXText.new(@descFrame, nil, 0,
136
+ @descFrame = FXTabItem.new(@tab, BOX_DESCRIPTION, nil)
137
+ frame = FXVerticalFrame.new(@tab, FRAME_THICK|FRAME_RAISED)
138
+ @desc = FXText.new(frame, nil, 0,
140
139
  LAYOUT_FILL_X|LAYOUT_FILL_Y|TEXT_WORDWRAP)
141
140
  @desc.visibleColumns = 70
142
141
  @desc.visibleRows = 18
@@ -81,6 +81,12 @@ class TrizbortReader
81
81
  h = e.attributes['h'].to_i
82
82
  r = @map.new_room(x, y)
83
83
  r.name = name
84
+ darkness = e.attributes['isDark']
85
+ if darkness == 'yes'
86
+ r.darkness = true
87
+ end
88
+ desc = e.attributes['description']
89
+ r.desc = desc
84
90
  rooms[id] = r
85
91
  e.elements.each('objects') { |o|
86
92
  r.objects = o.text.to_s.gsub('|',"\n")
@@ -28,7 +28,7 @@ class TrizbortWriter
28
28
 
29
29
  def write_objects( room )
30
30
  if room.objects
31
- @f.print "\t\t\ŧ<objects>"
31
+ @f.print "\t\t\t<objects>"
32
32
  room.objects.split("\n").each_with_index { |obj,idx|
33
33
  if idx > 0
34
34
  @f.print "|"
@@ -49,7 +49,14 @@ class TrizbortWriter
49
49
  id = 0
50
50
  @map.sections.each { |s|
51
51
  s.rooms.each { |r|
52
- @f.puts "\t\t<room id=\"#{id}\" name=\"#{r.name}\" x=\"#{x + r.x*(W+32)}\" y=\"#{y + r.y*(H+32)}\" w=\"#{W}\" h=\"#{H}\">"
52
+ @f.puts "\t\t<room id=\"#{id}\" name=\"#{r.name}\" x=\"#{x + r.x*(W+32)}\" y=\"#{y + r.y*(H+32)}\" w=\"#{W}\" h=\"#{H}\""
53
+ if r.darkness
54
+ @f.puts " isDark=\"yes\""
55
+ end
56
+ if r.desc
57
+ @f.puts " description=\"#{r.desc}\""
58
+ end
59
+ @f.puts ">"
53
60
  write_objects r
54
61
  @f.puts "\t\t</room>"
55
62
  hash[r] = id
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ifmapper
3
3
  version: !ruby/object:Gem::Version
4
- hash: 17
4
+ hash: 23
5
5
  prerelease: false
6
6
  segments:
7
7
  - 1
8
8
  - 1
9
- - 1
10
- version: 1.1.1
9
+ - 2
10
+ version: 1.1.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Gonzalo Garramuno
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-06-03 00:00:00 -03:00
18
+ date: 2011-06-06 00:00:00 -03:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency