Race length is affected by slider value.

- modified constructor of a race event to take in a scale value
- race is scaled according to minutes selected on the slider
- applied minimal css styling
- playing around with more styling options
- bug exists with 1 minute races, to be fixed

#story[1323]
This commit is contained in:
Jessica Syder
2017-09-24 22:56:14 +13:00
parent 819cdc49ab
commit f1c1fc7063
4 changed files with 29 additions and 21 deletions
@@ -67,6 +67,8 @@ public class HostGameController extends Controller {
sliderLength.setShowTickLabels(true);
sliderLength.setMajorTickUnit(MAX_RACE_LENGTH-1);
sliderLength.setBlockIncrement(1);
sliderLength.getStylesheets().add("/css/slider.css");
}
@@ -93,7 +95,8 @@ public class HostGameController extends Controller {
*/
public void hostGamePressed() {
try {
App.game = new Event(false, currentMapIndex);
App.game = new Event(false, currentMapIndex,
selectedRaceLength*60*1000);
App.gameType = currentMapIndex;
HttpMatchBrowserHost matchBrowserHost = new HttpMatchBrowserHost();