Package net.egartley.beyondorigins
Class Debug
- java.lang.Object
-
- net.egartley.beyondorigins.Debug
-
public class Debug extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description private static org.newdawn.slick.Color
backgroundColor
Color for the background of debug linesprivate static org.newdawn.slick.Font
font
Font to use while rendering debug linesprivate static int
lx
Initial line x-coordinateprivate static int
ly
Initial line y-coordinateprivate static int
row
What row to render the line on, fordrawLine(String, Graphics)
private static int
rowOffset
Offset for each lineprivate static byte
TEXT_PADDING
Number of pixels to add as padding around each line of text
-
Constructor Summary
Constructors Constructor Description Debug()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description private static void
drawLine(java.lang.String s, org.newdawn.slick.Graphics graphics)
Renders the string in the top left corner of the screenstatic void
error(java.lang.Exception e)
Handles the exception, printing out its messagestatic void
error(java.lang.Object object)
Prints the given object to the console with the tag "ERROR"static void
info(java.lang.Object object)
Prints the given object to the console with the tag "INFO"static void
out(java.lang.Object object)
Prints the given object to the console, along with the current thread and timestatic void
render(org.newdawn.slick.Graphics graphics)
Display debug information, toggled with F3static void
warning(java.lang.Object object)
Prints the given object to the console with the tag "WARNING"
-
-
-
Field Detail
-
font
private static final org.newdawn.slick.Font font
Font to use while rendering debug lines
-
backgroundColor
private static final org.newdawn.slick.Color backgroundColor
Color for the background of debug lines
-
lx
private static final int lx
Initial line x-coordinate- See Also:
- Constant Field Values
-
ly
private static final int ly
Initial line y-coordinate- See Also:
- Constant Field Values
-
rowOffset
private static final int rowOffset
Offset for each line- See Also:
- Constant Field Values
-
row
private static int row
What row to render the line on, fordrawLine(String, Graphics)
-
TEXT_PADDING
private static final byte TEXT_PADDING
Number of pixels to add as padding around each line of text- See Also:
- Constant Field Values
-
-
Method Detail
-
out
public static void out(java.lang.Object object)
Prints the given object to the console, along with the current thread and time- Parameters:
object
- The object to print out
-
info
public static void info(java.lang.Object object)
Prints the given object to the console with the tag "INFO"- Parameters:
object
- The object to print out
-
warning
public static void warning(java.lang.Object object)
Prints the given object to the console with the tag "WARNING"- Parameters:
object
- The object to print out
-
error
public static void error(java.lang.Object object)
Prints the given object to the console with the tag "ERROR"- Parameters:
object
- The object to print out
-
error
public static void error(java.lang.Exception e)
Handles the exception, printing out its message- Parameters:
e
- The exception to handle- See Also:
Throwable.getMessage()
-
drawLine
private static void drawLine(java.lang.String s, org.newdawn.slick.Graphics graphics)
Renders the string in the top left corner of the screen- Parameters:
s
- The string to displaygraphics
- Graphics to use
-
render
public static void render(org.newdawn.slick.Graphics graphics)
Display debug information, toggled with F3
-
-