mirror of
https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git
synced 2025-07-19 11:49:09 +00:00
OpProgress: only skip space if we drew something
This commit is contained in:
@ -138,9 +138,7 @@ void plDTProgressMgr::Draw( plPipeline *p )
|
|||||||
width = scrnWidth - 64;
|
width = scrnWidth - 64;
|
||||||
height = 16;
|
height = 16;
|
||||||
x = ( scrnWidth - width ) >> 1;
|
x = ( scrnWidth - width ) >> 1;
|
||||||
y = scrnHeight - 32 - height;
|
y = scrnHeight - 44 - (2 * height) - text.GetFontSize();
|
||||||
if( fOperations->GetNext() == nil )
|
|
||||||
y -= text.GetFontSize() + 8 + height + 4;
|
|
||||||
|
|
||||||
|
|
||||||
text.SetDrawOnTopMode( true );
|
text.SetDrawOnTopMode( true );
|
||||||
@ -166,8 +164,8 @@ void plDTProgressMgr::Draw( plPipeline *p )
|
|||||||
|
|
||||||
for( prog = fOperations; prog != nil; prog = prog->GetNext() )
|
for( prog = fOperations; prog != nil; prog = prog->GetNext() )
|
||||||
{
|
{
|
||||||
IDrawTheStupidThing( p, prog, x, y, width, height );
|
if (IDrawTheStupidThing(p, prog, x, y, width, height))
|
||||||
y -= text.GetFontSize() + 8 + height + 4;
|
y -= text.GetFontSize() + 8 + height + 4;
|
||||||
}
|
}
|
||||||
|
|
||||||
text.SetDrawOnTopMode( false );
|
text.SetDrawOnTopMode( false );
|
||||||
@ -175,10 +173,11 @@ void plDTProgressMgr::Draw( plPipeline *p )
|
|||||||
|
|
||||||
//// IDrawTheStupidThing /////////////////////////////////////////////////////
|
//// IDrawTheStupidThing /////////////////////////////////////////////////////
|
||||||
|
|
||||||
void plDTProgressMgr::IDrawTheStupidThing( plPipeline *p, plOperationProgress *prog,
|
bool plDTProgressMgr::IDrawTheStupidThing(plPipeline *p, plOperationProgress *prog,
|
||||||
uint16_t x, uint16_t y, uint16_t width, uint16_t height )
|
uint16_t x, uint16_t y, uint16_t width, uint16_t height)
|
||||||
{
|
{
|
||||||
plDebugText &text = plDebugText::Instance();
|
plDebugText &text = plDebugText::Instance();
|
||||||
|
bool drew_something = false;
|
||||||
|
|
||||||
// Lets just set the color to blue
|
// Lets just set the color to blue
|
||||||
uint32_t color = 0xff302b3a;
|
uint32_t color = 0xff302b3a;
|
||||||
@ -226,26 +225,34 @@ void plDTProgressMgr::IDrawTheStupidThing( plPipeline *p, plOperationProgress
|
|||||||
|
|
||||||
x -= 2;
|
x -= 2;
|
||||||
y -= 2;
|
y -= 2;
|
||||||
|
drew_something = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
y -= ( text.GetFontSize() << 1 ) + 4;
|
y -= ( text.GetFontSize() << 1 ) + 4;
|
||||||
|
|
||||||
#ifndef PLASMA_EXTERNAL_RELEASE
|
#ifndef PLASMA_EXTERNAL_RELEASE
|
||||||
bool drawText = true;
|
static bool drawText = true;
|
||||||
#else
|
#else
|
||||||
bool drawText = false;
|
static bool drawText = false;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (drawText)
|
if (drawText)
|
||||||
{
|
{
|
||||||
if( prog->GetTitle()[ 0 ] != 0 )
|
if (prog->GetTitle())
|
||||||
{
|
{
|
||||||
text.DrawString( x, y, prog->GetTitle(), (uint32_t)0xccb0b0b0 );
|
text.DrawString( x, y, prog->GetTitle(), (uint32_t)0xccb0b0b0 );
|
||||||
x += (uint16_t)text.CalcStringWidth( prog->GetTitle() );
|
x += (uint16_t)text.CalcStringWidth( prog->GetTitle() );
|
||||||
|
drew_something = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if( prog->GetStatusText()[ 0 ] != 0 )
|
if (prog->GetStatusText())
|
||||||
|
{
|
||||||
text.DrawString( x, y, prog->GetStatusText(), (uint32_t)0xccb0b0b0 );
|
text.DrawString( x, y, prog->GetStatusText(), (uint32_t)0xccb0b0b0 );
|
||||||
|
drew_something = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// return whether or not we drew stuff
|
||||||
|
return drew_something;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -61,7 +61,7 @@ class plPipeline;
|
|||||||
class plDTProgressMgr : public plProgressMgr
|
class plDTProgressMgr : public plProgressMgr
|
||||||
{
|
{
|
||||||
protected:
|
protected:
|
||||||
int32_t fCurrentImage;
|
int32_t fCurrentImage;
|
||||||
float fLastDraw;
|
float fLastDraw;
|
||||||
plPlate* fActivePlate;
|
plPlate* fActivePlate;
|
||||||
plPlate* fStaticTextPlate;
|
plPlate* fStaticTextPlate;
|
||||||
@ -70,8 +70,8 @@ class plDTProgressMgr : public plProgressMgr
|
|||||||
void Activate();
|
void Activate();
|
||||||
void Deactivate();
|
void Deactivate();
|
||||||
|
|
||||||
void IDrawTheStupidThing( plPipeline *p, plOperationProgress *prog,
|
bool IDrawTheStupidThing( plPipeline *p, plOperationProgress *prog,
|
||||||
uint16_t x, uint16_t y, uint16_t width, uint16_t height );
|
uint16_t x, uint16_t y, uint16_t width, uint16_t height );
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user