Class: Glimmer::Gladiator::GladiatorMenuBar

Inherits:
Object
  • Object
show all
Includes:
UI::CustomWidget
Defined in:
lib/views/glimmer/gladiator/gladiator_menu_bar.rb

Instance Method Summary collapse

Instance Method Details

#error_dialog(message:) ⇒ Object

Method-based error_dialog custom widget



183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
# File 'lib/views/glimmer/gladiator/gladiator_menu_bar.rb', line 183

def error_dialog(message:)
  return if message.nil?
  dialog(gladiator) { |dialog_proxy|
    row_layout(:vertical) {
      center true
    }
    
    text 'Error Launching'
      
    styled_text(:border, :h_scroll, :v_scroll) {
      layout_data {
        width gladiator.bounds.width*0.75
        height gladiator.bounds.height*0.75
      }
      
      text message
      editable false
      caret nil
    }
    
    button {
      text 'Close'
      
      on_widget_selected {
        dialog_proxy.close
      }
    }
  }
end

#project_dirObject



178
179
180
# File 'lib/views/glimmer/gladiator/gladiator_menu_bar.rb', line 178

def project_dir
  gladiator.project_dir
end