Updated host to show the hosted address and port. Fixed css issue with lobby text field.
#story[1087]
This commit is contained in:
@@ -33,11 +33,6 @@ public class HostController extends Controller {
|
||||
@FXML
|
||||
AnchorPane hostWrapper;
|
||||
|
||||
@FXML
|
||||
TextField gameAddressFld;
|
||||
|
||||
@FXML
|
||||
TextField gamePortFld;
|
||||
|
||||
@Override
|
||||
public void initialize(URL location, ResourceBundle resources) {
|
||||
@@ -46,12 +41,8 @@ public class HostController extends Controller {
|
||||
public void hostGamePressed() throws IOException{
|
||||
try {
|
||||
Event game = Event.getEvent();
|
||||
gameAddressFld.textProperty().set(game.getAddress());
|
||||
gamePortFld.textProperty().set(Integer.toString(game.getPort()));
|
||||
System.out.println(gameAddressFld.textProperty().getValue());
|
||||
System.out.println(gamePortFld.textProperty().getValue());
|
||||
game.start();
|
||||
connectSocket(gameAddressFld.textProperty().getValue(), Integer.parseInt(gamePortFld.textProperty().getValue()));
|
||||
connectSocket("localhost", 4942);
|
||||
} catch (InvalidRaceDataException e) {
|
||||
e.printStackTrace();
|
||||
} catch (XMLReaderException e) {
|
||||
@@ -60,8 +51,6 @@ public class HostController extends Controller {
|
||||
e.printStackTrace();
|
||||
} catch (InvalidRegattaDataException e) {
|
||||
e.printStackTrace();
|
||||
} catch (UnknownHostException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user