@@ -208,7 +208,6 @@ int tsunami_lab::ui::GUI::launch()
208
208
bool showClientLog = false ;
209
209
bool showSimulationParameterWindow = false ;
210
210
bool showSystemInfoWindow = false ;
211
- bool showSimulationControlsWindow = false ;
212
211
bool showStationDataVisualizer = false ;
213
212
bool showDataVisualizer = false ;
214
213
@@ -285,12 +284,15 @@ int tsunami_lab::ui::GUI::launch()
285
284
// --------------------------------------------//
286
285
if (ImGui::BeginTabItem (" Connectivity" ))
287
286
{
287
+ ImGui::SeparatorText (" Connect your client to the server." );
288
+
288
289
int width = 32 ;
289
290
ImGui::SetNextItemWidth (ImGui::GetFontSize () * width);
290
291
ImGui::InputText (" IP address" , &IPADDRESS[0 ], IM_ARRAYSIZE (IPADDRESS));
291
292
ImGui::SetNextItemWidth (ImGui::GetFontSize () * width);
292
293
ImGui::InputInt (" Port" , &PORT, 0 );
293
294
PORT = abs (PORT);
295
+
294
296
295
297
ImGui::BeginDisabled (m_connected);
296
298
if (ImGui::Button (" Connect" ))
@@ -419,16 +421,17 @@ int tsunami_lab::ui::GUI::launch()
419
421
420
422
ImGui::EndTabItem ();
421
423
}
422
- // ---------------------------------------------- //
423
- // ------------Simulation Controls--------------- //
424
- // ---------------------------------------------- //
425
- if (showSimulationControlsWindow )
424
+ // -------------------------------------------//
425
+ // ------------Simulation Controls------------//
426
+ // -------------------------------------------//
427
+ if (ImGui::BeginTabItem ( " Simulation Controls " ) )
426
428
{
427
- ImGui::Begin (" Simulation controls" , &showSimulationControlsWindow);
428
-
429
429
ImGui::PushStyleColor (ImGuiCol_Button, (ImVec4)ImColor::HSV (2 / 7 .0f , 0 .6f , 0 .6f ));
430
430
ImGui::PushStyleColor (ImGuiCol_ButtonHovered, (ImVec4)ImColor::HSV (2 / 7 .0f , 0 .8f , 0 .7f ));
431
431
ImGui::PushStyleColor (ImGuiCol_ButtonActive, (ImVec4)ImColor::HSV (2 / 7 .0f , 1 .0f , 0 .8f ));
432
+
433
+ ImGui::SeparatorText (" Change the state of the simulation." );
434
+
432
435
if (ImGui::Button (" Run simulation" ))
433
436
{
434
437
xlpmg::Message startSimMsg = xlpmg::START_SIMULATION;
@@ -534,28 +537,38 @@ int tsunami_lab::ui::GUI::launch()
534
537
m_communicator.sendToServer (messageToJsonString (deleteStationsMsg));
535
538
}
536
539
537
- ImGui::End ();
540
+ ImGui::EndTabItem ();
538
541
}
539
542
// -------------------------------------------//
540
- // ------------------WINDOWS----- -------------//
543
+ // ------------Simulation Options -------------//
541
544
// -------------------------------------------//
542
545
if (ImGui::BeginTabItem (" Windows" ))
543
546
{
544
- ImGui::Checkbox (" Show Demo Window" , &show_demo_window);
545
- ImGui::Checkbox (" Show simulation controls" , &showSimulationControlsWindow);
546
- ImGui::Checkbox (" Edit compiler/runtime options" , &showCompilerOptionsWindow);
547
- ImGui::Checkbox (" Edit simulation parameters" , &showSimulationParameterWindow);
548
- ImGui::Checkbox (" Show station data visualizer" , &showStationDataVisualizer);
549
- ImGui::Checkbox (" Show data visualizer" , &showDataVisualizer);
550
- ImGui::Checkbox (" Show client log" , &showClientLog);
551
- ImGui::Checkbox (" Show system info" , &showSystemInfoWindow);
547
+ ImGui::SeparatorText (" Windows for modification and observation of the simulation." );
548
+ if (ImGui::BeginTabBar (" Options" ))
549
+ {
550
+ if (ImGui::BeginTabItem (" Configuration" )){
551
+ ImGui::Checkbox (" Edit simulation parameters" , &showSimulationParameterWindow);
552
+ ImGui::Checkbox (" Edit compiler/runtime options" , &showCompilerOptionsWindow);
553
+ ImGui::EndTabItem ();
554
+ }
555
+ if (ImGui::BeginTabItem (" Observation tools" )){
556
+ ImGui::Checkbox (" Show station data visualizer" , &showStationDataVisualizer);
557
+ ImGui::Checkbox (" Show data visualizer" , &showDataVisualizer);
558
+ ImGui::Checkbox (" Show client log" , &showClientLog);
559
+ ImGui::Checkbox (" Show system info" , &showSystemInfoWindow);
560
+ ImGui::EndTabItem ();
561
+ }
562
+ ImGui::EndTabBar ();
563
+ }
552
564
ImGui::EndTabItem ();
553
565
}
554
566
// ---------------------------------------------//
555
567
// ----------------FILE TRANSFER----------------//
556
568
// ---------------------------------------------//
557
569
if (ImGui::BeginTabItem (" File transfer" ))
558
570
{
571
+ ImGui::SeparatorText (" Send and receive files from the server." );
559
572
if (ImGui::CollapsingHeader (" Send to server" ))
560
573
{
561
574
ImGui::Indent ();
@@ -628,19 +641,7 @@ int tsunami_lab::ui::GUI::launch()
628
641
ImGui::TextWrapped (" Our file transfer implementaion uses byte transfer over standard tcp sockets without additional security or performance. For large or confident files we recommend using other services such as sftp." );
629
642
ImGui::EndTabItem ();
630
643
}
631
- // ------------------------------------------//
632
- // --------------UNSROTED ITEMS--------------//
633
- // ------------------------------------------//
634
- if (ImGui::BeginTabItem (" Experimental" ))
635
- {
636
- if (ImGui::Button (" Get simulation sizes" ))
637
- {
638
- m_communicator.sendToServer (messageToJsonString (xlpmg::GET_SIMULATION_SIZES));
639
- std::cout << m_communicator.receiveFromServer () << std::endl;
640
- }
641
-
642
- ImGui::EndTabItem ();
643
- }
644
+
644
645
ImGui::EndTabBar ();
645
646
}
646
647
0 commit comments