mirror of
https://github.com/vcmi/vcmi.git
synced 2025-01-30 04:30:42 +02:00
Fixed #740
This commit is contained in:
parent
56bf3dc8ab
commit
d29850a2fa
@ -129,6 +129,9 @@ void CCreatureWindow::init(const CStackInstance *Stack, const CBonusSystemNode *
|
|||||||
stackNode = StackNode;
|
stackNode = StackNode;
|
||||||
heroOwner = HeroOwner;
|
heroOwner = HeroOwner;
|
||||||
|
|
||||||
|
if (Stack->count)
|
||||||
|
count = boost::lexical_cast<std::string>(Stack->count);
|
||||||
|
|
||||||
//Basic graphics - need to calculate size
|
//Basic graphics - need to calculate size
|
||||||
|
|
||||||
BonusList bl, blTemp;
|
BonusList bl, blTemp;
|
||||||
@ -326,16 +329,19 @@ void CCreatureWindow::showAll(SDL_Surface * to)
|
|||||||
{
|
{
|
||||||
CIntObject::showAll(to);
|
CIntObject::showAll(to);
|
||||||
|
|
||||||
count = boost::lexical_cast<std::string>(stack->count);
|
//count = boost::lexical_cast<std::string>(stack->count);
|
||||||
if (count.size()) //TODO
|
//if (count.size()) //TODO
|
||||||
printTo(count, 117, 174, FONT_SMALL, tytulowy,*bitmap);
|
// printTo(count, 117, 174, FONT_SMALL, tytulowy,*bitmap);
|
||||||
|
if(count.size())
|
||||||
|
printTo(count.c_str(), pos.x+114, pos.y+174, FONT_TIMES, zwykly, to);
|
||||||
|
|
||||||
printAtMiddle(c->namePl, 180, 30, FONT_SMALL, tytulowy,*bitmap); //creature name
|
printAtMiddle(c->namePl, 180, 30, FONT_SMALL, tytulowy,*bitmap); //creature name
|
||||||
|
|
||||||
printLine(0, CGI->generaltexth->primarySkillNames[0], c->valOfBonuses(Bonus::PRIMARY_SKILL, PrimarySkill::ATTACK), stackNode->Attack());
|
printLine(0, CGI->generaltexth->primarySkillNames[0], c->valOfBonuses(Bonus::PRIMARY_SKILL, PrimarySkill::ATTACK), stackNode->Attack());
|
||||||
printLine(1, CGI->generaltexth->primarySkillNames[1], c->valOfBonuses(Bonus::PRIMARY_SKILL, PrimarySkill::DEFENSE), stackNode->Defense());
|
printLine(1, CGI->generaltexth->primarySkillNames[1], c->valOfBonuses(Bonus::PRIMARY_SKILL, PrimarySkill::DEFENSE), stackNode->Defense());
|
||||||
|
|
||||||
if(stackNode->valOfBonuses(Bonus::SHOTS) && stackNode->hasBonusOfType(Bonus::SHOOTER)) //only for shooting units - important with wog exp shooters
|
if(stackNode->valOfBonuses(Bonus::SHOTS) && stackNode->hasBonusOfType(Bonus::SHOOTER)) //only for shooting units - important with wog exp shooters
|
||||||
printLine(2, CGI->generaltexth->allTexts[198], stackNode->valOfBonuses(Bonus::SHOTS));
|
printLine(2, CGI->generaltexth->allTexts[198], stackNode->valOfBonuses(Bonus::SHOTS)); //TODO: change shot count for battle stack
|
||||||
|
|
||||||
//TODO
|
//TODO
|
||||||
int dmgMultiply = 1;
|
int dmgMultiply = 1;
|
||||||
@ -350,6 +356,13 @@ void CCreatureWindow::showAll(SDL_Surface * to)
|
|||||||
b->showAll (to);
|
b->showAll (to);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CCreatureWindow::show(SDL_Surface * to)
|
||||||
|
{
|
||||||
|
if (count.size()) //army stack
|
||||||
|
printTo(count, pos.x + 114, pos.y + 174,FONT_TIMES, zwykly, to);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void CCreatureWindow::sliderMoved(int newpos)
|
void CCreatureWindow::sliderMoved(int newpos)
|
||||||
{
|
{
|
||||||
recreateSkillList(newpos); //move components
|
recreateSkillList(newpos); //move components
|
||||||
|
@ -56,6 +56,7 @@ public:
|
|||||||
CCreatureWindow(int Cid, int Type, int creatureCount); //c-tor
|
CCreatureWindow(int Cid, int Type, int creatureCount); //c-tor
|
||||||
void init(const CStackInstance *stack, const CBonusSystemNode *stackNode, const CGHeroInstance *heroOwner);
|
void init(const CStackInstance *stack, const CBonusSystemNode *stackNode, const CGHeroInstance *heroOwner);
|
||||||
void showAll(SDL_Surface * to);
|
void showAll(SDL_Surface * to);
|
||||||
|
void show(SDL_Surface * to);
|
||||||
void printLine(int nr, const std::string &text, int baseVal, int val=-1, bool range=false);
|
void printLine(int nr, const std::string &text, int baseVal, int val=-1, bool range=false);
|
||||||
void recreateSkillList(int pos);
|
void recreateSkillList(int pos);
|
||||||
~CCreatureWindow(); //d-tor
|
~CCreatureWindow(); //d-tor
|
||||||
|
Loading…
x
Reference in New Issue
Block a user