Add highlighted target region for dissecting images.
This commit is contained in:
parent
f659e3267b
commit
67cf8515a8
@ -86,7 +86,10 @@ public:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
vf2d upperLeft={-1,-1};
|
||||||
|
vf2d lowerRight={-1,-1};
|
||||||
|
bool cabDetected=false;
|
||||||
|
bool dragging=false;
|
||||||
bool OnUserUpdate(float fElapsedTime) override
|
bool OnUserUpdate(float fElapsedTime) override
|
||||||
{
|
{
|
||||||
// Called once per frame, draws random coloured pixels
|
// Called once per frame, draws random coloured pixels
|
||||||
@ -98,6 +101,23 @@ public:
|
|||||||
frameView-=fElapsedTime*60;
|
frameView-=fElapsedTime*60;
|
||||||
UpdateScreen();
|
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;
|
return true;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
BIN
OpenCVVideoParser/samples/clearscreen.png
Normal file
BIN
OpenCVVideoParser/samples/clearscreen.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 182 KiB |
BIN
OpenCVVideoParser/samples/scorescreen.png
Normal file
BIN
OpenCVVideoParser/samples/scorescreen.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 227 KiB |
BIN
OpenCVVideoParser/samples/songend.png
Normal file
BIN
OpenCVVideoParser/samples/songend.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 152 KiB |
BIN
OpenCVVideoParser/samples/songselect.png
Normal file
BIN
OpenCVVideoParser/samples/songselect.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 147 KiB |
BIN
OpenCVVideoParser/samples/songstart.png
Normal file
BIN
OpenCVVideoParser/samples/songstart.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 158 KiB |
BIN
OpenCVVideoParser/samples/stagepopup.png
Normal file
BIN
OpenCVVideoParser/samples/stagepopup.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 173 KiB |
Loading…
x
Reference in New Issue
Block a user