1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-12-22 00:27:58 +02:00

Fixed issues reported by Zamolxis:

* dismiss Hero works blocked in the castles
* the backpack scrollable arrows aren't available (yellow, clickable) even when backpack is empty.
* added missing info texts for buttons in hero window (and added functionality of enable tactic formations button)
* can select (single click) and enter castle (double click) from the map. Same for hero.
* Hero gets automatically selected after End Turn 
* Hero is automatically selected when exiting town
* In Garrison or Hero army: units are selected when we first click on them
Fixed (at least partially) also a problem with disappearing path
This commit is contained in:
Michał W. Urbańczyk
2008-08-28 17:36:34 +00:00
parent e856ad21a9
commit 7722d058f0
17 changed files with 428 additions and 282 deletions

View File

@@ -88,8 +88,8 @@ void CScriptCallback::showSelectionDialog(SelectionDialog *iw, const CFunctionLi
int CScriptCallback::getSelectedHero()
{
//int ret;
//if (LOCPLINT->adventureInt->selection.type == HEROI_TYPE)
// ret = ((CGHeroInstance*)(LOCPLINT->adventureInt->selection.selected))->subID;
//if (LOCPLINT->adventureInt->selection->ID == HEROI_TYPE)
// ret = ((CGHeroInstance*)(LOCPLINT->adventureInt->selection))->subID;
//else
// ret = -1;;
return -1;
@@ -214,8 +214,8 @@ int CLuaCallback::getGnrlText(lua_State * L) //(int which),returns string
int CLuaCallback::getSelectedHero(lua_State * L) //(),returns int (ID of hero, -1 if no hero is seleceted)
{
//int ret;
//if (LOCPLINT->adventureInt->selection.type == HEROI_TYPE)
// ret = ((CGHeroInstance*)(LOCPLINT->adventureInt->selection.selected))->subID;
//if (LOCPLINT->adventureInt->selection->ID == HEROI_TYPE)
// ret = ((CGHeroInstance*)(LOCPLINT->adventureInt->selection))->subID;
//else
// ret = -1;
//lua_pushinteger(L,ret);