enabled OK button on GuiCombat screen when choosing defenders/attackers. iOS solution only currently. To implement in Android, we need to create a mask/invisible button above the OK button coordinates and add a listener to activate when a user touches the appropriate area. Not ideal, but it works for now.

TODO:  translate functionality into core of engine.
This commit is contained in:
techdragon.nguyen@gmail.com
2011-12-30 16:04:21 +00:00
parent 7fef90f943
commit e102d3f369
10 changed files with 84 additions and 39 deletions
@@ -190,8 +190,7 @@ static NSString *kDownloadFileName = @"core_017_iOS.zip";
return self;
}
#pragma mark Application Lifecycle
#pragma mark - Application Lifecycle
- (void) didReceiveMemoryWarning
@@ -203,8 +202,7 @@ static NSString *kDownloadFileName = @"core_017_iOS.zip";
}
#pragma mark -
#pragma mark UIView Delegate
#pragma mark - UIView Delegate
- (void) handleRotation: (UIInterfaceOrientation) interfaceOrientation
{
-4
View File
@@ -7,10 +7,6 @@
#include "StyleManager.h"
#include "Credits.h"
#ifdef IOS
#include "JGE.h"
#endif
const string Options::optionNames[] = {
//Global options
"Profile",
+3
View File
@@ -47,6 +47,7 @@ GuiCombat::GuiCombat(GameObserver* go) :
if (NULL == ok_tex && go->getResourceManager())
{
ok_tex = go->getResourceManager()->RetrieveTexture("Ok.png", RETRIEVE_LOCK);
// send a message out to listeners that we created the GO button and it's location
}
}
@@ -190,6 +191,7 @@ bool GuiCombat::clickOK()
case END_FIRST_STRIKE:
return false;
case END_DAMAGE:
JGE::GetInstance()->SendCommand("combatGuiEndDamage");
return false; // nothing;
}
return false;
@@ -428,6 +430,7 @@ void GuiCombat::Render()
JQuadPtr ok_quad = WResourceManager::Instance()->RetrieveTempQuad("Ok.png");
ok_quad->SetHotSpot(28, 22);
ok.Render(ok_quad.get());
JGE::GetInstance()->SendCommand("okbuttoncreated:", ok.x, ok.y, ok_quad->mWidth, ok_quad->mHeight);
}
renderer->DrawLine(0, SCREEN_HEIGHT / 2 + 10, SCREEN_WIDTH, SCREEN_HEIGHT / 2 + 10, ARGB(255, 255, 64, 0));
if (FIRST_STRIKE == step)
+2 -12
View File
@@ -498,17 +498,6 @@
/* End PBXBuildFile section */
/* Begin PBXBuildRule section */
12059E5F14980B7300DAC43B /* PBXBuildRule */ = {
isa = PBXBuildRule;
compilerSpec = com.apple.compilers.proxy.script;
filePatterns = modrules.xml;
fileType = pattern.proxy;
isEditable = 1;
outputFiles = (
"",
);
script = "cp -rp iOS/Res bin/Res";
};
129654D7148AA2690031100B /* PBXBuildRule */ = {
isa = PBXBuildRule;
compilerSpec = com.apple.compilers.proxy.script;
@@ -1879,7 +1868,6 @@
12059E4914980B7300DAC43B /* Frameworks */,
);
buildRules = (
12059E5F14980B7300DAC43B /* PBXBuildRule */,
);
dependencies = (
);
@@ -2437,6 +2425,7 @@
DEBUG,
DARWIN_NO_CARBON,
FT2_BUILD_LIBRARY,
FORCE_GLES,
);
"GCC_THUMB_SUPPORT[arch=armv6]" = "";
GCC_VERSION = com.apple.compilers.llvmgcc42;
@@ -2482,6 +2471,7 @@
FT2_BUILD_LIBRARY,
IOS,
TESTSUITE,
FORCE_GLES,
);
"GCC_THUMB_SUPPORT[arch=armv6]" = "";
GCC_VERSION = com.apple.compilers.llvmgcc42;