IJItemPropertiesViewController.m 739 B

123456789101112131415161718192021222324252627282930313233343536
  1. //
  2. // IJItemPropertiesViewController.m
  3. // InsideJob
  4. //
  5. // Created by Adam Preble on 10/9/10.
  6. // Copyright 2010 Adam Preble. All rights reserved.
  7. //
  8. #import "IJItemPropertiesViewController.h"
  9. #import "IJInventoryItem.h"
  10. @implementation IJItemPropertiesViewController
  11. @synthesize item;
  12. - (IBAction)closeButton:(id)sender
  13. {
  14. [self.view.window.parentWindow makeKeyWindow];
  15. [self commitEditing];
  16. self.item = nil; // Hack to prevent this item as coming up as 'lastItem' if they click again.
  17. }
  18. - (IBAction)makeIndestructible:(id)sender
  19. {
  20. if ([checkIndestructible state] == NSOnState) {
  21. self.item.damage = -1000;
  22. }else {
  23. self.item.damage = 0;
  24. }
  25. }
  26. - (void)setState:(bool)enabel{
  27. [checkIndestructible setState:enabel];
  28. }
  29. @end