/traderous

To get this branch, use:
bzr branch http://9ix.org/bzr/traderous

« back to all changes in this revision

Viewing changes to trade_view.lua

  • Committer: Josh C
  • Date: 2013-06-16 03:28:16 UTC
  • Revision ID: josh@9ix.org-20130616032816-wue00cdqvlqr3rre
give planets sami-random goods at semi-random prices

Show diffs side-by-side

added added

removed removed

Lines of Context:
139
139
              }
140
140
              self:add(self.playerMoney)
141
141
 
142
 
              self.availSpace = Text:new{
143
 
                 text = 'Available cargo space: ',
144
 
                 width = 200,
145
 
                 x = boxL + 10,
146
 
                 y = boxB - 2 * th - 12
147
 
              }
148
 
              self:add(self.availSpace)
149
 
 
150
142
              -- give the buttons a cycle to get out of the T/L corner
151
143
              self:update(0)
152
144
           end,
154
146
                 the.cursor.visible = false
155
147
                 love.mouse.setVisible(true)
156
148
                 love.mouse.setGrab(false)
157
 
                 love.mouse.setPosition(the.app.width / 2, the.app.height / 2)
158
149
 
159
150
                 Subview.activate(self)
160
151
              end,
162
153
              the.cursor.visible = true
163
154
              love.mouse.setVisible(false)
164
155
              love.mouse.setGrab(true)
165
 
              love.mouse.setPosition(the.app.width / 2, the.app.height / 2)
166
156
 
167
157
              self:deactivate()
168
158
           end,
172
162
                 end
173
163
 
174
164
                 self.playerMoney.text = 'Your money: ' .. the.player.money
175
 
                 self.availSpace.text = 'Available cargo space: ' .. the.player:availableSpace()
176
165
 
177
166
                 for good, have in pairs(self.have) do
178
167
                    have.text = the.player.goods[good] or 0