/traderous

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

« back to all changes in this revision

Viewing changes to main.lua

  • Committer: Josh C
  • Date: 2013-06-11 00:15:54 UTC
  • Revision ID: josh@9ix.org-20130611001554-tkzp73ke16buhnuy
bring indicators a little closer from edge

Show diffs side-by-side

added added

removed removed

Lines of Context:
245
245
                       planet.indicator.visible = true
246
246
 
247
247
                       if math.abs(pvec.x) / math.abs(pvec.y) > the.app.width / the.app.height then
248
 
                          indx = the.app.width / 2 * util.signOf(pvec.x) + 8
249
 
                          indy = the.app.width / 2 * pvec.y / math.abs(pvec.x)
 
248
                          indx = (the.app.width / 2 - 10) * util.signOf(pvec.x) + 8
 
249
                          indy = (the.app.width / 2 - 10) * pvec.y / math.abs(pvec.x)
250
250
                       else
251
 
                          indy = the.app.height / 2 * util.signOf(pvec.y) + 8
252
 
                          indx = the.app.height / 2 * pvec.x / math.abs(pvec.y)
 
251
                          indy = (the.app.height / 2 - 10) * util.signOf(pvec.y) + 8
 
252
                          indx = (the.app.height / 2 - 10) * pvec.x / math.abs(pvec.y)
253
253
                       end
254
254
 
255
255
                       planet.indicator.x = the.player.x + indx