Skip to content

Commit

Permalink
Added getWindow to Console interface
Browse files Browse the repository at this point in the history
  • Loading branch information
StrongJoshua committed Jun 9, 2018
1 parent 9fd7d1e commit cfbac46
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/com/strongjoshua/console/AbstractConsole.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@
import com.badlogic.gdx.InputProcessor;
import com.badlogic.gdx.files.FileHandle;
import com.badlogic.gdx.graphics.Color;
import com.badlogic.gdx.scenes.scene2d.ui.Window;
import com.badlogic.gdx.utils.Array;
import com.badlogic.gdx.utils.Disposable;
import com.badlogic.gdx.utils.reflect.Annotation;
import com.badlogic.gdx.utils.reflect.ClassReflection;
import com.badlogic.gdx.utils.reflect.Method;
import com.badlogic.gdx.utils.reflect.ReflectionException;
import com.badlogic.gdx.scenes.scene2d.ui.Window;
import com.strongjoshua.console.annotation.ConsoleDoc;

import java.util.ArrayList;
Expand Down Expand Up @@ -367,8 +367,8 @@ private ArrayList<Method> getAllMethods () {

@Override public void setSubmitText (String text) {
}
public Window getWindow () {

@Override public Window getWindow () {
return null;
}
}
8 changes: 8 additions & 0 deletions src/com/strongjoshua/console/Console.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
import com.badlogic.gdx.InputProcessor;
import com.badlogic.gdx.files.FileHandle;
import com.badlogic.gdx.graphics.Color;
import com.badlogic.gdx.scenes.scene2d.ui.Window;
import com.strongjoshua.console.annotation.HiddenCommand;

/**
Expand Down Expand Up @@ -330,4 +331,11 @@ public interface Console {
* @param text The text.
*/
void setSubmitText (String text);

/**
* Returns the Console's Window object.
*
* @return The window.
*/
Window getWindow ();
}
2 changes: 1 addition & 1 deletion src/com/strongjoshua/console/GUIConsole.java
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@ private void refreshWindowColor () {
@Override public void setSubmitText (String text) {
display.setSubmitText(text);
}

@Override public Window getWindow () {
return this.consoleWindow;
}
Expand Down

0 comments on commit cfbac46

Please sign in to comment.