mirror of
https://github.com/vcmi/vcmi.git
synced 2025-07-15 01:24:45 +02:00
- first part of CIntObject API clean-up.
- - mostly remove usage of (de)activateSomething functions - - CIntObject's can be safely deleted in active state or without removing from parent first - - Added CWindowObject to use as base of all windows (will be required for such features as shadows) Report any crashes or glitches - it should not cause any issues apart from more console output. TODO: - remove redundant (de)activate and show(All) calls - decrease usage of blitAtLoc\printAtLoc methods - switch all windows to new base
This commit is contained in:
@ -83,7 +83,7 @@ CHeroSwitcher::CHeroSwitcher(Point _pos, const CGHeroInstance * _hero):
|
||||
{
|
||||
OBJ_CONSTRUCTION_CAPTURING_ALL;
|
||||
pos += _pos;
|
||||
used = LCLICK;
|
||||
addUsedEvents(LCLICK);
|
||||
|
||||
image = new CAnimImage("PortraitsSmall", hero->portrait);
|
||||
pos.w = image->pos.w;
|
||||
@ -210,15 +210,10 @@ void CHeroWindow::update(const CGHeroInstance * hero, bool redrawNeeded /*= fals
|
||||
}
|
||||
|
||||
int serial = LOCPLINT->cb->getHeroSerial(curHero, false);
|
||||
if (listSelection && active)
|
||||
listSelection->deactivate();
|
||||
delChildNUll(listSelection);
|
||||
|
||||
vstd::clear_pointer(listSelection);
|
||||
if (serial >= 0)
|
||||
{
|
||||
listSelection = new CPicture("HPSYYY", 612, 33 + serial * 54);
|
||||
if (active)
|
||||
listSelection->activate();
|
||||
}
|
||||
}
|
||||
|
||||
//primary skills support
|
||||
|
Reference in New Issue
Block a user