~kalon33/corsix-th/master

« back to all changes in this revision

Viewing changes to CorsixTH/Lua/dialogs/message.lua

  • Committer: corsixth.bot at gmail
  • Date: 2014-03-31 23:30:23 UTC
  • Revision ID: svn-v4:c39591fa-788f-11de-a72b-d90af8dea425:trunk:2687
Remove trailing whitespaces in .h, .cpp, .c and .lua files.

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
 
24
24
function UIMessage:UIMessage(ui, x, stop_x, onClose, type, message, owner, timeout, default_choice, callback)
25
25
  self:Window()
26
 
  
 
26
 
27
27
  local app = ui.app
28
28
  ui:playSound("NewFax.wav")
29
 
  
 
29
 
30
30
  self.esc_closes = false
31
31
  self.on_top = false
32
32
  self.onClose = onClose
57
57
  self.y = 4
58
58
  self.panel_sprites = app.gfx:loadSpriteTable("Data", "Panel02V", true)
59
59
  self.type = type
60
 
  
 
60
 
61
61
  local types = { emergency = 43, epidemy = 45, strike = 47, personality = 49, information = 51, disease = 53, report = 55 }
62
62
  local type = types[type]
63
 
  
 
63
 
64
64
  self.can_dismiss = self.type ~= "strike" and #self.message.choices == 1
65
 
  
 
65
 
66
66
  self.button = self:addPanel(type, 0, 0)
67
67
    :setTooltip(self.can_dismiss and _S.tooltip.message.button_dismiss or _S.tooltip.message.button) -- FIXME: tooltip doesn't work very well here
68
68
    :makeToggleButton(0, 0, 30, 28, type + 1, self.openMessage, nil, self.dismissMessage)