Update wiki to match gradle conversion authored by Derek Williams's avatar Derek Williams
# Developing Overlaying Screens # Developing Overlaying Screens
## Structure & Conventions ## Structure & Conventions
The way the interfaces are organized is that each will have a UI component that expresses the [Actors](https://libgdx.badlogicgames.com/nightlies/docs/api/com/badlogic/gdx/scenes/scene2d/Actor.html) that will appear on screen. It will also have a table that is used for the stylizing the display and interacting with the display. The way the interfaces are organized is that each will have a UI component that expresses the [Actors](https://libgdx.badlogicgames.com/nightlies/docs/api/com/badlogic/gdx/scenes/scene2d/Actor.html) that will appear on screen. It will also have a table that is used for the stylizing the display and interacting with the display.
### Package Structure ### Package Structure
The package title defines the purpose, usually abbreviated and it is stored within the _GameClient.src.view.PACKAGE_NAME_ The package title defines the purpose, usually abbreviated and it is stored within the _GameClient.src.main.java.view.PACKAGE_NAME_
## Overlaying Screen Class ## Overlaying Screen Class
Overlaying Screen is an abstract class used to created screens that pop up on top the game to display some information. These screens are colorized based on the color scheme for the crew that the payer is in. Overlaying Screen is an abstract class used to created screens that pop up on top the game to display some information. These screens are colorized based on the color scheme for the crew that the payer is in.
1. **Container** 1. **Container**
The overlaying screen contains a LibGDX Table that holds an overlaying table, or multiples overlaying tables. To add an overlaying table to the container use: The overlaying screen contains a LibGDX Table that holds an overlaying table, or multiples overlaying tables. To add an overlaying table to the container use:
```java ```java
...@@ -18,7 +18,7 @@ container.add(OverlayingTable); ...@@ -18,7 +18,7 @@ container.add(OverlayingTable);
``` ```
**Sub Container** **Sub Container**
A sub container is needed if the sizing for Overlaying Tables are different for each row of the container. New rows are added to a container by calling [container.row()](https://libgdx.badlogicgames.com/nightlies/docs/api/com/badlogic/gdx/scenes/scene2d/ui/Table.html#row--). A sub container is needed if the sizing for Overlaying Tables are different for each row of the container. New rows are added to a container by calling [container.row()](https://libgdx.badlogicgames.com/nightlies/docs/api/com/badlogic/gdx/scenes/scene2d/ui/Table.html#row--).
```java ```java
container.row(); container.row();
...@@ -153,7 +153,7 @@ table.add(COMPONENT); ...@@ -153,7 +153,7 @@ table.add(COMPONENT);
_Label_ _Label_
A label is a simple text display that contains a string and our skin. A label is a simple text display that contains a string and our skin.
```java ```java
Label l = new Label("text", SkinPicker.getSkinPicker().getCrewSkin()); Label l = new Label("text", SkinPicker.getSkinPicker().getCrewSkin());
``` ```
...@@ -162,7 +162,7 @@ Label l = new Label("text", SkinPicker.getSkinPicker().getCrewSkin()); ...@@ -162,7 +162,7 @@ Label l = new Label("text", SkinPicker.getSkinPicker().getCrewSkin());
_Button_ _Button_
A button is a clickable element which can be used to do actions such as invoking a method, toggling a boolean, or altering a field. A button is a clickable element which can be used to do actions such as invoking a method, toggling a boolean, or altering a field.
```java ```java
Button button = new Button(); Button button = new Button();
``` ```
...@@ -175,7 +175,7 @@ Button button = new Button(); ...@@ -175,7 +175,7 @@ Button button = new Button();
_Skin_ _Skin_
A skin is the look and feel of your interface. Our system uses a standard one for these and to access it we use the singleton _SkinPicker_ to grab a skin based off of our crew colors. A skin is the look and feel of your interface. Our system uses a standard one for these and to access it we use the singleton _SkinPicker_ to grab a skin based off of our crew colors.
_Positioning_ _Positioning_
...@@ -183,7 +183,7 @@ Button button = new Button(); ...@@ -183,7 +183,7 @@ Button button = new Button();
There are a few functions that return the element so we can use multiple styles in one line of code. There are a few functions that return the element so we can use multiple styles in one line of code.
For example we can use For example we can use
```java ```java
element.add(ELEMENT).top().row(); element.add(ELEMENT).top().row();
...@@ -192,7 +192,7 @@ element.add(ELEMENT).top().row(); ...@@ -192,7 +192,7 @@ element.add(ELEMENT).top().row();
to put an element at the top of the table and at the same time adds a new row to the table. to put an element at the top of the table and at the same time adds a new row to the table.
Like components, there are hundreds of different styling and positioning functions. Use auto-complete or docs to view your list of options. Like components, there are hundreds of different styling and positioning functions. Use auto-complete or docs to view your list of options.
## Menu UI ## Menu UI
The _MenuUI_ has three methods. One for adding an _OverlayingScreen_ toggle button, one for adding a normal button, and one for closing all _OverlayingScreens_. These methods are The _MenuUI_ has three methods. One for adding an _OverlayingScreen_ toggle button, one for adding a normal button, and one for closing all _OverlayingScreens_. These methods are
...@@ -219,4 +219,4 @@ menu.addButton("TEXT", ClickListener); ...@@ -219,4 +219,4 @@ menu.addButton("TEXT", ClickListener);
## External Information ## External Information
Outside information was taken in from [LibGDX Documentation](https://libgdx.badlogicgames.com/nightlies/docs/api/com/badlogic/gdx/scenes/scene2d/package-summary.html) Outside information was taken in from [LibGDX Documentation](https://libgdx.badlogicgames.com/nightlies/docs/api/com/badlogic/gdx/scenes/scene2d/package-summary.html)
\ No newline at end of file