Commit 26d0a231 authored by Gerhard Stein's avatar Gerhard Stein

Merge branch 'master' of...

Merge branch 'master' of ssh://clonekeenplus.git.sourceforge.net/gitroot/clonekeenplus/clonekeenplus
parents 14aafeb2 d45ebdc8
......@@ -2575,6 +2575,7 @@
"-DUSE_OPENGL",
"-D__DARWIN_64_BIT_INO_T=1",
"-DMOUSEWRAPPER",
"-DNOKEYBOARD",
);
PRODUCT_NAME = "Commander Genius";
SDKROOT = iphoneos3.2;
......@@ -2613,6 +2614,7 @@
"-DUSE_OPENGL",
"-D__DARWIN_64_BIT_INO_T=1",
"-DMOUSEWRAPPER",
"-DNOKEYBOARD",
);
PRESERVE_DEAD_CODE_INITS_AND_TERMS = YES;
PRODUCT_NAME = "Commander Genius";
......
......@@ -55,25 +55,22 @@ void CSaveMenu::processSpecific()
}
else
{
// TODO: better default slot name (more intelligent describing name)
mp_Dialog->m_name = "Slot" + itoa(m_selection);
mp_Dialog->m_length = 15;
#ifndef NOKEYBOARD
mp_Dialog->m_name = "";
mp_Dialog->setInputMode(INPUT_MODE_TEXT);
#else
mp_Dialog->m_name = " ";
// save right away
goto saveSelection;
#endif
mp_Dialog->m_length = 15;
mp_Dialog->setInputMode(INPUT_MODE_TEXT);
}
}
else if ( mp_Dialog->getInputMode(INPUT_MODE_TEXT) &&
(g_pInput->getPressedKey(KENTER) || g_pInput->getPressedCommand(IC_JUMP) || g_pInput->getPressedCommand(IC_STATUS) ) )
{
#ifndef NOKEYBOARD
if(mp_Dialog->m_name == "")
#else
if(mp_Dialog->m_name == " ")
#endif
mp_Dialog->m_name = "Slot" + itoa(m_selection);
saveSelection:
mp_Dialog->setObjectText(m_selection, mp_Dialog->m_name);
m_SavedGame.prepareSaveGame(m_selection+1, mp_Dialog->m_name);
......
......@@ -198,6 +198,8 @@ void CDialog::processInput(int move)
m_cursorpos += 1;
if(m_cursorpos > m_length)
m_cursorpos = 0;
if(m_cursorpos >= m_name.length())
m_name.resize(m_cursorpos + 1, ' ');
m_curletter = m_name.at(m_cursorpos);
}
else if(g_pInput->getPressedKey(KLEFT))
......
......@@ -328,11 +328,7 @@ void CHighScores::writeHighScoreCommon(int score)
else
m_Score[m_Place] = "*MAX*";
#ifndef NOKEYBOARD
m_Name[m_Place] = "";
#else
m_Name[m_Place] = " ";
#endif
}
bool CHighScores::loadHighScoreTable()
......
......@@ -1020,8 +1020,8 @@ static TouchButton* getPhoneButtons(stInputCommand InputCommand[NUM_INPUTS][MAX_
{ &InputCommand[0][IC_STATUS], KENTER, 0, 0, w/2, h/4},
{ &InputCommand[0][IC_QUIT], KQUIT, 5*w/6, 0, w/6, h/6},
{ NULL, KSHOWHIDECTRLS, 4*w/6, 0, w/6, h/6},
{ NULL, KF3 /* save dialog, see gamedo_HandleFKeys */, 3*w/6, 0, w/6, h/6},
};
// { NULL, KF3 /* save dialog, see gamedo_HandleFKeys */, 3*w/6, 0, w/6, h/6},
};
return phoneButtons;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment