class
Opal::UI::Modal
- Opal::UI::Modal
- Opal::UI::Element
- Reference
- Object
Overview
A centered floating modal dialog component with backdrop dimming and button choices.
Defined in:
opal/ui/components/modal.crConstructors
Instance Method Summary
- #border_fg : Color
- #button_fg : Color
- #buttons : Array(String)
- #dim_backdrop : Bool
- #message : String
- #preferred_size(available_w : Int32, available_h : Int32) : Tuple(Int32, Int32)
- #render(buffer : Buffer, x : Int32, y : Int32, width : Int32, height : Int32) : Nil
- #selected_bg : Color
- #selected_button : Int32
- #selected_button=(selected_button : Int32)
- #selected_fg : Color
- #title : String
- #title_fg : Color
Instance methods inherited from class Opal::UI::Element
preferred_size(available_w : Int32, available_h : Int32) : Tuple(Int32, Int32)
preferred_size,
render(buffer : Buffer, x : Int32, y : Int32, width : Int32, height : Int32) : Nil
render
Constructor Detail
def self.new(title : String, message : String, buttons : Array(String) = ["OK"], selected_button : Int32 = 0, border_fg : Color | Symbol | String = :cyan, title_fg : Color | Symbol | String = :bright_white, button_fg : Color | Symbol | String = :white, selected_fg : Color | Symbol | String = :black, selected_bg : Color | Symbol | String = :cyan, dim_backdrop : Bool = true)
#