lib/cryptum/event/pane.rb in cryptum-0.0.266 vs lib/cryptum/event/pane.rb in cryptum-0.0.267

- old
+ new

@@ -23,13 +23,54 @@ end rescue StandardError => e raise e end + # Supported Method Parameters:: + # Cryptum::Event::Pane.toggle_details( + # ) + public_class_method def self.toggle_details(opts = {}) + terminal_win = opts[:terminal_win] + event_history = opts[:event_history] + + terminal_win.key_press_event.key_enter = false + + if event_history.order_plan_win_active && + !event_history.order_plan_details_win_active && + !event_history.order_execute_win_active + + event_history.order_plan_win_active = false + event_history.order_plan_details_win_active = true + elsif !event_history.order_plan_win_active && + event_history.order_plan_details_win_active && + !event_history.order_execute_win_active + + event_history.order_plan_win_active = true + event_history.order_plan_details_win_active = false + end + + if event_history.order_execute_win_active && + !event_history.order_execute_details_win_active && + !event_history.order_plan_win_active + + event_history.order_execute_win_active = false + event_history.order_execute_details_win_active = true + elsif !event_history.order_execute_win_active && + event_history.order_execute_details_win_active && + !event_history.order_plan_win_active + + event_history.order_execute_win_active = true + event_history.order_execute_details_win_active = false + end + rescue StandardError => e + raise e + end + # Display Usage for this Module public_class_method def self.help puts "USAGE: #{self}.switch() + #{self}.toggle_details() " end end end end