/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-23 02:52:56 UTC
  • Revision ID: josh@9ix.org-20130623025256-o80jq1o3hy8dw7lh
available cargo space

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
 
142
150
              -- give the buttons a cycle to get out of the T/L corner
143
151
              self:update(0)
144
152
           end,
146
154
                 the.cursor.visible = false
147
155
                 love.mouse.setVisible(true)
148
156
                 love.mouse.setGrab(false)
 
157
                 love.mouse.setPosition(the.app.width / 2, the.app.height / 2)
149
158
 
150
159
                 Subview.activate(self)
151
160
              end,
153
162
              the.cursor.visible = true
154
163
              love.mouse.setVisible(false)
155
164
              love.mouse.setGrab(true)
 
165
              love.mouse.setPosition(the.app.width / 2, the.app.height / 2)
156
166
 
157
167
              self:deactivate()
158
168
           end,
162
172
                 end
163
173
 
164
174
                 self.playerMoney.text = 'Your money: ' .. the.player.money
 
175
                 self.availSpace.text = 'Available cargo space: ' .. the.player:availableSpace()
165
176
 
166
177
                 for good, have in pairs(self.have) do
167
178
                    have.text = the.player.goods[good] or 0