Permalink
Browse files

Adds how to play info as a web view.

  • Loading branch information...
1 parent efc2413 commit ea7e870fb692d5ceb0211c3fdcfb0438279c4486 @aaronpk aaronpk committed Sep 8, 2011
Showing with 112 additions and 24 deletions.
  1. +10 −0 Classes/GameListViewController.m
  2. +1 −1 Classes/HowToPlay.h
  3. +2 −2 Classes/HowToPlay.m
  4. +53 −15 Classes/HowToPlay.xib
  5. +11 −6 GameList.xib
  6. +31 −0 HowToPlay.html
  7. +4 −0 MapAttack.xcodeproj/project.pbxproj
@@ -54,6 +54,14 @@ - (void)viewDidLoad {
[self refreshNearbyLayers];
}
+- (void)viewWillAppear:(BOOL)animated {
+ if([[LQClient single] isLoggedIn]) {
+ self.logoutBtn.hidden = YES;
+ } else {
+ self.logoutBtn.hidden = NO;
+ }
+}
+
- (IBAction)reloadBtnPressed {
[self refreshNearbyLayers];
}
@@ -93,6 +101,8 @@ - (void)locationManager:(CLLocationManager *)manager
didUpdateToLocation:(CLLocation *)newLocation
fromLocation:(CLLocation *)oldLocation {
+ NSLog(@"Got location update! %@", newLocation);
+
[[LQClient single] getPlaceContext:newLocation withCallback:^(NSError *error, NSDictionary *response){
NSLog(@"Found place context: %@", response);
if([response objectForKey:@"best_name"] != nil) {
View
@@ -13,6 +13,6 @@
}
-@property (nonatomic, retain) IBOutlet UILabel *test;
+@property (nonatomic, retain) IBOutlet UIWebView *webView;
@end
View
@@ -11,7 +11,7 @@
@implementation HowToPlay
-@synthesize test;
+@synthesize webView;
// The designated initializer. Override if you create the controller programmatically and want to perform customization that is not appropriate for viewDidLoad.
/*
@@ -27,7 +27,7 @@ - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
// Implement viewDidLoad to do additional setup after loading the view, typically from a nib.
- (void)viewDidLoad {
[super viewDidLoad];
- self.test.text = [LQClient single].shareToken;
+ [self.webView loadRequest:[NSURLRequest requestWithURL:[NSURL fileURLWithPath:[[NSBundle mainBundle] pathForResource:@"HowToPlay" ofType:@"html"]isDirectory:NO]]];
}
View
@@ -40,7 +40,24 @@
<object class="IBUIView" id="191373211">
<reference key="NSNextResponder"/>
<int key="NSvFlags">274</int>
- <string key="NSFrameSize">{320, 460}</string>
+ <object class="NSMutableArray" key="NSSubviews">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBUIWebView" id="832817166">
+ <reference key="NSNextResponder" ref="191373211"/>
+ <int key="NSvFlags">292</int>
+ <string key="NSFrameSize">{320, 411}</string>
+ <reference key="NSSuperview" ref="191373211"/>
+ <object class="NSColor" key="IBUIBackgroundColor">
+ <int key="NSColorSpace">1</int>
+ <bytes key="NSRGB">MSAxIDEAA</bytes>
+ </object>
+ <bool key="IBUIMultipleTouchEnabled">YES</bool>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ <int key="IBUIDataDetectorTypes">1</int>
+ <bool key="IBUIDetectsPhoneNumbers">YES</bool>
+ </object>
+ </object>
+ <string key="NSFrameSize">{320, 411}</string>
<reference key="NSSuperview"/>
<object class="NSColor" key="IBUIBackgroundColor">
<int key="NSColorSpace">3</int>
@@ -50,6 +67,7 @@
</object>
</object>
<object class="IBUISimulatedStatusBarMetrics" key="IBUISimulatedStatusBarMetrics"/>
+ <object class="IBUISimulatedTabBarMetrics" key="IBUISimulatedBottomBarMetrics"/>
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
</object>
</object>
@@ -64,6 +82,14 @@
</object>
<int key="connectionID">3</int>
</object>
+ <object class="IBConnectionRecord">
+ <object class="IBCocoaTouchOutletConnection" key="connection">
+ <string key="label">webView</string>
+ <reference key="source" ref="372490531"/>
+ <reference key="destination" ref="832817166"/>
+ </object>
+ <int key="connectionID">9</int>
+ </object>
</object>
<object class="IBMutableOrderedSet" key="objectRecords">
<object class="NSArray" key="orderedObjects">
@@ -79,6 +105,7 @@
<reference key="object" ref="191373211"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="832817166"/>
</object>
<reference key="parent" ref="0"/>
</object>
@@ -93,6 +120,11 @@
<reference key="object" ref="975951072"/>
<reference key="parent" ref="0"/>
</object>
+ <object class="IBObjectRecord">
+ <int key="objectID">8</int>
+ <reference key="object" ref="832817166"/>
+ <reference key="parent" ref="191373211"/>
+ </object>
</object>
</object>
<object class="NSMutableDictionary" key="flattenedProperties">
@@ -103,13 +135,19 @@
<string>-2.CustomClassName</string>
<string>1.IBEditorWindowLastContentRect</string>
<string>1.IBPluginDependency</string>
+ <string>8.IBPluginDependency</string>
+ <string>8.IBViewBoundsToFrameTransform</string>
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>HowToPlay</string>
<string>UIResponder</string>
<string>{{341, 230}, {320, 480}}</string>
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <object class="NSAffineTransform">
+ <bytes key="NSTransformStruct">P4AAAL+AAABCIAAAw5IAAA</bytes>
+ </object>
</object>
</object>
<object class="NSMutableDictionary" key="unlocalizedProperties">
@@ -128,7 +166,7 @@
</object>
</object>
<nil key="sourceID"/>
- <int key="maxID">5</int>
+ <int key="maxID">9</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes">
<object class="NSMutableArray" key="referencedPartialClassDescriptions">
@@ -137,14 +175,14 @@
<string key="className">HowToPlay</string>
<string key="superclassName">UIViewController</string>
<object class="NSMutableDictionary" key="outlets">
- <string key="NS.key.0">test</string>
- <string key="NS.object.0">UILabel</string>
+ <string key="NS.key.0">webView</string>
+ <string key="NS.object.0">UIWebView</string>
</object>
<object class="NSMutableDictionary" key="toOneOutletInfosByName">
- <string key="NS.key.0">test</string>
+ <string key="NS.key.0">webView</string>
<object class="IBToOneOutletInfo" key="NS.object.0">
- <string key="name">test</string>
- <string key="candidateClassName">UILabel</string>
+ <string key="name">webView</string>
+ <string key="candidateClassName">UIWebView</string>
</object>
</object>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
@@ -261,14 +299,6 @@
</object>
</object>
<object class="IBPartialClassDescription">
- <string key="className">UILabel</string>
- <string key="superclassName">UIView</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string key="minorKey">UIKit.framework/Headers/UILabel.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
<string key="className">UIResponder</string>
<string key="superclassName">NSObject</string>
<reference key="sourceIdentifier" ref="246383144"/>
@@ -347,6 +377,14 @@
<string key="minorKey">UIKit.framework/Headers/UIViewController.h</string>
</object>
</object>
+ <object class="IBPartialClassDescription">
+ <string key="className">UIWebView</string>
+ <string key="superclassName">UIView</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">UIKit.framework/Headers/UIWebView.h</string>
+ </object>
+ </object>
</object>
</object>
<int key="IBDocument.localizationMode">0</int>
View
@@ -58,7 +58,7 @@
<object class="IBUIButton" id="787785800">
<reference key="NSNextResponder" ref="191373211"/>
<int key="NSvFlags">292</int>
- <string key="NSFrame">{{116, 365}, {114, 37}}</string>
+ <string key="NSFrame">{{116, 369}, {114, 37}}</string>
<reference key="NSSuperview" ref="191373211"/>
<bool key="IBUIOpaque">NO</bool>
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
@@ -87,7 +87,7 @@
<object class="IBUITableView" id="634107941">
<reference key="NSNextResponder" ref="191373211"/>
<int key="NSvFlags">274</int>
- <string key="NSFrame">{{6, 86}, {308, 272}}</string>
+ <string key="NSFrame">{{6, 94}, {308, 268}}</string>
<reference key="NSSuperview" ref="191373211"/>
<object class="NSColor" key="IBUIBackgroundColor" id="507746717">
<int key="NSColorSpace">3</int>
@@ -103,7 +103,7 @@
<object class="IBUIButton" id="984611742">
<reference key="NSNextResponder" ref="191373211"/>
<int key="NSvFlags">292</int>
- <string key="NSFrame">{{238, 365}, {70, 37}}</string>
+ <string key="NSFrame">{{238, 369}, {70, 37}}</string>
<reference key="NSSuperview" ref="191373211"/>
<bool key="IBUIOpaque">NO</bool>
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
@@ -256,7 +256,7 @@
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
</object>
</object>
- <string key="NSFrame">{{0, 70}, {320, 288}}</string>
+ <string key="NSFrame">{{0, 67}, {320, 295}}</string>
<reference key="NSSuperview" ref="191373211"/>
<object class="NSColor" key="IBUIBackgroundColor">
<int key="NSColorSpace">3</int>
@@ -271,7 +271,7 @@
<object class="IBUIImageView" id="515481672">
<reference key="NSNextResponder" ref="191373211"/>
<int key="NSvFlags">292</int>
- <string key="NSFrame">{{2, 366.5}, {100, 35}}</string>
+ <string key="NSFrame">{{2, 370.5}, {100, 35}}</string>
<reference key="NSSuperview" ref="191373211"/>
<bool key="IBUIUserInteractionEnabled">NO</bool>
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
@@ -283,14 +283,19 @@
<object class="IBUILabel" id="716454880">
<reference key="NSNextResponder" ref="191373211"/>
<int key="NSvFlags">292</int>
- <string key="NSFrame">{{10, 80}, {300, 21}}</string>
+ <string key="NSFrame">{{10, 69}, {300, 21}}</string>
<reference key="NSSuperview" ref="191373211"/>
<bool key="IBUIOpaque">NO</bool>
<bool key="IBUIClipsSubviews">YES</bool>
<int key="IBUIContentMode">7</int>
<bool key="IBUIUserInteractionEnabled">NO</bool>
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
<string key="IBUIText">Games near </string>
+ <object class="NSFont" key="IBUIFont">
+ <string key="NSName">Helvetica-Bold</string>
+ <double key="NSSize">17</double>
+ <int key="NSfFlags">16</int>
+ </object>
<reference key="IBUITextColor" ref="93086934"/>
<reference key="IBUIHighlightedColor" ref="558047089"/>
<int key="IBUIBaselineAdjustment">1</int>
View
@@ -0,0 +1,31 @@
+<html>
+<head>
+<style type="text/css">
+ body {
+ font-family: Helvetica, sans-serif;
+ }
+ h2 {
+ text-align: center;
+ }
+</style>
+</head>
+<body>
+
+<div>
+
+ <h2>How To Play</h2>
+ <p>MapAttack is a game of territory capture for groups up up to 20 people.</p>
+ <p>You can play MapAttack if there is a gameboard in your area. Click on Nearby Games to see if there is a game near you.</p>
+ <p>Once you see a nearby game, click on the game to join it, and you'll be assigned a team. Group up with your team and wait until all players have connected to start the game.</p>
+ <p>Once all players have been assigned a team, try to pick up as many points on the map as you can. You'll be able to see the other players on the other team by their icons on the map, and you'll be able to see both team's scores update in real time.</p>
+ <p>When all the points on the map are gone, you'll get a message that the game is over and an E-mail with your scores.</p>
+
+ <h2>Games in Your Area</h2>
+ <p>If you don't see any games and would like to bring a game to your area, contact us at <a href="mailto:games@mapattack.org">games@mapattack.org</a></p>
+
+ <h2>Credits</h2>
+ <p>MapAttack is a real-time location-based geofencing game built on the Geoloqi platform. For more information about Geoloqi, see <a href="http://geoloqi.com">http://geoloqi.com</a> and <a href="http://developers.geoloqi.com">http://developers.geoloqi.com</a></p>
+
+</div>
+</body>
+</html>
@@ -29,6 +29,7 @@
0F12916813F4C809007AAB66 /* RegexKitLite.m in Sources */ = {isa = PBXBuildFile; fileRef = 0F12916513F4C809007AAB66 /* RegexKitLite.m */; };
0F5760211419349800C79B48 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0F5760201419349800C79B48 /* QuartzCore.framework */; };
0F576050141937C100C79B48 /* PoweredByGeoloqi.png in Resources */ = {isa = PBXBuildFile; fileRef = 0F57604F141937C100C79B48 /* PoweredByGeoloqi.png */; };
+ 0F646E841419488B00FE7ABE /* HowToPlay.html in Resources */ = {isa = PBXBuildFile; fileRef = 0F646E831419488B00FE7ABE /* HowToPlay.html */; };
0F78A72B141553E000029E9C /* DebugLog.m in Sources */ = {isa = PBXBuildFile; fileRef = 0F78A72A141553E000029E9C /* DebugLog.m */; };
0FDBA6321416F0C200F5C8A5 /* LQPushHandler.m in Sources */ = {isa = PBXBuildFile; fileRef = 0FDBA6311416F0C200F5C8A5 /* LQPushHandler.m */; };
0FEC568E14192F770017CE48 /* MapAttackLogo.png in Resources */ = {isa = PBXBuildFile; fileRef = 0FEC568C14192F770017CE48 /* MapAttackLogo.png */; };
@@ -121,6 +122,7 @@
0F12916513F4C809007AAB66 /* RegexKitLite.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RegexKitLite.m; sourceTree = "<group>"; };
0F5760201419349800C79B48 /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; };
0F57604F141937C100C79B48 /* PoweredByGeoloqi.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = PoweredByGeoloqi.png; path = Resources/PoweredByGeoloqi.png; sourceTree = "<group>"; };
+ 0F646E831419488B00FE7ABE /* HowToPlay.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = HowToPlay.html; sourceTree = "<group>"; };
0F78A729141553E000029E9C /* DebugLog.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DebugLog.h; sourceTree = "<group>"; };
0F78A72A141553E000029E9C /* DebugLog.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DebugLog.m; sourceTree = "<group>"; };
0FDBA6301416F0C200F5C8A5 /* LQPushHandler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LQPushHandler.h; sourceTree = "<group>"; };
@@ -438,6 +440,7 @@
28AD73870D9D96C1002E5188 /* MainWindow.xib */,
8D1107310486CEB800E47090 /* MapAttack-Info.plist */,
0FFD68291413F1E5008BC18B /* BlankGame.html */,
+ 0F646E831419488B00FE7ABE /* HowToPlay.html */,
);
name = Resources;
sourceTree = "<group>";
@@ -531,6 +534,7 @@
0FEC56921419300F0017CE48 /* bkg.png in Resources */,
0FEC56931419300F0017CE48 /* bkg@2x.png in Resources */,
0F576050141937C100C79B48 /* PoweredByGeoloqi.png in Resources */,
+ 0F646E841419488B00FE7ABE /* HowToPlay.html in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};

0 comments on commit ea7e870

Please sign in to comment.