|
|
|
@ -540,6 +540,9 @@ CCtrlDraggable(param)
|
|
|
|
|
_SapBuffIcon = "ico_sap.tga";
|
|
|
|
|
_StaBuffIcon = "ico_stamina.tga";
|
|
|
|
|
_FocusBuffIcon = "ico_focus.tga";
|
|
|
|
|
|
|
|
|
|
_RegenText = NULL;
|
|
|
|
|
_RegenTextValue = 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
@ -564,6 +567,11 @@ CDBCtrlSheet::~CDBCtrlSheet()
|
|
|
|
|
Driver->deleteTextureFile(_GuildSymb);
|
|
|
|
|
_GuildSymb = NULL;
|
|
|
|
|
}
|
|
|
|
|
if (_RegenText)
|
|
|
|
|
{
|
|
|
|
|
delete _RegenText;
|
|
|
|
|
_RegenText = NULL;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ensure erase static
|
|
|
|
|
if(this==_CurrMenuSheet) _CurrMenuSheet = NULL;
|
|
|
|
@ -2039,6 +2047,12 @@ void CDBCtrlSheet::draw()
|
|
|
|
|
if (!_LastSheetId)
|
|
|
|
|
{
|
|
|
|
|
_RegenTickRange = CTickRange();
|
|
|
|
|
if (_RegenText)
|
|
|
|
|
{
|
|
|
|
|
delete _RegenText;
|
|
|
|
|
_RegenText = NULL;
|
|
|
|
|
_RegenTextValue = 0;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
@ -2065,6 +2079,36 @@ void CDBCtrlSheet::draw()
|
|
|
|
|
{
|
|
|
|
|
rVR.drawQuad(_RenderLayer + 1, regenTris[tri], backTex, CRGBA::White, false);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (!_RegenText) {
|
|
|
|
|
_RegenText = new CViewText(CViewBase::TCtorParam());
|
|
|
|
|
_RegenText->setId(getId() + ":regen");
|
|
|
|
|
_RegenText->setParent(_Parent);
|
|
|
|
|
_RegenText->setOverflowText(ucstring(""));
|
|
|
|
|
_RegenText->setModulateGlobalColor(false);
|
|
|
|
|
_RegenText->setMultiLine(false);
|
|
|
|
|
_RegenText->setTextMode(CViewText::ClipWord);
|
|
|
|
|
_RegenText->setFontSizing("0", "0");
|
|
|
|
|
// TODO: font size / color hardcoded.
|
|
|
|
|
_RegenText->setFontSize(8);
|
|
|
|
|
_RegenText->setColor(CRGBA::White);
|
|
|
|
|
_RegenText->setShadow(true);
|
|
|
|
|
_RegenText->setActive(true);
|
|
|
|
|
_RegenText->updateTextContext();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// TODO: ticks in second hardcoded
|
|
|
|
|
uint32 nextValue = _RegenTickRange.EndTick > LastGameCycle ? (_RegenTickRange.EndTick - LastGameCycle) / 10 : 0;
|
|
|
|
|
if (_RegenTextValue != nextValue)
|
|
|
|
|
{
|
|
|
|
|
_RegenTextValue = nextValue;
|
|
|
|
|
_RegenText->setText(toString("%d", _RegenTextValue));
|
|
|
|
|
_RegenText->updateTextContext();
|
|
|
|
|
}
|
|
|
|
|
_RegenText->setXReal(_XReal+1);
|
|
|
|
|
_RegenText->setYReal(_YReal+2);
|
|
|
|
|
_RegenText->setRenderLayer(_RenderLayer+2);
|
|
|
|
|
_RegenText->draw();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|