有人可以解释一下这些代码的作用吗?这只是代码的一部分......
// Create the window of the application
sf::RenderWindow myWindow(sf::VideoMode(myWorldWidth, myWorldHeight, 32), "Battleship!");
myWindow.setVerticalSyncEnabled(true);
bool showHardwareMouse;
bool started;
bool drag;
float dragOffsetX, dragOffsetY;
bool LeftMouseButtonDown = false;
bool reset = true;
//----- Main Loop Start here -----
while (myWindow.isOpen())
{
if (reset)
{
// Reset
showHardwareMouse = true;
drag = false;
dragOffsetX = dragOffsetY = 0.0f;
started = true;
reset = false;
}
该程序实际上是基于SFML库的,dragOffsetX = dragOffsetY = 0.0f; 方法?
这就是程序的实际工作方式...... http://i1146.photobucket.com/albums/o530/HTHVampire/C%20plus%20plus/Capture2_zps1fe188cd.jpg
如果你们不能得到它,我会发布它的完整代码。谢谢!