class Opal::UI::Modal

Overview

A centered floating modal dialog component with backdrop dimming and button choices.

Defined in:

opal/ui/components/modal.cr

Constructors

Instance Method Summary

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) #

[View source]

Instance Method Detail

def border_fg : Color #

[View source]
def button_fg : Color #

[View source]
def buttons : Array(String) #

[View source]
def dim_backdrop : Bool #

[View source]
def message : String #

[View source]
def preferred_size(available_w : Int32, available_h : Int32) : Tuple(Int32, Int32) #

[View source]
def render(buffer : Buffer, x : Int32, y : Int32, width : Int32, height : Int32) : Nil #

[View source]
def selected_bg : Color #

[View source]
def selected_button : Int32 #

[View source]
def selected_button=(selected_button : Int32) #

[View source]
def selected_fg : Color #

[View source]
def title : String #

[View source]
def title_fg : Color #

[View source]