Ignore:
Timestamp:
09/02/13 14:40:56 (8 years ago)
Author:
Neil Muller <drnlmuller@…>
Branch:
default
Phase:
public
Message:

Use dialogs to report save results

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tools/area_editor.py

    r117 r122  
    2121from albow.widget import Widget
    2222from albow.controls import Button
     23from albow.dialogs import alert
    2324
    2425sys.path.append(os.path.join(os.path.dirname(__file__), '..'))
     
    261262
    262263    def save(self):
    263         level.save()
     264        closed, messages = self.level.all_closed()
     265        if closed:
     266            self.level.save()
     267            # display success
     268            alert("Level %s saved successfully." % self.level.name)
     269        else:
     270            # display errors
     271            alert("Failed to save level.\n\n%s" % '\n'.join(messages))
    264272
    265273    def mouse_move(self, ev):
Note: See TracChangeset for help on using the changeset viewer.