class
Opal::UI::Gauge
- Opal::UI::Gauge
- Opal::UI::Element
- Reference
- Object
Overview
Progress gauge with percentage indicator and custom fill/empty glyphs.
Defined in:
opal/ui/components/gauge.crConstructors
Instance Method Summary
- #color : Color | Nil
- #empty_char : Char
- #filled_char : Char
- #label : String | Nil
- #preferred_size(available_w : Int32, available_h : Int32) : Tuple(Int32, Int32)
- #ratio : Float64
- #render(buffer : Buffer, x : Int32, y : Int32, width : Int32, height : Int32) : Nil
-
#resolved_color : Color
Dynamic color based on percentage threshold if no explicit color was set
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(ratio : Float64, label : String | Nil = nil, color : Color | Symbol | String | Nil = nil, filled_char : Char = '█', empty_char : Char = '░')
#
Instance Method Detail
Dynamic color based on percentage threshold if no explicit color was set