@ -12,13 +12,13 @@
// UI Panel constants
# define INFO_PANEL_WIDTH 300
# define INFO_PANEL_HEIGHT 30 0
# define INFO_PANEL_HEIGHT 35 0
# define BODY_LIST_WIDTH 200
# define BODY_LIST_HEIGHT 400
# define BODY_INFO_WIDTH 250
# define BODY_INFO_HEIGHT 300
# define MANEUVER_LIST_WIDTH 300
# define MANEUVER_LIST_HEIGHT 40 0
# define MANEUVER_LIST_HEIGHT 45 0
# define MANEUVER_LIST_Y_OFFSET 320
void gui_init ( ) {
@ -378,6 +378,14 @@ void render_maneuver_list_ui(SimulationState* sim, RenderState* render_state, UI
ui_state - > maneuver_dialog . active_tab = MD_TAB_CREATE ;
ui_state - > maneuver_dialog . craft_index = ui_state - > selected_craft_index ;
ui_state - > maneuver_dialog . edit_maneuver_index = - 1 ;
ui_state - > maneuver_dialog . direction_active = 0 ;
ui_state - > maneuver_dialog . delta_v = 1000.0 ;
ui_state - > maneuver_dialog . trigger_type_active = 0 ;
ui_state - > maneuver_dialog . trigger_value = 0.0 ;
ui_state - > maneuver_dialog . name [ 0 ] = ' \0 ' ;
ui_state - > maneuver_dialog . show_preview = false ;
ui_state - > maneuver_dialog . show_error = false ;
ui_state - > maneuver_dialog . error_message [ 0 ] = ' \0 ' ;
}
return ;
}
@ -455,6 +463,14 @@ void render_maneuver_list_ui(SimulationState* sim, RenderState* render_state, UI
ui_state - > maneuver_dialog . active_tab = MD_TAB_CREATE ;
ui_state - > maneuver_dialog . craft_index = ui_state - > selected_craft_index ;
ui_state - > maneuver_dialog . edit_maneuver_index = - 1 ;
ui_state - > maneuver_dialog . direction_active = 0 ;
ui_state - > maneuver_dialog . delta_v = 1000.0 ;
ui_state - > maneuver_dialog . trigger_type_active = 0 ;
ui_state - > maneuver_dialog . trigger_value = 0.0 ;
ui_state - > maneuver_dialog . name [ 0 ] = ' \0 ' ;
ui_state - > maneuver_dialog . show_preview = false ;
ui_state - > maneuver_dialog . show_error = false ;
ui_state - > maneuver_dialog . error_message [ 0 ] = ' \0 ' ;
}
free ( maneuver_list_text ) ;
@ -478,9 +494,8 @@ void render_maneuver_create_tab(SimulationState* sim, UIState* ui_state, int x,
Rectangle dir_label = { ( float ) x , ( float ) current_y , 80 , 25 } ;
GuiLabel ( dir_label , " Direction: " ) ;
const char * directions = " Prograde;Retrograde;Normal;Antinormal;Radial In;Radial Out;Custom " ;
Rectangle dir_combo = { ( float ) x + 85 , ( float ) current_y , ( float ) ( width - 95 ) , 25 } ;
GuiCombo Box ( dir_combo , directions , & ui_state - > maneuver_dialog . direction_active ) ;
GuiDropdown Box ( dir_combo , " Prograde;Retrograde;Normal;Antinormal;Radial In;Radial Out;Custom " , & ui_state - > maneuver_dialog . direction_active , fals e ) ;
current_y + = 35 ;
Rectangle dv_label = { ( float ) x , ( float ) current_y , 80 , 25 } ;
@ -500,9 +515,8 @@ void render_maneuver_create_tab(SimulationState* sim, UIState* ui_state, int x,
Rectangle trigger_label = { ( float ) x , ( float ) current_y , 80 , 25 } ;
GuiLabel ( trigger_label , " Trigger: " ) ;
const char * triggers = " Time;True Anomaly " ;
Rectangle trigger_combo = { ( float ) x + 85 , ( float ) current_y , ( float ) ( width - 95 ) , 25 } ;
GuiCombo Box ( trigger_combo , triggers , & ui_state - > maneuver_dialog . trigger_type_active ) ;
GuiDropdown Box ( trigger_combo , " Time;True Anomaly " , & ui_state - > maneuver_dialog . trigger_type_active , fals e ) ;
current_y + = 35 ;
Rectangle value_label = { ( float ) x , ( float ) current_y , 80 , 25 } ;