forked from rpereira-dev/CubeEngine
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
rpereira
committed
Dec 17, 2017
1 parent
827c59f
commit a14e74c
Showing
10 changed files
with
98 additions
and
68 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
53 changes: 53 additions & 0 deletions
53
VoxelEngine/src/com/grillecube/client/renderer/gui/event/EventCursorUpdate.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
package com.grillecube.client.renderer.gui.event; | ||
|
||
import com.grillecube.client.opengl.GLCursor; | ||
import com.grillecube.client.opengl.window.GLFWWindow; | ||
import com.grillecube.client.renderer.gui.components.Gui; | ||
import com.grillecube.common.event.Event; | ||
|
||
public class EventCursorUpdate extends Event { | ||
|
||
private GLFWWindow glfwWindow; | ||
private GLCursor nextCursor; | ||
private GLCursor prevCursor; | ||
private Gui topestGui; | ||
|
||
public EventCursorUpdate() { | ||
super(); | ||
} | ||
|
||
@Override | ||
protected void onReset() { | ||
} | ||
|
||
@Override | ||
protected void process() { | ||
this.prevCursor = this.glfwWindow.getCursor(); | ||
this.glfwWindow.setCursor(this.nextCursor); | ||
} | ||
|
||
@Override | ||
protected void unprocess() { | ||
this.glfwWindow.setCursor(this.prevCursor); | ||
} | ||
|
||
public final Gui getTopestGui() { | ||
return (this.topestGui); | ||
} | ||
|
||
/** return next cursor to be set */ | ||
public final GLCursor getCursor() { | ||
return (this.nextCursor); | ||
} | ||
|
||
public final void setCursor(GLCursor glCursor) { | ||
this.nextCursor = glCursor; | ||
} | ||
|
||
public void reset(GLFWWindow glfwWindow, GLCursor glCursor, Gui topestGui) { | ||
super.reset(); | ||
this.glfwWindow = glfwWindow; | ||
this.nextCursor = glCursor; | ||
this.topestGui = topestGui; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 0 additions & 24 deletions
24
VoxelEngine/src/com/grillecube/common/event/EventCursorUpdate.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters