Commit 69080729 authored by Gerhard Stein's avatar Gerhard Stein Committed by Gerhard Stein

Small fix

Small fixes
parent f1d8584c
......@@ -263,8 +263,6 @@ void CSDLVideo::transformScreenToDisplay()
mainDstrect.x = mActiveAreaRect.x;
mainDstrect.y = mActiveAreaRect.y;
//mainDstrect.w = m_VidConfig.mDisplayRect.w*m_VidConfig.m_ScaleXFilter;
//mainDstrect.h = m_VidConfig.mDisplayRect.h*m_VidConfig.m_ScaleXFilter;
mainDstrect.w = mActiveAreaRect.w;
mainDstrect.h = mActiveAreaRect.h;
......@@ -295,13 +293,11 @@ void CSDLVideo::transformScreenToDisplay()
{
SDL_Rect dstSDL = dst.SDLRect();
RenderCopy(renderer, texture, nullptr, &dstSDL);
// Transfrom the coordinates for the final screen.
/*dstSDL.y = (dstSDL.y*finalWindowSize.h)/mActiveAreaRect.h;
dstSDL.x = (dstSDL.x*finalWindowSize.x)/mActiveAreaRect.w;
dstSDL.y += mActiveAreaRect.y;
dstSDL.x += mActiveAreaRect.x;
RenderCopy(renderer, texture, nullptr, &dstSDL);*/
RenderCopy(renderer, texture, nullptr, &dstSDL);
}
}
else
......
......@@ -92,6 +92,19 @@ bool VirtualKeenControl::ponder()
mDPad.mTexture.setAlpha(uint8_t(255.0f*mTranslucency));
}
if(!mConfirmButton.invisible)
{
const float buttonSize = 0.1f;
const GsRect<float> confirmRect(1.0f-2.0f*buttonSize,
1.0f-2.0f*buttonSize,
buttonSize, buttonSize);
mConfirmButton.setRect(confirmRect);
mConfirmButton.mTexture.setAlpha(uint8_t(255.0f*mTranslucency));
}
#endif
return true;
......@@ -112,32 +125,37 @@ void VirtualKeenControl::render(GsWeakSurface &sfc)
addTexture(mDPad);
/*
addTexture(mStatusButton);
//addTexture(mStatusButton);
if(mButtonMode == BUTTON_MODE::OK)
{
addTexture(mConfirmButton);
}
if(mButtonMode == BUTTON_MODE::WMAP &&
/*if(mButtonMode == BUTTON_MODE::WMAP &&
!mHideStartButton)
{
addTexture(mStartButton);
addTexture(mStatusButton);
}*/
/*
}
if(mButtonMode == BUTTON_MODE::ACTION)
{
addTexture(mShootButton);
addTexture(mJumpButton);
addTexture(mPogoButton);
}
*/
/*
// On map, show the start button if keen approaches a level
if(mButtonMode == BUTTON_MODE::WMAP && !mHideStartButton)
{
const float buttonSize = 0.1f;
const Uint16 width = clickGameArea.w * buttonSize;
const Uint16 height = clickGameArea.h * buttonSize;
const Uint16 height = clickGameArea.h * buttonSize;
const GsRect<Uint16> confirmRect(clickGameArea.w-2*width, clickGameArea.h-2*height, width, height);
mStartButtonTexture.setAlpha(uint8_t(255.0f*mTranslucency));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment