Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion TeamProject.iml
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@
<src_folder value="file://$MODULE_DIR$/src" expected_position="0" />
</src_description>
</component>
<component name="NewModuleRootManager" inherit-compiler-output="false">
<component name="NewModuleRootManager">
<output url="file://$MODULE_DIR$/bin" />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
Expand Down Expand Up @@ -1484,5 +1484,8 @@
</library>
</orderEntry>
<orderEntry type="library" name="lib" level="project" />
<orderEntry type="library" name="jdk1.8" level="project" />
<orderEntry type="library" name="LWJGL3" level="project" />
<orderEntry type="library" name="commons-math3-3.6" level="project" />
</component>
</module>
1 change: 1 addition & 0 deletions src/client/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ public Window getWindow() {

private Main(String host, int port) {
super(host, port);
//super("192.168.43.92", port);
Main.instance = this;
}

Expand Down
27 changes: 18 additions & 9 deletions src/graphics/screen/Settings.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,27 +18,27 @@ public class Settings {

public static void drawAudioBar() {
double[] vertices = {
-0.2f, 0, 0,
0.6f, 0, 0,
0.6f, -0.05f, 0,
-0.2f, -0.05f, 0
-0.2f, -0.37, 0,
0.6f, -0.37, 0,
0.6f, -0.42f, 0,
-0.2f, -0.42f, 0
};
rshader.bind();
Rectangle.drawrectangle(vertices, Menu.getRectangleModel(), false);
rshader.stop();
//tshader.bind();
glColor3f(255, 255, 255);
Text.draw("Volume", -6f, 0.5f, 0.5f, false);
Text.draw("Volume", -6f, -2.5f, 0.5f, false);
glColor3f(255, 255, 255);
//tshader.stop();
}

public static void drawSlider(){
double[] vertices = {
getXLower(), 0.01, 0,
getXUpper(), 0.01, 0,
getXUpper(), -0.06f, 0,
getXLower(), -0.06f, 0
getXLower(), -0.36, 0,
getXUpper(), -0.36, 0,
getXUpper(), -0.43, 0,
getXLower(), -0.43f, 0
};
rshader.bind();
Rectangle.drawrectangle(vertices, Menu.getRectangleModel(), false);
Expand Down Expand Up @@ -67,4 +67,13 @@ static double getXUpper(){
public static double volumePercentage(){
return (((getXLower()+0.025) - (-0.2))/0.8)*100;
}

public static void drawInstructions(){
glColor3f(255, 255, 255);
Text.draw("Instructions", -6f, 5f, 0.5f, false);
Text.draw("To move left press a", -10.5f, 6,0.3f, false );
Text.draw("To move right press d", -10.5f,4.5f, 0.3f,false);
Text.draw("To double jump press the space bar", -10.5f, 3,0.3f,false );
}

}
2 changes: 1 addition & 1 deletion src/graphics/ui/Text.java
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ public static void draw(String s, float x, float y, float scale, boolean opponen
startX += scale * 0.65/scale;
charNum++;
}else{
startX += scale * 3/scale;
startX += scale * 0.4/scale;
spaceNum++;
}
space = false;
Expand Down
5 changes: 3 additions & 2 deletions src/graphics/ui/Window.java
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,7 @@ public void repaint(GameState ourGameState, GameState theirGameState) {
Menu.drawBackToMenuButton();
Settings.drawAudioBar();
Settings.drawSlider();
Settings.drawInstructions();
} else if(screen == Screen.LOADING){
if(!finishedLoading){
LoadingScreen.drawLoadingWord();
Expand Down Expand Up @@ -376,7 +377,7 @@ private boolean onSettingsButton(double x, double y){

private boolean onAudioBar(double x, double y) {
double newX = ((1+x)*2)-1;
return withinBounds(newX, y, -0.2, 0.6, -0.05, 0);
return withinBounds(newX, y, -0.2, 0.6, -0.42, -0.37);
}

/**
Expand All @@ -396,7 +397,7 @@ private boolean onQuitButton(double x, double y) {
* @return Whether the coordinate is within the button.
*/
private boolean onBackToMenuButton(double x, double y) {
return withinBounds(x, y, -0.95, -0.85, 0.845, 0.95);
return withinBounds(x, y, /*-0.95*/ -0.97, -0.85, 0.845f, 0.95f);
}

/**
Expand Down