--- a/hedgewars/PascalExports.pas Sat Sep 25 23:01:52 2010 +0400
+++ b/hedgewars/PascalExports.pas Sun Sep 26 03:41:30 2010 +0200
@@ -165,11 +165,6 @@
if closeFrontend then alsoShutdownFrontend:= true;
end;
-procedure HW_dismissReady; cdecl; export;
-begin
- ReadyTimeLeft:= 0;
-end;
-
procedure HW_setLandscape(landscape: boolean); cdecl; export;
begin
if landscape then
--- a/hedgewars/SDLh.pas Sat Sep 25 23:01:52 2010 +0400
+++ b/hedgewars/SDLh.pas Sun Sep 26 03:41:30 2010 +0200
@@ -848,6 +848,8 @@
procedure startSpinning; cdecl; external;
procedure stopSpinning; cdecl; external;
function isPhone: Boolean; cdecl; external;
+procedure replayBegan; cdecl; external;
+procedure replayFinished; cdecl; external;
{$ENDIF}
implementation
--- a/hedgewars/hwengine.pas Sat Sep 25 23:01:52 2010 +0400
+++ b/hedgewars/hwengine.pas Sun Sep 26 03:41:30 2010 +0200
@@ -266,10 +266,6 @@
ControllerInit(); // has to happen before InitKbdKeyTable to map keys
InitKbdKeyTable();
- if recordFileName = '' then
- InitIPC;
- WriteLnToConsole(msgGettingConfig);
-
LoadLocale(Pathz[ptLocale] + '/en.txt'); // Do an initial load with english
if cLocaleFName <> 'en.txt' then
begin
@@ -279,10 +275,19 @@
LoadLocale(Pathz[ptLocale] + '/' + cLocaleFName);
end;
+ WriteLnToConsole(msgGettingConfig);
if recordFileName = '' then
- SendIPCAndWaitReply('C') // ask for game config
+ begin
+ InitIPC;
+ SendIPCAndWaitReply('C'); // ask for game config
+ end
else
+ begin
LoadRecordFromFile(recordFileName);
+{$IFDEF IPHONEOS}
+ replayBegan();
+{$ENDIF}
+ end;
ScriptOnGameInit;
--- a/hedgewars/uGame.pas Sat Sep 25 23:01:52 2010 +0400
+++ b/hedgewars/uGame.pas Sun Sep 26 03:41:30 2010 +0200
@@ -26,7 +26,7 @@
////////////////////
implementation
////////////////////
-uses uMisc, uConsts, uKeys, uTeams, uIO, uAI, uGears, uScript;
+uses uMisc, uConsts, uKeys, uTeams, uIO, uAI, uGears, uScript, uSound, SDLh;
procedure DoGameTick(Lag: LongInt);
var i: LongInt;
@@ -65,7 +65,12 @@
SetBinds(CurrentTeam^.Binds);
//CurrentHedgehog^.Gear^.Message:= 0; <- produces bugs with further save restoring and demos
isSoundEnabled:= isSEBackup;
- GameType:= gmtLocal
+ if isSoundEnabled then playMusic;
+ GameType:= gmtLocal;
+ InitIPC;
+{$IFDEF IPHONEOS}
+ replayFinished();
+{$ENDIF}
end;
end
else ProcessGears
--- a/project_files/HedgewarsMobile/Classes/AboutViewController.xib Sat Sep 25 23:01:52 2010 +0400
+++ b/project_files/HedgewarsMobile/Classes/AboutViewController.xib Sun Sep 26 03:41:30 2010 +0200
@@ -12,7 +12,6 @@
</object>
<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
<bool key="EncodedWithXMLCoder">YES</bool>
- <integer value="2"/>
</object>
<object class="NSArray" key="IBDocument.PluginDependencies">
<bool key="EncodedWithXMLCoder">YES</bool>
@@ -50,8 +49,9 @@
<object class="IBUISegmentedControl" id="674364401">
<reference key="NSNextResponder" ref="241300702"/>
<int key="NSvFlags">292</int>
- <string key="NSFrame">{{70, 7}, {289, 30}}</string>
+ <string key="NSFrame">{{127, 7}, {289, 30}}</string>
<reference key="NSSuperview" ref="241300702"/>
+ <reference key="NSWindow"/>
<bool key="IBUIOpaque">NO</bool>
<string key="targetRuntimeIdentifier">IBIPadFramework</string>
<int key="IBSegmentControlStyle">2</int>
@@ -99,8 +99,9 @@
</object>
</object>
</object>
- <string key="NSFrameSize">{429, 44}</string>
+ <string key="NSFrameSize">{543, 44}</string>
<reference key="NSSuperview" ref="766721923"/>
+ <reference key="NSWindow"/>
<string key="targetRuntimeIdentifier">IBIPadFramework</string>
<object class="NSArray" key="IBUIItems">
<bool key="EncodedWithXMLCoder">YES</bool>
@@ -120,8 +121,9 @@
<object class="IBUIImageView" id="326158270">
<reference key="NSNextResponder" ref="766721923"/>
<int key="NSvFlags">274</int>
- <string key="NSFrame">{{0, 44}, {429, 433}}</string>
+ <string key="NSFrame">{{0, 44}, {543, 577}}</string>
<reference key="NSSuperview" ref="766721923"/>
+ <reference key="NSWindow"/>
<bool key="IBUIUserInteractionEnabled">NO</bool>
<string key="targetRuntimeIdentifier">IBIPadFramework</string>
<object class="NSCustomResource" key="IBUIImage">
@@ -132,8 +134,9 @@
<object class="IBUITableView" id="411460868">
<reference key="NSNextResponder" ref="766721923"/>
<int key="NSvFlags">274</int>
- <string key="NSFrame">{{0, 44}, {429, 433}}</string>
+ <string key="NSFrame">{{0, 44}, {543, 577}}</string>
<reference key="NSSuperview" ref="766721923"/>
+ <reference key="NSWindow"/>
<object class="NSColor" key="IBUIBackgroundColor">
<int key="NSColorSpace">1</int>
<bytes key="NSRGB">MCAwIDAgMAA</bytes>
@@ -150,8 +153,9 @@
<float key="IBUISectionFooterHeight">10</float>
</object>
</object>
- <string key="NSFrameSize">{429, 477}</string>
+ <string key="NSFrameSize">{543, 621}</string>
<reference key="NSSuperview"/>
+ <reference key="NSWindow"/>
<object class="NSColor" key="IBUIBackgroundColor">
<int key="NSColorSpace">3</int>
<bytes key="NSWhite">MQA</bytes>
@@ -318,7 +322,7 @@
<string>UIResponder</string>
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
- <string>{{505, 182}, {429, 477}}</string>
+ <string>{{376, 170}, {543, 621}}</string>
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
@@ -685,7 +689,7 @@
<int key="IBDocument.defaultPropertyAccessControl">3</int>
<object class="NSMutableDictionary" key="IBDocument.LastKnownImageSizes">
<string key="NS.key.0">background_small.png</string>
- <string key="NS.object.0">{320, 436}</string>
+ <string key="NS.object.0">{539, 639}</string>
</object>
<string key="IBCocoaTouchPluginVersion">117</string>
</data>
--- a/project_files/HedgewarsMobile/Classes/EditableCellView.h Sat Sep 25 23:01:52 2010 +0400
+++ b/project_files/HedgewarsMobile/Classes/EditableCellView.h Sun Sep 26 03:41:30 2010 +0200
@@ -33,6 +33,7 @@
UILabel *titleLabel;
NSInteger minimumCharacters;
NSInteger maximumCharacters;
+ BOOL respectEditing;
@private
NSString *oldValue;
@@ -43,6 +44,7 @@
@property (nonatomic,retain,readonly) UILabel *titleLabel;
@property (nonatomic,assign) NSInteger minimumCharacters;
@property (nonatomic,assign) NSInteger maximumCharacters;
+@property (nonatomic,assign) BOOL respectEditing;
@property (nonatomic,retain) NSString *oldValue;
-(void) replyKeyboard;
--- a/project_files/HedgewarsMobile/Classes/EditableCellView.m Sat Sep 25 23:01:52 2010 +0400
+++ b/project_files/HedgewarsMobile/Classes/EditableCellView.m Sun Sep 26 03:41:30 2010 +0200
@@ -23,7 +23,7 @@
#import "CommodityFunctions.h"
@implementation EditableCellView
-@synthesize delegate, textField, titleLabel, minimumCharacters, maximumCharacters, oldValue;
+@synthesize delegate, textField, titleLabel, minimumCharacters, maximumCharacters, respectEditing, oldValue;
-(id) initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
if ((self = [super initWithStyle:style reuseIdentifier:reuseIdentifier])) {
@@ -37,6 +37,7 @@
textField.clearsOnBeginEditing = NO;
textField.returnKeyType = UIReturnKeyDone;
textField.adjustsFontSizeToFitWidth = YES;
+ textField.userInteractionEnabled = YES;
[textField addTarget:self action:@selector(save:) forControlEvents:UIControlEventEditingDidEndOnExit];
[self.contentView addSubview:textField];
@@ -51,6 +52,7 @@
minimumCharacters = 1;
maximumCharacters = 64;
+ respectEditing = NO;
oldValue = nil;
}
return self;
@@ -98,9 +100,11 @@
return !([aTextField.text length] > self.maximumCharacters && [string length] > range.length);
}
-// allow editing only if delegate is set and conformant to protocol
+// allow editing only if delegate is set and conformant to protocol, and if editableOnlyWhileEditing
-(BOOL) textFieldShouldBeginEditing:(UITextField *)aTextField {
- return (delegate != nil) && [delegate respondsToSelector:@selector(saveTextFieldValue:withTag:)];
+ return (delegate != nil) &&
+ [delegate respondsToSelector:@selector(saveTextFieldValue:withTag:)] &&
+ (respectEditing) ? ((UITableView*)[self superview]).editing : YES;
}
// the textfield is being modified, update the navigation controller
@@ -177,4 +181,12 @@
self.oldValue = nil;
}
+// when field is editable only when the tableview is editable, resign responder when exiting editing mode
+-(void) willTransitionToState:(UITableViewCellStateMask)state {
+ if (respectEditing && state == UITableViewCellStateDefaultMask)
+ [self save:nil];
+
+ [super willTransitionToState:state];
+}
+
@end
--- a/project_files/HedgewarsMobile/Classes/GameSetup.m Sat Sep 25 23:01:52 2010 +0400
+++ b/project_files/HedgewarsMobile/Classes/GameSetup.m Sun Sep 26 03:41:30 2010 +0200
@@ -25,8 +25,9 @@
#import "PascalImports.h"
#import "CommodityFunctions.h"
#import "NSStringExtra.h"
+#import "OverlayViewController.h"
-#define BUFFER_SIZE 64
+#define BUFFER_SIZE 255 // like in original frontend
@implementation GameSetup
@synthesize systemSettings, gameConfig, savePath;
@@ -255,7 +256,7 @@
uint8_t length = [string length];
[[NSString stringWithFormat:@"%c%@",length,string] appendToFile:savePath];
- SDLNet_TCP_Send(csd, &length , 1);
+ SDLNet_TCP_Send(csd, &length, 1);
return SDLNet_TCP_Send(csd, [string UTF8String], length);
}
@@ -263,7 +264,7 @@
-(int) sendToEngineNoSave: (NSString *)string {
uint8_t length = [string length];
- SDLNet_TCP_Send(csd, &length , 1);
+ SDLNet_TCP_Send(csd, &length, 1);
return SDLNet_TCP_Send(csd, [string UTF8String], length);
}
@@ -274,9 +275,8 @@
IPaddress ip;
int eProto;
BOOL clientQuit;
- char buffer[BUFFER_SIZE];
+ uint8_t buffer[BUFFER_SIZE];
uint8_t msgSize;
- uint16_t gameTicks;
clientQuit = NO;
csd = NULL;
@@ -304,12 +304,14 @@
SDLNet_TCP_Close(sd);
while (!clientQuit) {
+ NSString *msgToSave = nil;
+ NSOutputStream *os = nil;
msgSize = 0;
- memset(buffer, 0, BUFFER_SIZE);
+ memset(buffer, '\0', BUFFER_SIZE);
if (SDLNet_TCP_Recv(csd, &msgSize, sizeof(uint8_t)) <= 0)
- clientQuit = YES;
+ break;
if (SDLNet_TCP_Recv(csd, buffer, msgSize) <=0)
- clientQuit = YES;
+ break;
switch (buffer[0]) {
case 'C':
@@ -360,9 +362,10 @@
clientQuit = YES;
break;
case 'e':
- buffer[msgSize] = '\0';
- [[NSString stringWithUTF8String:buffer] appendToFile:savePath];
- sscanf(buffer, "%*s %d", &eProto);
+ msgToSave = [NSString stringWithFormat:@"%c%s",msgSize,buffer];
+ [msgToSave appendToFile:self.savePath];
+
+ sscanf((char *)buffer, "%*s %d", &eProto);
short int netProto = 0;
char *versionStr;
@@ -373,24 +376,36 @@
DLog(@"ERROR - wrong protocol number: [%s] - expecting %d", &buffer[1], eProto);
clientQuit = YES;
}
-
break;
case 'i':
switch (buffer[1]) {
case 'r':
- NSLog(@"Winning team: %s", &buffer[2]);
+ DLog(@"Winning team: %s", &buffer[2]);
break;
case 'k':
- NSLog(@"Best Hedgehog: %s", &buffer[2]);
+ DLog(@"Best Hedgehog: %s", &buffer[2]);
+ break;
+ default:
+ // TODO: losta stats stuff
break;
}
break;
+ case 'q':
+ // game ended, can remove the savefile
+ [[NSFileManager defaultManager] removeItemAtPath:self.savePath error:nil];
+ // so update the relative viewcontroler
+ [[NSNotificationCenter defaultCenter] postNotificationName:@"removedSave" object:nil];
+ // and disable the overlay
+ setGameRunning(NO);
+ break;
default:
- // empty packet or just statistics -- in either cases gameTicks is sent
- gameTicks = SDLNet_Read16 (&buffer[msgSize - 2]);
- DLog(@"engineProtocol - %d: received [%s]", gameTicks, buffer);
- buffer[msgSize] = '\0';
- [[NSString stringWithUTF8String:buffer] appendToFile:savePath];
+ // is it performant to reopen the stream every time?
+ os = [[NSOutputStream alloc] initToFileAtPath:self.savePath append:YES];
+ [os open];
+ [os write:&msgSize maxLength:1];
+ [os write:buffer maxLength:msgSize];
+ [os close];
+ [os release];
break;
}
}
--- a/project_files/HedgewarsMobile/Classes/MainMenuViewController.m Sat Sep 25 23:01:52 2010 +0400
+++ b/project_files/HedgewarsMobile/Classes/MainMenuViewController.m Sun Sep 26 03:41:30 2010 +0200
@@ -292,7 +292,7 @@
if (nil == self.savedGamesViewController) {
SavedGamesViewController *savedgames = [[SavedGamesViewController alloc] initWithNibName:@"SavedGamesViewController" bundle:nil];
savedgames.modalTransitionStyle = UIModalTransitionStyleCoverVertical;
- savedgames.modalPresentationStyle = UIModalPresentationFormSheet;
+ savedgames.modalPresentationStyle = UIModalPresentationPageSheet;
self.savedGamesViewController = savedgames;
[savedgames release];
}
--- a/project_files/HedgewarsMobile/Classes/NSStringExtra.m Sat Sep 25 23:01:52 2010 +0400
+++ b/project_files/HedgewarsMobile/Classes/NSStringExtra.m Sun Sep 26 03:41:30 2010 +0200
@@ -35,6 +35,11 @@
return YES;
}
+-(BOOL) appendToFile:(NSString *)path usingStream:(NSOutputStream *)os {
+ NSData *allData = [self dataUsingEncoding:NSUTF8StringEncoding];
+ [os write:[allData bytes] maxLength:[allData length]];
+ return YES;
+}
// by http://iphonedevelopment.blogspot.com/2010/08/nsstring-appendtofileusingencoding.html
-(BOOL) appendToFile:(NSString *)path usingEncoding:(NSStringEncoding) encoding {
--- a/project_files/HedgewarsMobile/Classes/OverlayViewController.h Sat Sep 25 23:01:52 2010 +0400
+++ b/project_files/HedgewarsMobile/Classes/OverlayViewController.h Sun Sep 26 03:41:30 2010 +0200
@@ -66,7 +66,10 @@
@end
-// understands when the loading screen is done
+// actual game started (controls should be enabled)
BOOL isGameRunning;
+void setGameRunning(BOOL value);
+// black screen present
+BOOL isReplay;
// cache the grenade time
NSInteger cachedGrenadeTime;
\ No newline at end of file
--- a/project_files/HedgewarsMobile/Classes/OverlayViewController.m Sat Sep 25 23:01:52 2010 +0400
+++ b/project_files/HedgewarsMobile/Classes/OverlayViewController.m Sun Sep 26 03:41:30 2010 +0200
@@ -36,6 +36,7 @@
#define CONFIRMATION_TAG 5959
#define GRENADE_TAG 9595
+#define BLACKVIEW_TAG 9955
#define ANIMATION_DURATION 0.25
#define removeConfirmationInput() [[self.view viewWithTag:CONFIRMATION_TAG] removeFromSuperview];
@@ -97,6 +98,7 @@
#pragma mark View Management
-(void) viewDidLoad {
isGameRunning = NO;
+ isReplay = NO;
cachedGrenadeTime = 2;
isAttacking = NO;
@@ -212,7 +214,7 @@
// dim the overlay when there's no more input for a certain amount of time
-(IBAction) buttonReleased:(id) sender {
- if (!isGameRunning)
+ if (isGameRunning == NO)
return;
UIButton *theButton = (UIButton *)sender;
@@ -244,15 +246,12 @@
// issue certain action based on the tag of the button
-(IBAction) buttonPressed:(id) sender {
[self activateOverlay];
- if (isPopoverVisible) {
+
+ if (isGameRunning == NO)
+ return;
+
+ if (isPopoverVisible)
[self dismissPopover];
- }
-
- if (!isGameRunning)
- return;
-
- if (HW_isWaiting())
- HW_dismissReady();
UIButton *theButton = (UIButton *)sender;
switch (theButton.tag) {
@@ -402,12 +401,11 @@
NSSet *allTouches = [event allTouches];
CGPoint currentPosition = [[[allTouches allObjects] objectAtIndex:0] locationInView:self.view];
+ if (isGameRunning == NO)
+ return;
+
switch ([allTouches count]) {
case 1:
- // this dismisses the "get ready"
- if (HW_isWaiting())
- HW_dismissReady();
-
// if we're in the menu we just click in the point
if (HW_isAmmoOpen()) {
HW_setCursor(HWXZ(currentPosition.x), HWYZ(currentPosition.y));
@@ -507,9 +505,11 @@
CGRect screen = [[UIScreen mainScreen] bounds];
NSSet *allTouches = [event allTouches];
int x, y, dx, dy;
-
UITouch *touch, *first, *second;
+ if (isGameRunning == NO)
+ return;
+
switch ([allTouches count]) {
case 1:
touch = [[allTouches allObjects] objectAtIndex:0];
@@ -562,9 +562,13 @@
#pragma mark -
#pragma mark Functions called by pascal
-// called from AddProgress and FinishProgress (respectively)
+void setGameRunning(BOOL value) {
+ isGameRunning = value;
+}
+
+// called by uStore from AddProgress
void startSpinning() {
- isGameRunning = NO;
+ setGameRunning(NO);
CGRect screen = [[UIScreen mainScreen] bounds];
UIActivityIndicatorView *indicator = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleWhiteLarge];
indicator.tag = 987654;
@@ -575,13 +579,16 @@
[indicator release];
}
+// called by uStore from FinishProgress
void stopSpinning() {
UIActivityIndicatorView *indicator = (UIActivityIndicatorView *)[[[[UIApplication sharedApplication] keyWindow] viewWithTag:SDL_VIEW_TAG] viewWithTag:987654];
[indicator stopAnimating];
- isGameRunning = YES;
HW_zoomSet(1.7);
+ if (isReplay == NO)
+ setGameRunning(YES);
}
+// called by CCHandlers from chNextTurn
void clearView() {
UIWindow *theWindow = [[UIApplication sharedApplication] keyWindow];
UIButton *theButton = (UIButton *)[theWindow viewWithTag:CONFIRMATION_TAG];
@@ -599,4 +606,34 @@
cachedGrenadeTime = 2;
}
+// called by hwengine
+void replayBegan() {
+ UIWindow *theWindow = [[UIApplication sharedApplication] keyWindow];
+ UIView *blackView = [[UIView alloc] initWithFrame:theWindow.frame];
+ blackView.backgroundColor = [UIColor blackColor];
+ blackView.alpha = 0.6;
+ blackView.tag = BLACKVIEW_TAG;
+ blackView.exclusiveTouch = NO;
+ blackView.multipleTouchEnabled = NO;
+ blackView.userInteractionEnabled = NO;
+ [theWindow addSubview:blackView];
+ [blackView release];
+ isReplay = YES;
+}
+
+// called by uGame
+void replayFinished() {
+ UIWindow *theWindow = [[UIApplication sharedApplication] keyWindow];
+ UIView *blackView = (UIView *)[theWindow viewWithTag:BLACKVIEW_TAG];
+
+ [UIView beginAnimations:@"removing black" context:NULL];
+ [UIView setAnimationDuration:1];
+ blackView.alpha = 0;
+ [UIView commitAnimations];
+ [theWindow performSelector:@selector(removeFromSuperview) withObject:blackView afterDelay:1];
+
+ setGameRunning(YES);
+ isReplay = NO;
+}
+
@end
--- a/project_files/HedgewarsMobile/Classes/PascalImports.h Sat Sep 25 23:01:52 2010 +0400
+++ b/project_files/HedgewarsMobile/Classes/PascalImports.h Sun Sep 26 03:41:30 2010 +0200
@@ -66,7 +66,6 @@
void HW_pause(void);
void HW_terminate(BOOL andCloseFrontend);
- void HW_dismissReady(void);
void HW_setLandscape(BOOL rotate);
void HW_setCursor(int x, int y);
@@ -74,7 +73,6 @@
BOOL HW_isAmmoOpen(void);
BOOL HW_isPaused(void);
- BOOL HW_isWaiting(void);
BOOL HW_isWeaponRequiringClick(void);
BOOL HW_isWeaponTimerable(void);
BOOL HW_isWeaponSwitch(void);
--- a/project_files/HedgewarsMobile/Classes/SavedGamesViewController.h Sat Sep 25 23:01:52 2010 +0400
+++ b/project_files/HedgewarsMobile/Classes/SavedGamesViewController.h Sun Sep 26 03:41:30 2010 +0200
@@ -20,9 +20,9 @@
#import <UIKit/UIKit.h>
-
+#import "EditableCellView.h"
-@interface SavedGamesViewController : UIViewController <UITableViewDelegate, UITableViewDataSource> {
+@interface SavedGamesViewController : UIViewController <UITableViewDelegate, UITableViewDataSource, EditableCellViewDelegate> {
UITableView *tableView;
NSMutableArray *listOfSavegames;
}
@@ -30,7 +30,7 @@
@property (nonatomic,retain) IBOutlet UITableView *tableView;
@property (nonatomic,retain) NSMutableArray *listOfSavegames;
-
-(IBAction) buttonPressed:(id) sender;
+-(IBAction) toggleEdit:(id) sender;
@end
--- a/project_files/HedgewarsMobile/Classes/SavedGamesViewController.m Sat Sep 25 23:01:52 2010 +0400
+++ b/project_files/HedgewarsMobile/Classes/SavedGamesViewController.m Sun Sep 26 03:41:30 2010 +0200
@@ -32,7 +32,10 @@
-(void) viewDidLoad {
self.tableView.backgroundView = nil;
-
+ [[NSNotificationCenter defaultCenter] addObserver:self
+ selector:@selector(viewWillAppear:)
+ name:@"removedSave"
+ object:nil];
[super viewDidLoad];
}
@@ -49,9 +52,15 @@
-(IBAction) buttonPressed:(id) sender {
playSound(@"backSound");
+ [self.tableView setEditing:NO animated:YES];
[[self parentViewController] dismissModalViewControllerAnimated:YES];
}
+-(IBAction) toggleEdit:(id) sender {
+ BOOL isEditing = self.tableView.editing;
+ [self.tableView setEditing:!isEditing animated:YES];
+}
+
#pragma mark -
#pragma mark Table view data source
-(NSInteger) numberOfSectionsInTableView:(UITableView *)tableView {
@@ -65,15 +74,72 @@
-(UITableViewCell *)tableView:(UITableView *)aTableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
static NSString *CellIdentifier = @"Cell";
- UITableViewCell *cell = [aTableView dequeueReusableCellWithIdentifier:CellIdentifier];
- if (cell == nil)
- cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:CellIdentifier] autorelease];
+ EditableCellView *editableCell = (EditableCellView *)[aTableView dequeueReusableCellWithIdentifier:CellIdentifier];
+ if (editableCell == nil) {
+ editableCell = [[[EditableCellView alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease];
+ editableCell.delegate = self;
+ }
+ editableCell.tag = [indexPath row];
+ editableCell.respectEditing = YES;
+ editableCell.textField.text = [[self.listOfSavegames objectAtIndex:[indexPath row]] stringByDeletingPathExtension];
+ editableCell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
+
+ UIImage *addImg = [UIImage imageWithContentsOfFile:@"plus.png"];
+ UIButton *customButton = [UIButton buttonWithType:UIButtonTypeContactAdd];
+ customButton.tag = [indexPath row];
+ [customButton setImage:addImg forState:UIControlStateNormal];
+ [customButton addTarget:self action:@selector(duplicateEntry:) forControlEvents:UIControlEventTouchUpInside];
+ editableCell.editingAccessoryView = customButton;
+
+ return (UITableViewCell *)editableCell;
+}
+
+-(UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger) section {
+ UIView *footer = [[UIView alloc] initWithFrame:CGRectMake(0, 0, self.tableView.frame.size.width, 50)];
+ footer.backgroundColor = [UIColor clearColor];
+
+ UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, self.tableView.frame.size.width*80/100, 100)];
+ label.center = CGPointMake(self.tableView.frame.size.width/2,70);
+ label.textAlignment = UITextAlignmentCenter;
+ label.font = [UIFont systemFontOfSize:16];
+ label.textColor = [UIColor lightGrayColor];
+ label.numberOfLines = 5;
+ label.text = NSLocalizedString(@"Games are automatically saved and can be resumed by selecting an entry above.\nYou can modify this list by pressing the 'Edit' button.\nNotice that completed games are deleted, so make backups.",@"");
- // first all the names, then the title (which is offset 5)
- cell.textLabel.text = [[self.listOfSavegames objectAtIndex:[indexPath row]] stringByDeletingPathExtension];
- cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
+ label.backgroundColor = [UIColor clearColor];
+ [footer addSubview:label];
+ [label release];
+ return [footer autorelease];
+}
- return cell;
+-(void) tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath {
+ NSUInteger row = [indexPath row];
+ [(EditableCellView *)[self.tableView cellForRowAtIndexPath:[NSIndexPath indexPathForRow:row inSection:0]] save:nil];
+
+ NSString *saveName = [self.listOfSavegames objectAtIndex:row];
+ NSString *currentFilePath = [NSString stringWithFormat:@"%@/%@",SAVES_DIRECTORY(),saveName];
+ [[NSFileManager defaultManager] removeItemAtPath:currentFilePath error:nil];
+ [self.listOfSavegames removeObject:saveName];
+
+ [self.tableView reloadData];
+}
+
+-(void) duplicateEntry:(id) sender {
+ UIButton *button = (UIButton *)sender;
+ NSUInteger row = button.tag;
+
+ [(EditableCellView *)[self.tableView cellForRowAtIndexPath:[NSIndexPath indexPathForRow:row inSection:0]] save:nil];
+ NSString *currentSaveName = [self.listOfSavegames objectAtIndex:row];
+ NSString *newSaveName = [[currentSaveName stringByDeletingPathExtension] stringByAppendingFormat:@" %d.hws",[self.listOfSavegames count]];
+
+ NSString *currentFilePath = [NSString stringWithFormat:@"%@/%@",SAVES_DIRECTORY(),currentSaveName];
+ NSString *newFilePath = [NSString stringWithFormat:@"%@/%@",SAVES_DIRECTORY(),newSaveName];
+ [[NSFileManager defaultManager] copyItemAtPath:currentFilePath toPath:newFilePath error:nil];
+ [self.listOfSavegames addObject:newSaveName];
+ [self.listOfSavegames sortUsingSelector:@selector(compare:)];
+
+ //[self.tableView insertRowsAtIndexPaths:[NSArray arrayWithObject:[NSIndexPath indexPathForRow:[self.listOfSavegames indexOfObject:newSaveName] inSection:0]] withRowAnimation:UITableViewRowAnimationFade];
+ [self.tableView reloadData];
}
#pragma mark -
@@ -81,6 +147,8 @@
-(void) tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
[self.tableView deselectRowAtIndexPath:indexPath animated:YES];
+ [(EditableCellView *)[self.tableView cellForRowAtIndexPath:indexPath] save:nil];
+
NSString *filePath = [NSString stringWithFormat:@"%@/%@",SAVES_DIRECTORY(),[self.listOfSavegames objectAtIndex:[indexPath row]]];
NSDictionary *allDataNecessary = [NSDictionary dictionaryWithObjectsAndKeys:
@@ -92,6 +160,20 @@
}
#pragma mark -
+#pragma mark editableCellView delegate
+// rename old file if names differ
+-(void) saveTextFieldValue:(NSString *)textString withTag:(NSInteger) tagValue {
+ NSString *oldFilePath = [NSString stringWithFormat:@"%@/%@",SAVES_DIRECTORY(),[self.listOfSavegames objectAtIndex:tagValue]];
+ NSString *newFilePath = [NSString stringWithFormat:@"%@/%@.hws",SAVES_DIRECTORY(),textString];
+
+ if ([oldFilePath isEqualToString:newFilePath] == NO) {
+ [[NSFileManager defaultManager] moveItemAtPath:oldFilePath toPath:newFilePath error:nil];
+ [self.listOfSavegames replaceObjectAtIndex:tagValue withObject:[textString stringByAppendingString:@".hws"]];
+ }
+
+}
+
+#pragma mark -
#pragma mark Memory Management
-(void) didReceiveMemoryWarning {
[super didReceiveMemoryWarning];
--- a/project_files/HedgewarsMobile/Classes/SavedGamesViewController.xib Sat Sep 25 23:01:52 2010 +0400
+++ b/project_files/HedgewarsMobile/Classes/SavedGamesViewController.xib Sun Sep 26 03:41:30 2010 +0200
@@ -12,7 +12,7 @@
</object>
<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
<bool key="EncodedWithXMLCoder">YES</bool>
- <integer value="2"/>
+ <integer value="4"/>
</object>
<object class="NSArray" key="IBDocument.PluginDependencies">
<bool key="EncodedWithXMLCoder">YES</bool>
@@ -42,10 +42,22 @@
<int key="NSvFlags">292</int>
<object class="NSMutableArray" key="NSSubviews">
<bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBUIImageView" id="405529720">
+ <reference key="NSNextResponder" ref="766721923"/>
+ <int key="NSvFlags">292</int>
+ <string key="NSFrameSize">{768, 768}</string>
+ <reference key="NSSuperview" ref="766721923"/>
+ <bool key="IBUIUserInteractionEnabled">NO</bool>
+ <string key="targetRuntimeIdentifier">IBIPadFramework</string>
+ <object class="NSCustomResource" key="IBUIImage">
+ <string key="NSClassName">NSImage</string>
+ <string key="NSResourceName">background_med.png</string>
+ </object>
+ </object>
<object class="IBUIToolbar" id="832454237">
<reference key="NSNextResponder" ref="766721923"/>
<int key="NSvFlags">290</int>
- <string key="NSFrameSize">{408, 44}</string>
+ <string key="NSFrameSize">{768, 44}</string>
<reference key="NSSuperview" ref="766721923"/>
<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
<string key="targetRuntimeIdentifier">IBIPadFramework</string>
@@ -57,12 +69,22 @@
<reference key="IBUIToolbar" ref="832454237"/>
<int key="IBUISystemItemIdentifier">0</int>
</object>
+ <object class="IBUIBarButtonItem" id="881124109">
+ <string key="targetRuntimeIdentifier">IBIPadFramework</string>
+ <reference key="IBUIToolbar" ref="832454237"/>
+ <int key="IBUISystemItemIdentifier">5</int>
+ </object>
+ <object class="IBUIBarButtonItem" id="793091239">
+ <string key="targetRuntimeIdentifier">IBIPadFramework</string>
+ <reference key="IBUIToolbar" ref="832454237"/>
+ <int key="IBUISystemItemIdentifier">2</int>
+ </object>
</object>
</object>
<object class="IBUITableView" id="399289716">
<reference key="NSNextResponder" ref="766721923"/>
<int key="NSvFlags">274</int>
- <string key="NSFrame">{{0, 44}, {408, 414}}</string>
+ <string key="NSFrame">{{0, 44}, {768, 724}}</string>
<reference key="NSSuperview" ref="766721923"/>
<object class="NSColor" key="IBUIBackgroundColor">
<int key="NSColorSpace">1</int>
@@ -80,7 +102,7 @@
<float key="IBUISectionFooterHeight">10</float>
</object>
</object>
- <string key="NSFrameSize">{408, 458}</string>
+ <string key="NSFrameSize">{768, 768}</string>
<reference key="NSSuperview"/>
<object class="NSColor" key="IBUIBackgroundColor">
<int key="NSColorSpace">3</int>
@@ -136,6 +158,14 @@
</object>
<int key="connectionID">10</int>
</object>
+ <object class="IBConnectionRecord">
+ <object class="IBCocoaTouchEventConnection" key="connection">
+ <string key="label">toggleEdit:</string>
+ <reference key="source" ref="793091239"/>
+ <reference key="destination" ref="841351856"/>
+ </object>
+ <int key="connectionID">14</int>
+ </object>
</object>
<object class="IBMutableOrderedSet" key="objectRecords">
<object class="NSArray" key="orderedObjects">
@@ -164,6 +194,7 @@
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="832454237"/>
<reference ref="399289716"/>
+ <reference ref="405529720"/>
</object>
<reference key="parent" ref="0"/>
</object>
@@ -173,6 +204,8 @@
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="422926197"/>
+ <reference ref="793091239"/>
+ <reference ref="881124109"/>
</object>
<reference key="parent" ref="766721923"/>
</object>
@@ -186,6 +219,21 @@
<reference key="object" ref="399289716"/>
<reference key="parent" ref="766721923"/>
</object>
+ <object class="IBObjectRecord">
+ <int key="objectID">11</int>
+ <reference key="object" ref="405529720"/>
+ <reference key="parent" ref="766721923"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">12</int>
+ <reference key="object" ref="793091239"/>
+ <reference key="parent" ref="832454237"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">13</int>
+ <reference key="object" ref="881124109"/>
+ <reference key="parent" ref="832454237"/>
+ </object>
</object>
</object>
<object class="NSMutableDictionary" key="flattenedProperties">
@@ -194,6 +242,9 @@
<bool key="EncodedWithXMLCoder">YES</bool>
<string>-1.CustomClassName</string>
<string>-2.CustomClassName</string>
+ <string>11.IBPluginDependency</string>
+ <string>12.IBPluginDependency</string>
+ <string>13.IBPluginDependency</string>
<string>2.IBEditorWindowLastContentRect</string>
<string>2.IBPluginDependency</string>
<string>4.IBPluginDependency</string>
@@ -204,7 +255,10 @@
<bool key="EncodedWithXMLCoder">YES</bool>
<string>SavedGamesViewController</string>
<string>UIResponder</string>
- <string>{{677, 547}, {408, 458}}</string>
+ <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <string>{{486, 215}, {768, 768}}</string>
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
@@ -227,7 +281,7 @@
</object>
</object>
<nil key="sourceID"/>
- <int key="maxID">10</int>
+ <int key="maxID">14</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes">
<object class="NSMutableArray" key="referencedPartialClassDescriptions">
@@ -236,14 +290,35 @@
<string key="className">SavedGamesViewController</string>
<string key="superclassName">UIViewController</string>
<object class="NSMutableDictionary" key="actions">
- <string key="NS.key.0">buttonPressed:</string>
- <string key="NS.object.0">id</string>
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSArray" key="dict.sortedKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>buttonPressed:</string>
+ <string>toggleEdit:</string>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>id</string>
+ <string>id</string>
+ </object>
</object>
<object class="NSMutableDictionary" key="actionInfosByName">
- <string key="NS.key.0">buttonPressed:</string>
- <object class="IBActionInfo" key="NS.object.0">
- <string key="name">buttonPressed:</string>
- <string key="candidateClassName">id</string>
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSArray" key="dict.sortedKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>buttonPressed:</string>
+ <string>toggleEdit:</string>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBActionInfo">
+ <string key="name">buttonPressed:</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ <object class="IBActionInfo">
+ <string key="name">toggleEdit:</string>
+ <string key="candidateClassName">id</string>
+ </object>
</object>
</object>
<object class="NSMutableDictionary" key="outlets">
@@ -387,6 +462,14 @@
</object>
</object>
<object class="IBPartialClassDescription">
+ <string key="className">UIImageView</string>
+ <string key="superclassName">UIView</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">UIKit.framework/Headers/UIImageView.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
<string key="className">UIResponder</string>
<string key="superclassName">NSObject</string>
<reference key="sourceIdentifier" ref="786211723"/>
@@ -497,6 +580,10 @@
<bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
<string key="IBDocument.LastKnownRelativeProjectPath">../Hedgewars.xcodeproj</string>
<int key="IBDocument.defaultPropertyAccessControl">3</int>
+ <object class="NSMutableDictionary" key="IBDocument.LastKnownImageSizes">
+ <string key="NS.key.0">background_med.png</string>
+ <string key="NS.object.0">{768, 768}</string>
+ </object>
<string key="IBCocoaTouchPluginVersion">117</string>
</data>
</archive>
--- a/project_files/HedgewarsMobile/Classes/SchemeSettingsViewController.m Sat Sep 25 23:01:52 2010 +0400
+++ b/project_files/HedgewarsMobile/Classes/SchemeSettingsViewController.m Sun Sep 26 03:41:30 2010 +0200
@@ -41,7 +41,6 @@
action:@selector(toggleEdit:)];
self.navigationItem.rightBarButtonItem = editButton;
[editButton release];
-
}
-(void) viewWillAppear:(BOOL) animated {
--- a/project_files/HedgewarsMobile/Classes/UIImageExtra.h Sat Sep 25 23:01:52 2010 +0400
+++ b/project_files/HedgewarsMobile/Classes/UIImageExtra.h Sun Sep 26 03:41:30 2010 +0200
@@ -30,6 +30,7 @@
-(id) initWithContentsOfFile:(NSString *)path andCutAt:(CGRect) rect;
-(UIImage *)cutAt:(CGRect) rect;
-(UIImage *)convertToGrayScale;
+-(UIImage *)convertToNegative;
-(UIImage *)maskImageWith:(UIImage *)maskImage;
-(UIImage *)makeRoundCornersOfSize:(CGSize) sizewh;
--- a/project_files/HedgewarsMobile/Classes/UIImageExtra.m Sat Sep 25 23:01:52 2010 +0400
+++ b/project_files/HedgewarsMobile/Classes/UIImageExtra.m Sun Sep 26 03:41:30 2010 +0200
@@ -207,4 +207,17 @@
return newImage;
}
+// by http://www.sixtemia.com/journal/2010/06/23/uiimage-negative-color-effect/
+-(UIImage *)convertToNegative {
+ UIGraphicsBeginImageContext(self.size);
+ CGContextSetBlendMode(UIGraphicsGetCurrentContext(), kCGBlendModeCopy);
+ [self drawInRect:CGRectMake(0, 0, self.size.width, self.size.height)];
+ CGContextSetBlendMode(UIGraphicsGetCurrentContext(), kCGBlendModeDifference);
+ CGContextSetFillColorWithColor(UIGraphicsGetCurrentContext(),[UIColor whiteColor].CGColor);
+ CGContextFillRect(UIGraphicsGetCurrentContext(), CGRectMake(0, 0, self.size.width, self.size.height));
+ UIImage *result = UIGraphicsGetImageFromCurrentImageContext();
+ UIGraphicsEndImageContext();
+ return result;
+}
+
@end
--- a/project_files/HedgewarsMobile/Hedgewars.xcodeproj/project.pbxproj Sat Sep 25 23:01:52 2010 +0400
+++ b/project_files/HedgewarsMobile/Hedgewars.xcodeproj/project.pbxproj Sun Sep 26 03:41:30 2010 +0200
@@ -28,6 +28,8 @@
611D9B12124949D000008271 /* NSStringExtra.m in Sources */ = {isa = PBXBuildFile; fileRef = 611D9B11124949D000008271 /* NSStringExtra.m */; };
611D9BFB12497E9800008271 /* SavedGamesViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 611D9BF912497E9800008271 /* SavedGamesViewController.m */; };
611D9BFC12497E9800008271 /* SavedGamesViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 611D9BFA12497E9800008271 /* SavedGamesViewController.xib */; };
+ 611DA031124E2BC500008271 /* background_med.png in Resources */ = {isa = PBXBuildFile; fileRef = 611DA030124E2BC500008271 /* background_med.png */; };
+ 611DA1D0124E5C6300008271 /* plus.png in Resources */ = {isa = PBXBuildFile; fileRef = 611DA1CF124E5C6300008271 /* plus.png */; };
611E03E711FA747C0077A41E /* libvorbis.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 611E037C11FA74590077A41E /* libvorbis.a */; };
611E0E5111FA92170077A41E /* libfreetype.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 611E0E5011FA92130077A41E /* libfreetype.a */; };
611E0EE711FB20610077A41E /* ammoButton.png in Resources */ = {isa = PBXBuildFile; fileRef = 611E0EE511FB20610077A41E /* ammoButton.png */; };
@@ -700,6 +702,8 @@
611D9BF812497E9800008271 /* SavedGamesViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SavedGamesViewController.h; sourceTree = "<group>"; };
611D9BF912497E9800008271 /* SavedGamesViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SavedGamesViewController.m; sourceTree = "<group>"; };
611D9BFA12497E9800008271 /* SavedGamesViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = SavedGamesViewController.xib; sourceTree = "<group>"; };
+ 611DA030124E2BC500008271 /* background_med.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = background_med.png; path = Resources/Overlay/background_med.png; sourceTree = "<group>"; };
+ 611DA1CF124E5C6300008271 /* plus.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = plus.png; path = Resources/Overlay/plus.png; sourceTree = "<group>"; };
611E02EC11FA74580077A41E /* cocos2d-iphone.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = "cocos2d-iphone.xcodeproj"; path = "../../../Library/cocos2d/cocos2d-iphone.xcodeproj"; sourceTree = SOURCE_ROOT; };
611E0E4B11FA92130077A41E /* freetype.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = freetype.xcodeproj; path = "../../../Library/freetype/Xcode-iPhoneOS/freetype.xcodeproj"; sourceTree = SOURCE_ROOT; };
611E0EE511FB20610077A41E /* ammoButton.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = ammoButton.png; path = Resources/Overlay/ammoButton.png; sourceTree = "<group>"; };
@@ -1291,6 +1295,8 @@
6179936611501D1E00BA94A9 /* Overlay */ = {
isa = PBXGroup;
children = (
+ 611DA1CF124E5C6300008271 /* plus.png */,
+ 611DA030124E2BC500008271 /* background_med.png */,
611E0EE511FB20610077A41E /* ammoButton.png */,
611E0EE611FB20610077A41E /* cornerButton.png */,
61EF920511DF57AC003441C4 /* arrowDown.png */,
@@ -2051,6 +2057,8 @@
6199E83A124647DE00DADF8C /* SupportViewController.xib in Resources */,
6199E86D12464A8E00DADF8C /* surpise.png in Resources */,
611D9BFC12497E9800008271 /* SavedGamesViewController.xib in Resources */,
+ 611DA031124E2BC500008271 /* background_med.png in Resources */,
+ 611DA1D0124E5C6300008271 /* plus.png in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
--- a/project_files/HedgewarsMobile/Resources/MainMenuViewController-iPad.xib Sat Sep 25 23:01:52 2010 +0400
+++ b/project_files/HedgewarsMobile/Resources/MainMenuViewController-iPad.xib Sun Sep 26 03:41:30 2010 +0200
@@ -12,7 +12,6 @@
</object>
<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
<bool key="EncodedWithXMLCoder">YES</bool>
- <integer value="1"/>
</object>
<object class="NSArray" key="IBDocument.PluginDependencies">
<bool key="EncodedWithXMLCoder">YES</bool>
@@ -47,6 +46,7 @@
<int key="NSvFlags">274</int>
<string key="NSFrameSize">{1024, 768}</string>
<reference key="NSSuperview" ref="191373211"/>
+ <reference key="NSWindow"/>
<bool key="IBUIUserInteractionEnabled">NO</bool>
<string key="targetRuntimeIdentifier">IBIPadFramework</string>
<object class="NSCustomResource" key="IBUIImage">
@@ -59,6 +59,7 @@
<int key="NSvFlags">292</int>
<string key="NSFrame">{{383, 427}, {263, 244}}</string>
<reference key="NSSuperview" ref="191373211"/>
+ <reference key="NSWindow"/>
<bool key="IBUIOpaque">NO</bool>
<string key="targetRuntimeIdentifier">IBIPadFramework</string>
<int key="IBUIContentHorizontalAlignment">0</int>
@@ -95,6 +96,7 @@
<int key="NSvFlags">-2147483356</int>
<string key="NSFrame">{{611, 417}, {263, 244}}</string>
<reference key="NSSuperview" ref="191373211"/>
+ <reference key="NSWindow"/>
<bool key="IBUIOpaque">NO</bool>
<int key="IBUITag">1</int>
<string key="targetRuntimeIdentifier">IBIPadFramework</string>
@@ -120,9 +122,11 @@
<object class="IBUIButton" id="95106947">
<reference key="NSNextResponder" ref="191373211"/>
<int key="NSvFlags">292</int>
- <string key="NSFrame">{{20, 19}, {18, 19}}</string>
+ <string key="NSFrame">{{788, 300}, {18, 19}}</string>
<reference key="NSSuperview" ref="191373211"/>
+ <reference key="NSWindow"/>
<bool key="IBUIOpaque">NO</bool>
+ <float key="IBUIAlpha">0.31690141558647156</float>
<int key="IBUITag">3</int>
<string key="targetRuntimeIdentifier">IBIPadFramework</string>
<int key="IBUIContentHorizontalAlignment">0</int>
@@ -142,6 +146,7 @@
<int key="NSvFlags">292</int>
<string key="NSFrame">{{376, 345}, {271, 21}}</string>
<reference key="NSSuperview" ref="191373211"/>
+ <reference key="NSWindow"/>
<bool key="IBUIOpaque">NO</bool>
<bool key="IBUIClipsSubviews">YES</bool>
<int key="IBUIContentMode">7</int>
@@ -170,6 +175,7 @@
<int key="NSvFlags">292</int>
<string key="NSFrame">{{932, 686}, {72, 62}}</string>
<reference key="NSSuperview" ref="191373211"/>
+ <reference key="NSWindow"/>
<bool key="IBUIOpaque">NO</bool>
<int key="IBUITag">2</int>
<string key="targetRuntimeIdentifier">IBIPadFramework</string>
@@ -192,6 +198,7 @@
<int key="NSvFlags">292</int>
<string key="NSFrame">{{20, 686}, {72, 62}}</string>
<reference key="NSSuperview" ref="191373211"/>
+ <reference key="NSWindow"/>
<bool key="IBUIOpaque">NO</bool>
<int key="IBUITag">4</int>
<string key="targetRuntimeIdentifier">IBIPadFramework</string>
@@ -209,6 +216,7 @@
</object>
<string key="NSFrameSize">{1024, 768}</string>
<reference key="NSSuperview"/>
+ <reference key="NSWindow"/>
<object class="NSColor" key="IBUIBackgroundColor">
<int key="NSColorSpace">1</int>
<bytes key="NSRGB">MCAwIDAAA</bytes>
@@ -303,8 +311,8 @@
<reference ref="607338789"/>
<reference ref="898948205"/>
<reference ref="867308721"/>
+ <reference ref="894101036"/>
<reference ref="95106947"/>
- <reference ref="894101036"/>
</object>
<reference key="parent" ref="0"/>
</object>
Binary file project_files/HedgewarsMobile/Resources/Overlay/background_med.png has changed
Binary file project_files/HedgewarsMobile/Resources/Overlay/background_small.png has changed
Binary file project_files/HedgewarsMobile/Resources/Overlay/plus.png has changed