Margins and Layouts
This commit is contained in:
parent
e2ee8b216b
commit
3632cc765d
Binary file not shown.
@ -88,11 +88,12 @@ public class ProcessManagerService {
|
|||||||
|
|
||||||
private void startUnrealEngine() throws IOException {
|
private void startUnrealEngine() throws IOException {
|
||||||
|
|
||||||
|
String unrealPsScript = config.getProperty("unreal.executable");
|
||||||
ProcessBuilder pb = new ProcessBuilder(
|
ProcessBuilder pb = new ProcessBuilder(
|
||||||
"powershell.exe",
|
"powershell.exe",
|
||||||
"-ExecutionPolicy", "Bypass",
|
"-ExecutionPolicy", "Bypass",
|
||||||
"-File",
|
"-File",
|
||||||
"C:\\Users\\Student\\Documents\\Dannick\\avatar\\start_avatar.ps1"
|
unrealPsScript
|
||||||
);
|
);
|
||||||
|
|
||||||
unrealProcess = pb.start();
|
unrealProcess = pb.start();
|
||||||
|
|||||||
@ -4,6 +4,7 @@ import vassistent.bootstrap.ApplicationContext;
|
|||||||
import vassistent.controller.DashboardController;
|
import vassistent.controller.DashboardController;
|
||||||
|
|
||||||
import javax.swing.*;
|
import javax.swing.*;
|
||||||
|
import javax.swing.border.Border;
|
||||||
import java.awt.*;
|
import java.awt.*;
|
||||||
|
|
||||||
public class AppWindow extends JFrame {
|
public class AppWindow extends JFrame {
|
||||||
@ -22,7 +23,7 @@ public class AppWindow extends JFrame {
|
|||||||
setSize(1400, 850);
|
setSize(1400, 850);
|
||||||
setLocationRelativeTo(null);
|
setLocationRelativeTo(null);
|
||||||
|
|
||||||
setLayout(new BorderLayout());
|
setLayout(new BorderLayout(10,10));
|
||||||
|
|
||||||
streamingView = new PixelStreamingView(
|
streamingView = new PixelStreamingView(
|
||||||
"http://localhost",
|
"http://localhost",
|
||||||
@ -35,6 +36,10 @@ public class AppWindow extends JFrame {
|
|||||||
tabs = createTabPane();
|
tabs = createTabPane();
|
||||||
add(tabs, BorderLayout.CENTER);
|
add(tabs, BorderLayout.CENTER);
|
||||||
add(createStatusBar(), BorderLayout.SOUTH);
|
add(createStatusBar(), BorderLayout.SOUTH);
|
||||||
|
|
||||||
|
Font uiFont = new Font("Segoe UI", Font.PLAIN, 14);
|
||||||
|
UIManager.put("Label.font", uiFont);
|
||||||
|
UIManager.put("TabbedPane.font", uiFont);
|
||||||
}
|
}
|
||||||
|
|
||||||
// ---------------- Tabs ----------------
|
// ---------------- Tabs ----------------
|
||||||
@ -42,8 +47,9 @@ public class AppWindow extends JFrame {
|
|||||||
private JTabbedPane createTabPane() {
|
private JTabbedPane createTabPane() {
|
||||||
|
|
||||||
JTabbedPane tabs = new JTabbedPane();
|
JTabbedPane tabs = new JTabbedPane();
|
||||||
|
tabs.setBorder(BorderFactory.createEmptyBorder(10,10,10,10));
|
||||||
|
|
||||||
JPanel streamingPanel = new JPanel(new BorderLayout());
|
JPanel streamingPanel = new JPanel(new BorderLayout(10,10));
|
||||||
streamingPanel.add(streamingView, BorderLayout.CENTER);
|
streamingPanel.add(streamingView, BorderLayout.CENTER);
|
||||||
|
|
||||||
tabs.addTab("Avatar Streaming", streamingView);
|
tabs.addTab("Avatar Streaming", streamingView);
|
||||||
@ -56,7 +62,12 @@ public class AppWindow extends JFrame {
|
|||||||
|
|
||||||
private JPanel createStatusBar() {
|
private JPanel createStatusBar() {
|
||||||
|
|
||||||
JPanel statusBar = new JPanel(new FlowLayout(FlowLayout.LEFT));
|
JPanel statusBar = new JPanel(new FlowLayout(FlowLayout.LEFT,15,5));
|
||||||
|
|
||||||
|
statusBar.setBorder(BorderFactory.createCompoundBorder(
|
||||||
|
BorderFactory.createMatteBorder(1,0,0,0, Color.LIGHT_GRAY),
|
||||||
|
BorderFactory.createEmptyBorder(5,10,5,10)
|
||||||
|
));
|
||||||
|
|
||||||
mqttStatusLabel = new JLabel("MQTT: Disconnected");
|
mqttStatusLabel = new JLabel("MQTT: Disconnected");
|
||||||
problemLevelLabel = new JLabel("Problem: NONE");
|
problemLevelLabel = new JLabel("Problem: NONE");
|
||||||
|
|||||||
@ -13,5 +13,5 @@ mqtt_sim.script=src/main/resources/scripts/mqtt_simulator.py
|
|||||||
|
|
||||||
# ===== UNREAL ENGINE =====
|
# ===== UNREAL ENGINE =====
|
||||||
unreal.enabled=true
|
unreal.enabled=true
|
||||||
unreal.executable="C:\\Users\\Student\\Documents\\Dannick\\avatar\\Windows\\Prototyp1.exe -PixelStreamingURL=ws://127.0.0.1:8888 -RenderOffscreen -noaudio"
|
unreal.executable="C:\\Users\\Student\\Documents\\Dannick\\avatar\\start_avatar.ps1"
|
||||||
unreal.signalling_server.script=C:\\Users\\Student\\Documents\\Dannick\\avatar\\Windows\\Prototyp1\\Samples\\PixelStreaming\\WebServers\\SignallingWebServer\\platform_scripts\\cmd\\start_with_stun.bat
|
unreal.signalling_server.script=C:\\Users\\Student\\Documents\\Dannick\\avatar\\Windows\\Prototyp1\\Samples\\PixelStreaming\\WebServers\\SignallingWebServer\\platform_scripts\\cmd\\start_with_stun.bat
|
||||||
22
src/main/resources/scripts/start_avatar.ps1
Normal file
22
src/main/resources/scripts/start_avatar.ps1
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
$pidDir = "C:\Users\Student\Documents\Dannick\avatar"
|
||||||
|
|
||||||
|
$ueExe = "C:\Users\Student\Documents\Dannick\avatar\Windows\Prototyp1.exe"
|
||||||
|
$ueArgs = "-PixelStreamingURL=ws://127.0.0.1 -RenderOffscreen -PixelStreamingWebRTCDisableTransmitAudio"
|
||||||
|
|
||||||
|
$signallingBat = "C:\Users\Student\Documents\Dannick\avatar\Windows\Prototyp1\Samples\PixelStreaming\WebServers\SignallingWebServer\platform_scripts\cmd\start_with_stun.bat"
|
||||||
|
|
||||||
|
$ueWorkingDir = "C:\Users\Student\Documents\Dannick\avatar\Windows"
|
||||||
|
|
||||||
|
$signalling = Start-Process -FilePath $signallingBat -PassThru
|
||||||
|
|
||||||
|
Start-Sleep -Seconds 5
|
||||||
|
|
||||||
|
$ue = Start-Process `
|
||||||
|
-FilePath $ueExe `
|
||||||
|
-ArgumentList $ueArgs `
|
||||||
|
-WorkingDirectory $ueWorkingDir `
|
||||||
|
-PassThru
|
||||||
|
|
||||||
|
$ue.Id | Out-File "$pidDir\unreal.pid" -Encoding ascii
|
||||||
|
$signalling.Id | Out-File "$pidDir\signalling.pid" -Encoding ascii
|
||||||
|
|
||||||
Loading…
x
Reference in New Issue
Block a user