move move move
This commit is contained in:
@@ -43,6 +43,18 @@ void Inferno::uiPreset()
|
||||
spdlog::info("LAYOUT SET TO DEFAULT");
|
||||
}
|
||||
|
||||
void Inferno::input()
|
||||
{
|
||||
// KBD & MOUSE
|
||||
static double dxpos, dypos;
|
||||
double xpos, ypos;
|
||||
glfwGetCursorPos(mWin->getGLFWWindow(), &xpos, &ypos);
|
||||
|
||||
mouseDelta.x = (int)(dxpos - xpos);
|
||||
mouseDelta.y = (int)(dypos - ypos);
|
||||
dxpos = xpos; dypos = ypos;
|
||||
}
|
||||
|
||||
int Inferno::run()
|
||||
{
|
||||
mWin->setFPSMode();
|
||||
@@ -58,11 +70,6 @@ int Inferno::run()
|
||||
if (ImGui::DockBuilderGetNode(dockspace_id) == NULL) { this->uiPreset(); }
|
||||
ImGui::DockSpace(dockspace_id, ImVec2(0.0f, 0.0f), dockspace_flags);
|
||||
|
||||
// KBD & MOUSE
|
||||
double xpos, ypos;
|
||||
glfwGetCursorPos(mWin->getGLFWWindow(), &xpos, &ypos);
|
||||
|
||||
|
||||
std::cout << mouseDelta.x << " " << mouseDelta.y << std::endl;
|
||||
|
||||
ImGui::Begin("Preview");
|
||||
|
||||
@@ -18,6 +18,8 @@ public:
|
||||
~Inferno();
|
||||
|
||||
void uiPreset();
|
||||
|
||||
void input();
|
||||
int run();
|
||||
|
||||
public:
|
||||
|
||||
Reference in New Issue
Block a user