mirror of
https://github.com/vcmi/vcmi.git
synced 2025-02-17 13:41:07 +02:00
commit
4695c88705
@ -26,7 +26,7 @@ android {
|
||||
minSdk = qtMinSdkVersion as Integer
|
||||
targetSdk = qtTargetSdkVersion as Integer // ANDROID_TARGET_SDK_VERSION in the CMake project
|
||||
|
||||
versionCode 1533
|
||||
versionCode 1535
|
||||
versionName "1.5.3"
|
||||
|
||||
setProperty("archivesBaseName", "vcmi")
|
||||
|
@ -1225,13 +1225,14 @@ void CPlayerInterface::loadGame( BinaryDeserializer & h )
|
||||
|
||||
void CPlayerInterface::moveHero( const CGHeroInstance *h, const CGPath& path )
|
||||
{
|
||||
LOG_TRACE(logGlobal);
|
||||
if (!LOCPLINT->makingTurn)
|
||||
return;
|
||||
|
||||
assert(h);
|
||||
assert(!showingDialog->isBusy());
|
||||
assert(dialogs.empty());
|
||||
|
||||
LOG_TRACE(logGlobal);
|
||||
if (!LOCPLINT->makingTurn)
|
||||
return;
|
||||
if (!h)
|
||||
return; //can't find hero
|
||||
|
||||
|
@ -168,7 +168,7 @@ void PlayerLocalState::setSelection(const CArmedInstance * selection)
|
||||
|
||||
currentSelection = selection;
|
||||
|
||||
if (selection)
|
||||
if (adventureInt && selection)
|
||||
adventureInt->onSelectionChanged(selection);
|
||||
}
|
||||
|
||||
@ -212,6 +212,9 @@ void PlayerLocalState::addWanderingHero(const CGHeroInstance * hero)
|
||||
assert(hero);
|
||||
assert(!vstd::contains(wanderingHeroes, hero));
|
||||
wanderingHeroes.push_back(hero);
|
||||
|
||||
if (currentSelection == nullptr)
|
||||
setSelection(hero);
|
||||
}
|
||||
|
||||
void PlayerLocalState::removeWanderingHero(const CGHeroInstance * hero)
|
||||
@ -260,6 +263,9 @@ void PlayerLocalState::addOwnedTown(const CGTownInstance * town)
|
||||
assert(town);
|
||||
assert(!vstd::contains(ownedTowns, town));
|
||||
ownedTowns.push_back(town);
|
||||
|
||||
if (currentSelection == nullptr)
|
||||
setSelection(town);
|
||||
}
|
||||
|
||||
void PlayerLocalState::removeOwnedTown(const CGTownInstance * town)
|
||||
|
@ -395,8 +395,6 @@ void AdventureMapInterface::adjustActiveness()
|
||||
|
||||
void AdventureMapInterface::onCurrentPlayerChanged(PlayerColor playerID)
|
||||
{
|
||||
LOCPLINT->localState->setSelection(nullptr);
|
||||
|
||||
if (playerID == currentPlayerID)
|
||||
return;
|
||||
|
||||
|
@ -1263,8 +1263,8 @@ CCastleInterface::CCastleInterface(const CGTownInstance * Town, const CGTownInst
|
||||
resdatabar = std::make_shared<CResDataBar>(ImagePath::builtin("ARESBAR"), 3, 575, 37, 3, 84, 78);
|
||||
|
||||
townlist = std::make_shared<CTownList>(3, Rect(Point(743, 414), Point(48, 128)), Point(1,16), Point(0, 32), LOCPLINT->localState->getOwnedTowns().size() );
|
||||
townlist->setScrollUpButton( std::make_shared<CButton>( Point(744, 414), AnimationPath::builtin("IAM014"), CButton::tooltipLocalized("core.help.306"), 0, EShortcut::MOVE_UP));
|
||||
townlist->setScrollDownButton( std::make_shared<CButton>( Point(744, 526), AnimationPath::builtin("IAM015"), CButton::tooltipLocalized("core.help.307"), 0, EShortcut::MOVE_DOWN));
|
||||
townlist->setScrollUpButton( std::make_shared<CButton>( Point(744, 414), AnimationPath::builtin("IAM014"), CButton::tooltipLocalized("core.help.306"), 0));
|
||||
townlist->setScrollDownButton( std::make_shared<CButton>( Point(744, 526), AnimationPath::builtin("IAM015"), CButton::tooltipLocalized("core.help.307"), 0));
|
||||
|
||||
if(from)
|
||||
townlist->select(from);
|
||||
@ -1399,6 +1399,12 @@ void CCastleInterface::keyPressed(EShortcut key)
|
||||
{
|
||||
switch(key)
|
||||
{
|
||||
case EShortcut::MOVE_UP:
|
||||
townlist->selectPrev();
|
||||
break;
|
||||
case EShortcut::MOVE_DOWN:
|
||||
townlist->selectNext();
|
||||
break;
|
||||
case EShortcut::TOWN_OPEN_FORT:
|
||||
GH.windows().createAndPushWindow<CFortScreen>(town);
|
||||
break;
|
||||
|
Loading…
x
Reference in New Issue
Block a user