Removed incorrect mouse
This commit is contained in:
@@ -10,7 +10,7 @@ public:
|
|||||||
Globals(void);
|
Globals(void);
|
||||||
~Globals(void);
|
~Globals(void);
|
||||||
static DataModelInstance* dataModel;
|
static DataModelInstance* dataModel;
|
||||||
static bool showMouse;
|
//static bool showMouse;
|
||||||
static POINT mousepoint;
|
static POINT mousepoint;
|
||||||
static bool useMousePoint;
|
static bool useMousePoint;
|
||||||
static const int gen;
|
static const int gen;
|
||||||
|
|||||||
@@ -26,9 +26,9 @@ public:
|
|||||||
virtual void onMouseScroll(Mouse);//Kinda
|
virtual void onMouseScroll(Mouse);//Kinda
|
||||||
virtual void onKeyDown(int);//yes
|
virtual void onKeyDown(int);//yes
|
||||||
virtual void onKeyUp(int);//yes
|
virtual void onKeyUp(int);//yes
|
||||||
virtual int getCursorId();//yes
|
//virtual int getCursorId();//yes
|
||||||
protected:
|
protected:
|
||||||
virtual void setCursor(std::string);
|
//virtual void setCursor(std::string);
|
||||||
private:
|
private:
|
||||||
std::string cursorString;
|
//std::string cursorString;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -635,14 +635,14 @@ void Application::onGraphics(RenderDevice* rd) {
|
|||||||
{
|
{
|
||||||
mouseOnScreen = false;
|
mouseOnScreen = false;
|
||||||
//ShowCursor(true);
|
//ShowCursor(true);
|
||||||
_window->setMouseVisible(true);
|
//_window->setMouseVisible(true);
|
||||||
//rd->window()->setInputCaptureCount(0);
|
//rd->window()->setInputCaptureCount(0);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
mouseOnScreen = true;
|
mouseOnScreen = true;
|
||||||
//SetCursor(NULL);
|
//SetCursor(NULL);
|
||||||
_window->setMouseVisible(false);
|
//_window->setMouseVisible(false);
|
||||||
//rd->window()->setInputCaptureCount(1);
|
//rd->window()->setInputCaptureCount(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -709,7 +709,7 @@ void Application::onGraphics(RenderDevice* rd) {
|
|||||||
rd->afterPrimitive();
|
rd->afterPrimitive();
|
||||||
|
|
||||||
|
|
||||||
Draw::box(G3D::Box(mouse.getPosition()-Vector3(2,0.5F,1),mouse.getPosition()+Vector3(2,0.5F,1)), rd, Color3::cyan(), Color4::clear());
|
//Draw::box(G3D::Box(mouse.getPosition()-Vector3(2,0.5F,1),mouse.getPosition()+Vector3(2,0.5F,1)), rd, Color3::cyan(), Color4::clear());
|
||||||
if(g_selectedInstances.size() > 0)
|
if(g_selectedInstances.size() > 0)
|
||||||
{
|
{
|
||||||
for(size_t i = 0; i < g_selectedInstances.size(); i++)
|
for(size_t i = 0; i < g_selectedInstances.size(); i++)
|
||||||
@@ -742,7 +742,7 @@ void Application::onGraphics(RenderDevice* rd) {
|
|||||||
}
|
}
|
||||||
renderDevice->push2D();
|
renderDevice->push2D();
|
||||||
_dataModel->getGuiRoot()->renderGUI(renderDevice, m_graphicsWatch.FPS());
|
_dataModel->getGuiRoot()->renderGUI(renderDevice, m_graphicsWatch.FPS());
|
||||||
rd->pushState();
|
/*rd->pushState();
|
||||||
rd->beforePrimitive();
|
rd->beforePrimitive();
|
||||||
|
|
||||||
if(Globals::showMouse && mouseOnScreen)
|
if(Globals::showMouse && mouseOnScreen)
|
||||||
@@ -768,7 +768,7 @@ void Application::onGraphics(RenderDevice* rd) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
glBindTexture( GL_TEXTURE_2D, tool->getCursorId());
|
/*glBindTexture( GL_TEXTURE_2D, tool->getCursorId());
|
||||||
|
|
||||||
|
|
||||||
glBegin( GL_QUADS );
|
glBegin( GL_QUADS );
|
||||||
@@ -782,11 +782,11 @@ void Application::onGraphics(RenderDevice* rd) {
|
|||||||
glVertex2f( mousepos.x-64, mousepos.y+64 );
|
glVertex2f( mousepos.x-64, mousepos.y+64 );
|
||||||
glEnd();
|
glEnd();
|
||||||
|
|
||||||
glDisable( GL_TEXTURE_2D );
|
glDisable( GL_TEXTURE_2D );*/
|
||||||
}
|
//}
|
||||||
|
|
||||||
rd->afterPrimitive();
|
/*rd->afterPrimitive();
|
||||||
rd->popState();
|
rd->popState();*/
|
||||||
renderDevice->pop2D();
|
renderDevice->pop2D();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ int const Globals::major = 100;
|
|||||||
int const Globals::minor = 4;
|
int const Globals::minor = 4;
|
||||||
int const Globals::patch = 3;
|
int const Globals::patch = 3;
|
||||||
int Globals::surfaceId = 2;
|
int Globals::surfaceId = 2;
|
||||||
bool Globals::showMouse = true;
|
//bool Globals::showMouse = true;
|
||||||
bool Globals::useMousePoint = false;
|
bool Globals::useMousePoint = false;
|
||||||
std::vector<Instance*> postRenderStack = std::vector<Instance*>();
|
std::vector<Instance*> postRenderStack = std::vector<Instance*>();
|
||||||
|
|
||||||
|
|||||||
@@ -29,8 +29,6 @@ void ArrowTool::onButton1MouseDown(Mouse mouse)
|
|||||||
}
|
}
|
||||||
void ArrowTool::onButton1MouseUp(Mouse mouse)
|
void ArrowTool::onButton1MouseUp(Mouse mouse)
|
||||||
{
|
{
|
||||||
if(dragging)
|
|
||||||
this->setCursor(GetFileInPath("/content/images/ArrowCursor.png"));
|
|
||||||
mouseDown = false;
|
mouseDown = false;
|
||||||
dragging = false;
|
dragging = false;
|
||||||
}
|
}
|
||||||
@@ -43,7 +41,6 @@ void ArrowTool::onMouseMoved(Mouse mouse)
|
|||||||
{
|
{
|
||||||
if(abs(mouse.x-mouseDownStartx) > 5 || abs(mouse.y-mouseDownStarty) > 5)
|
if(abs(mouse.x-mouseDownStartx) > 5 || abs(mouse.y-mouseDownStarty) > 5)
|
||||||
{
|
{
|
||||||
this->setCursor(GetFileInPath("/content/images/GrabRotateCursor.png"));
|
|
||||||
dragging = true;
|
dragging = true;
|
||||||
}
|
}
|
||||||
else return;
|
else return;
|
||||||
@@ -58,13 +55,10 @@ void ArrowTool::onMouseMoved(Mouse mouse)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
PartInstance * target = mouse.getTarget();
|
PartInstance * target = mouse.getTarget();
|
||||||
if(target == NULL)
|
//if(target == NULL)
|
||||||
this->setCursor(GetFileInPath("/content/images/ArrowCursor.png"));
|
|
||||||
else this->setCursor(GetFileInPath("/content/images/DragCursor.png"));
|
|
||||||
}
|
}
|
||||||
void ArrowTool::onSelect(Mouse mouse)
|
void ArrowTool::onSelect(Mouse mouse)
|
||||||
{
|
{
|
||||||
this->setCursor(GetFileInPath("/content/images/ArrowCursor.png"));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void ArrowTool::onKeyDown(int key)
|
void ArrowTool::onKeyDown(int key)
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
Tool::Tool(void)
|
Tool::Tool(void)
|
||||||
{
|
{
|
||||||
cursorString = GetFileInPath("/content/images/ArrowFarCursor.png");
|
//cursorString = GetFileInPath("/content/images/ArrowFarCursor.png");
|
||||||
//cursorId = cursorRef->openGLID();
|
//cursorId = cursorRef->openGLID();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -22,11 +22,11 @@ void Tool::onDeselect(Mouse mouse){}
|
|||||||
void Tool::onMouseScroll(Mouse mouse){}
|
void Tool::onMouseScroll(Mouse mouse){}
|
||||||
void Tool::onKeyDown(int key){}
|
void Tool::onKeyDown(int key){}
|
||||||
void Tool::onKeyUp(int key){}
|
void Tool::onKeyUp(int key){}
|
||||||
void Tool::setCursor(std::string str)
|
/*void Tool::setCursor(std::string str)
|
||||||
{
|
{
|
||||||
cursorString = str;
|
//cursorString = str;
|
||||||
}
|
}*/
|
||||||
int Tool::getCursorId()
|
/*int Tool::getCursorId()
|
||||||
{
|
{
|
||||||
return TextureHandler::getTexturePermanent(cursorString);
|
return TextureHandler::getTexturePermanent(cursorString);
|
||||||
}
|
}*/
|
||||||
@@ -23,7 +23,7 @@ bool createWindowClass(const char* name,WNDPROC proc,HMODULE hInstance)
|
|||||||
{
|
{
|
||||||
stringstream errMsg;
|
stringstream errMsg;
|
||||||
errMsg<<"Failed to register " << name;
|
errMsg<<"Failed to register " << name;
|
||||||
MessageBox(NULL, errMsg.str().c_str(),"Dynamica Crash", MB_OK);
|
MessageBox(NULL, errMsg.str().c_str(),"Blocks3D Crash", MB_OK);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
Reference in New Issue
Block a user