Redo touch controls

This commit is contained in:
elasota
2020-10-15 01:14:10 -04:00
parent 1e1c91915a
commit e1c83d7b47
4 changed files with 2 additions and 11 deletions

View File

@@ -366,7 +366,6 @@ namespace TouchScreenCtrlIDs
{
enum TouchScreenCtrlID
{
Flip,
Bands,
BatteryHelium,
Movement,

View File

@@ -369,9 +369,6 @@ void GetInput (gliderPtr thisGlider)
touchRightState = true;
}
break;
case TouchScreenCtrlIDs::Flip:
holdFlipState = true;
break;
case TouchScreenCtrlIDs::Bands:
bandsState = true;
break;

View File

@@ -567,9 +567,8 @@ void ResetTouchScreenControlBounds (void)
Point sizes[TouchScreenCtrlIDs::Count];
points[TouchScreenCtrlIDs::Movement] = Point::Create(mainWindowRect.left, mainWindowRect.top);
points[TouchScreenCtrlIDs::BatteryHelium] = Point::Create(mainWindowRect.right - touchScreenControlEdgeSpacing - touchScreenControlSize, mainWindowRect.bottom - touchScreenControlEdgeSpacing - touchScreenControlSize);
points[TouchScreenCtrlIDs::Flip] = points[TouchScreenCtrlIDs::BatteryHelium] + Point::Create(0, -touchScreenControlInterSpacing - touchScreenControlSize);
points[TouchScreenCtrlIDs::Bands] = points[TouchScreenCtrlIDs::BatteryHelium] + Point::Create(-touchScreenControlInterSpacing - touchScreenControlSize, 0);
points[TouchScreenCtrlIDs::BatteryHelium] = Point::Create(mainWindowRect.left + touchScreenControlEdgeSpacing, mainWindowRect.top + touchScreenControlEdgeSpacing);
points[TouchScreenCtrlIDs::Bands] = Point::Create(mainWindowRect.right - touchScreenControlEdgeSpacing - touchScreenControlSize, mainWindowRect.top + touchScreenControlEdgeSpacing);
for (int i = 0; i < TouchScreenCtrlIDs::Count; i++)
sizes[i] = Point::Create(touchScreenControlSize, touchScreenControlSize);
@@ -625,7 +624,6 @@ void PlayGame (void)
InitTouchScreenControlState();
touchScreen.controls[TouchScreenCtrlIDs::Movement].isEnabled = true;
touchScreen.controls[TouchScreenCtrlIDs::Flip].isEnabled = true;
touchScreen.controls[TouchScreenCtrlIDs::Bands].isEnabled = true;
touchScreen.controls[TouchScreenCtrlIDs::BatteryHelium].isEnabled = true;

View File

@@ -616,7 +616,6 @@ void RenderTouchScreenControls (void)
ctrlGraphics[i] = nullptr;
ctrlGraphics[TouchScreenCtrlIDs::Movement] = nullptr;
ctrlGraphics[TouchScreenCtrlIDs::Flip] = touchScreen.graphics[touchScreenControlGraphics::FlipIdle];
ctrlGraphics[TouchScreenCtrlIDs::Bands] = touchScreen.graphics[touchScreenControlGraphics::BandsDisabled];
ctrlGraphics[TouchScreenCtrlIDs::BatteryHelium] = touchScreen.graphics[touchScreenControlGraphics::BatteryDisabled];
@@ -642,8 +641,6 @@ void RenderTouchScreenControls (void)
if (bandsTotal > 0)
ctrlGraphics[TouchScreenCtrlIDs::Bands] = touchScreen.graphics[touchScreenControlGraphics::BandsActive];
}
else if (touchScreen.fingers[i].capturingControl == TouchScreenCtrlIDs::Flip)
ctrlGraphics[TouchScreenCtrlIDs::Flip] = touchScreen.graphics[touchScreenControlGraphics::FlipActive];
}
for (int i = 0; i < TouchScreenCtrlIDs::Count; i++)