PGWaitBar

class PGWaitBar

Bases: PGItem

This is a particular kind of PGItem that draws a little bar that fills from left to right to indicate a slow process gradually completing, like a traditional “wait, loading” bar.

Inheritance diagram

Inheritance diagram of PGWaitBar

explicit PGWaitBar(std::string const &name = "")
PGFrameStyle get_bar_style(void) const

Returns the kind of frame that is drawn on top of the WaitBar to represent the amount completed.

static TypeHandle get_class_type(void)
PN_stdfloat get_percent(void) const

Returns the percentage complete.

PN_stdfloat get_range(void) const

Returns the value at which the WaitBar indicates 100%.

PN_stdfloat get_value(void) const

Returns the current value of the bar.

void set_bar_style(PGFrameStyle const &style)

Sets the kind of frame that is drawn on top of the WaitBar to represent the amount completed.

void set_range(PN_stdfloat range)

Sets the value at which the WaitBar indicates 100%.

void set_value(PN_stdfloat value)

Sets the current value of the bar. This should range between 0 and get_range().

void setup(PN_stdfloat width, PN_stdfloat height, PN_stdfloat range)

Creates a PGWaitBar with the indicated dimensions, with the indicated maximum range.