diff --git a/OpenCVVideoParser/main.cpp b/OpenCVVideoParser/main.cpp index c996549..945d8b5 100644 --- a/OpenCVVideoParser/main.cpp +++ b/OpenCVVideoParser/main.cpp @@ -86,7 +86,10 @@ public: } } } - + vf2d upperLeft={-1,-1}; + vf2d lowerRight={-1,-1}; + bool cabDetected=false; + bool dragging=false; bool OnUserUpdate(float fElapsedTime) override { // Called once per frame, draws random coloured pixels @@ -98,6 +101,23 @@ public: frameView-=fElapsedTime*60; UpdateScreen(); } + if(!cabDetected){ + DrawString({4,ScreenHeight()-40},"Drag over the region where the cab's screen is located.\n (Make sure the entire cabinet screen is covered)",WHITE,2); + SetPixelMode(Pixel::ALPHA); + FillRectDecal(upperLeft,lowerRight-upperLeft,{255,255,255,128}); + } + if(GetMouse(Mouse::LEFT).bPressed){ + if(!dragging){ + upperLeft=GetMousePos(); + dragging=true; + } + } + if(GetMouse(Mouse::LEFT).bHeld){ + lowerRight=GetMousePos(); + } + if(GetMouse(Mouse::LEFT).bReleased){ + dragging=false; + } return true; } }; diff --git a/OpenCVVideoParser/samples/clearscreen.png b/OpenCVVideoParser/samples/clearscreen.png new file mode 100644 index 0000000..382d53c Binary files /dev/null and b/OpenCVVideoParser/samples/clearscreen.png differ diff --git a/OpenCVVideoParser/samples/scorescreen.png b/OpenCVVideoParser/samples/scorescreen.png new file mode 100644 index 0000000..66b8075 Binary files /dev/null and b/OpenCVVideoParser/samples/scorescreen.png differ diff --git a/OpenCVVideoParser/samples/songend.png b/OpenCVVideoParser/samples/songend.png new file mode 100644 index 0000000..7378682 Binary files /dev/null and b/OpenCVVideoParser/samples/songend.png differ diff --git a/OpenCVVideoParser/samples/songselect.png b/OpenCVVideoParser/samples/songselect.png new file mode 100644 index 0000000..fef63d6 Binary files /dev/null and b/OpenCVVideoParser/samples/songselect.png differ diff --git a/OpenCVVideoParser/samples/songstart.png b/OpenCVVideoParser/samples/songstart.png new file mode 100644 index 0000000..3e5bc85 Binary files /dev/null and b/OpenCVVideoParser/samples/songstart.png differ diff --git a/OpenCVVideoParser/samples/stagepopup.png b/OpenCVVideoParser/samples/stagepopup.png new file mode 100644 index 0000000..14015cf Binary files /dev/null and b/OpenCVVideoParser/samples/stagepopup.png differ