Updated iPhone keyboard code (which builds and runs on the iPad and iPhone simulator now)
Updated iPhone demos (which build and run again)
This commit is contained in:
parent
2c5a878c4e
commit
99b869fe2e
10 changed files with 55 additions and 39 deletions
|
@ -105,6 +105,13 @@
|
|||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXContainerItemProxy section */
|
||||
04AB757011E563D200BE9753 /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = FD1B48920E313154007AB34E /* SDLiPhoneOS.xcodeproj */;
|
||||
proxyType = 2;
|
||||
remoteGlobalIDString = 006E982211955059001DE610 /* testsdl.app */;
|
||||
remoteInfo = testsdl;
|
||||
};
|
||||
FD1B489D0E313154007AB34E /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = FD1B48920E313154007AB34E /* SDLiPhoneOS.xcodeproj */;
|
||||
|
@ -318,6 +325,7 @@
|
|||
isa = PBXGroup;
|
||||
children = (
|
||||
FD1B489E0E313154007AB34E /* libSDLiPhoneOS.a */,
|
||||
04AB757111E563D200BE9753 /* testsdl.app */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
|
@ -523,6 +531,13 @@
|
|||
/* End PBXProject section */
|
||||
|
||||
/* Begin PBXReferenceProxy section */
|
||||
04AB757111E563D200BE9753 /* testsdl.app */ = {
|
||||
isa = PBXReferenceProxy;
|
||||
fileType = wrapper.application;
|
||||
path = testsdl.app;
|
||||
remoteRef = 04AB757011E563D200BE9753 /* PBXContainerItemProxy */;
|
||||
sourceTree = BUILT_PRODUCTS_DIR;
|
||||
};
|
||||
FD1B489E0E313154007AB34E /* libSDLiPhoneOS.a */ = {
|
||||
isa = PBXReferenceProxy;
|
||||
fileType = archive.ar;
|
||||
|
@ -731,7 +746,7 @@
|
|||
OTHER_CFLAGS = "";
|
||||
PREBINDING = NO;
|
||||
PRELINK_LIBS = "";
|
||||
SDKROOT = iphoneos2.0;
|
||||
SDKROOT = iphoneos3.2;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
|
@ -749,7 +764,7 @@
|
|||
OTHER_CFLAGS = "";
|
||||
PREBINDING = NO;
|
||||
PRELINK_LIBS = "";
|
||||
SDKROOT = iphoneos2.0;
|
||||
SDKROOT = iphoneos3.2;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
|
|
|
@ -430,9 +430,7 @@ main(int argc, char *argv[])
|
|||
done = 1;
|
||||
}
|
||||
if (event.type == SDL_MOUSEBUTTONDOWN) {
|
||||
int which = event.button.which;
|
||||
int x, y;
|
||||
SDL_SelectMouse(which);
|
||||
SDL_GetMouseState(&x, &y);
|
||||
spawnEmitterParticle(x, y);
|
||||
}
|
||||
|
|
|
@ -124,10 +124,9 @@ handleMouseButtonDown(SDL_Event * event)
|
|||
|
||||
int x, y, mouseIndex, i, drumIndex;
|
||||
|
||||
mouseIndex = event->button.which;
|
||||
mouseIndex = 0;
|
||||
drumIndex = -1;
|
||||
|
||||
SDL_SelectMouse(mouseIndex);
|
||||
SDL_GetMouseState(&x, &y);
|
||||
/* check if we hit any of the drum buttons */
|
||||
for (i = 0; i < NUM_DRUMS; i++) {
|
||||
|
@ -153,7 +152,7 @@ void
|
|||
handleMouseButtonUp(SDL_Event * event)
|
||||
{
|
||||
int i;
|
||||
int mouseIndex = event->button.which;
|
||||
int mouseIndex = 0;
|
||||
/* check if this should cause any of the buttons to become unpressed */
|
||||
for (i = 0; i < NUM_DRUMS; i++) {
|
||||
if (buttons[i].touchIndex == mouseIndex) {
|
||||
|
|
|
@ -106,7 +106,6 @@ main(int argc, char *argv[])
|
|||
done = 1;
|
||||
break;
|
||||
case SDL_MOUSEMOTION:
|
||||
SDL_SelectMouse(event.motion.which); /* select 'mouse' (touch) that moved */
|
||||
state = SDL_GetMouseState(&x, &y); /* get its location */
|
||||
SDL_GetRelativeMouseState(&dx, &dy); /* find how much the mouse moved */
|
||||
if (state & SDL_BUTTON_LMASK) { /* is the mouse (touch) down? */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue