mirror of
https://github.com/sirjonasxx/G-Earth.git
synced 2024-11-23 08:50:52 +01:00
hide logger tab when using UI logger, update uilogger, update packetloggerfactory
This commit is contained in:
parent
b4281dff56
commit
1655ce1d01
@ -1,5 +1,6 @@
|
||||
package gearth.ui;
|
||||
|
||||
import gearth.ui.logger.loggerdisplays.PacketLoggerFactory;
|
||||
import javafx.scene.control.Tab;
|
||||
import javafx.scene.control.TabPane;
|
||||
import javafx.scene.layout.Pane;
|
||||
@ -48,6 +49,10 @@ public class GEarthController {
|
||||
|
||||
tabBar.getTabs().remove(tab_Settings);
|
||||
|
||||
if (PacketLoggerFactory.usesUIlogger()) {
|
||||
tabBar.getTabs().remove(loggerController);
|
||||
}
|
||||
|
||||
|
||||
//custom header bar
|
||||
// final Point[] startpos = {null};
|
||||
|
@ -8,12 +8,19 @@ import gearth.misc.OSValidator;
|
||||
*/
|
||||
public class PacketLoggerFactory {
|
||||
|
||||
public static PacketLogger get() {
|
||||
if (OSValidator.isUnix() && Main.hasFlag("-t")) {
|
||||
return new LinuxTerminalLogger();
|
||||
public static boolean usesUIlogger() {
|
||||
return (!Main.hasFlag("-t"));
|
||||
}
|
||||
|
||||
public static PacketLogger get() {
|
||||
if (usesUIlogger()) {
|
||||
return new UiLogger();
|
||||
}
|
||||
|
||||
if (OSValidator.isUnix()) {
|
||||
return new LinuxTerminalLogger();
|
||||
}
|
||||
return new SimpleTerminalLogger();
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -8,7 +8,7 @@
|
||||
<?import javafx.scene.layout.BorderPane?>
|
||||
<?import javafx.scene.layout.FlowPane?>
|
||||
|
||||
<BorderPane fx:id="borderPane" prefHeight="400.0" prefWidth="600.0" xmlns="http://javafx.com/javafx/8.0.121" xmlns:fx="http://javafx.com/fxml/1" fx:controller="gearth.ui.UiLoggerController">
|
||||
<BorderPane fx:id="borderPane" prefHeight="400.0" prefWidth="600.0" xmlns="http://javafx.com/javafx/8.0.112" xmlns:fx="http://javafx.com/fxml/1" fx:controller="gearth.ui.UiLoggerController">
|
||||
<top>
|
||||
<MenuBar BorderPane.alignment="CENTER">
|
||||
<Menu mnemonicParsing="false" text="View">
|
||||
@ -23,9 +23,9 @@
|
||||
</MenuBar>
|
||||
</top>
|
||||
<bottom>
|
||||
<FlowPane fx:id="flowPane" prefHeight="26.0" prefWidth="200.0" BorderPane.alignment="CENTER">
|
||||
<FlowPane fx:id="flowPane" prefHeight="20.0" prefWidth="200.0" BorderPane.alignment="CENTER">
|
||||
<padding>
|
||||
<Insets left="10.0" top="3.0" />
|
||||
<Insets left="10.0" top="1.0" />
|
||||
</padding>
|
||||
<Label fx:id="lblViewIncoming" style="-fx-text-fill: black !important" text="View Incoming: True">
|
||||
<FlowPane.margin>
|
||||
|
Loading…
Reference in New Issue
Block a user