- -- Add choice buttons
- local choices = self.message.choices
- self.choice_buttons = {}
- local orig_y = 175
- if choices then
- for i = 1, #choices do
- local y = orig_y + ((i-1) + (3-#choices)) * 48
- local choice = choices[i].choice
- local additionalInfo = choices[i].additionalInfo
- -- NB: both nil and true result in enabled; also handle old "disabled" choice
- local enabled = (choices[i].enabled ~= false) and (choice ~= "disabled")
- local --[[persistable:fax_choice_button]] function callback()
- self:choice(choice,additionalInfo)
- end
- self.choice_buttons[i] = self:addPanel(17, 492, y):makeButton(0, 0, 43, 43, 18, callback)
- :setDisabledSprite(19):enable(enabled)
- end
- end