# Plutonium framework API: pu::ui::Dialog Class Reference

pu::ui::Dialog Class Reference

`#include <ui_Dialog.hpp>`

## Public Member Functions

| Dialog (const std::string &title, const std::string &content)
| ~Dialog ()
void | AddOption (const std::string &opt_name)
void | SetCancelOption (const std::string &opt_name)
void | RemoveCancelOption ()
bool | HasCancelOption ()
void | SetIcon (const std::string &icon_path)
constexpr bool | HasIcon ()
i32 | Show (Application *app_ref)
constexpr bool | UserCancelled ()
bool | IsOk ()

## Static Public Member Functions

static constexpr Color | MakeDialogColor (const u8 alpha)
static constexpr Color | MakeOverColor (const u8 alpha)

## Static Public Attributes

static constexpr Color | DefaultTitleColor = { 0xA, 0xA, 0xA, 0xFF }
static constexpr Color | DefaultContentColor = { 0x14, 0x14, 0x14, 0xFF }
static constexpr Color | DefaultOptionColor = { 0xA, 0xA, 0xA, 0xFF }
static constexpr u32 | DialogExtraBaseWidth = 250
static constexpr u32 | DialogBorderRadius = 35
static constexpr u32 | SpaceBetweenOptions = 20
static constexpr u32 | TitleExtraWidth = 90
static constexpr u32 | ContentExtraWidth = 90
static constexpr u32 | SpaceBetweenContentAndOptions = 140
static constexpr u32 | TitleTopMargin = 20
static constexpr u32 | TitleX = 45
static constexpr u32 | TitleY = 55
static constexpr u32 | ContentX = 45
static constexpr u32 | ContentY = 140
static constexpr u32 | IconExtraHeight = 25
static constexpr u32 | OptionsBaseHorizontalMargin = 45
static constexpr u32 | OptionHeight = 60
static constexpr u32 | OptionHorizontalMargin = 30
static constexpr u32 | OptionBorderRadius = OptionHeight / 3
static constexpr u32 | OptionBottomMargin = 25
static constexpr u8 | MaxScreenFadeAlpha = 125
static constexpr u32 | IconMargin = 30
static constexpr u8 | OverAlphaIncrement = 48
static constexpr u8 | FadeAlphaIncrement = 25

## Constructor & Destructor Documentation

## Dialog()

pu::ui::Dialog::Dialog | ( | const std::string & | title,
|  | const std::string & | content
| ) |  |

## ~Dialog()

pu::ui::Dialog::~Dialog | ( |  | ) |

## Member Function Documentation

## AddOption()

void pu::ui::Dialog::AddOption | ( | const std::string & | opt_name | ) |

## HasCancelOption()

bool pu::ui::Dialog::HasCancelOption | ( |  | ) |

inline

## HasIcon()

constexpr bool pu::ui::Dialog::HasIcon | ( |  | ) |

inlineconstexpr

## IsOk()

bool pu::ui::Dialog::IsOk | ( |  | ) |

inline

## MakeDialogColor()

static constexpr Color pu::ui::Dialog::MakeDialogColor | ( | const u8 | alpha | ) |

inlinestaticconstexpr

## MakeOverColor()

static constexpr Color pu::ui::Dialog::MakeOverColor | ( | const u8 | alpha | ) |

inlinestaticconstexpr

## RemoveCancelOption()

void pu::ui::Dialog::RemoveCancelOption | ( |  | ) |

inline

## SetCancelOption()

void pu::ui::Dialog::SetCancelOption | ( | const std::string & | opt_name | ) |

inline

## SetIcon()

void pu::ui::Dialog::SetIcon | ( | const std::string & | icon_path | ) |

## Show()

i32 pu::ui::Dialog::Show | ( | Application * | app_ref | ) |

## UserCancelled()

constexpr bool pu::ui::Dialog::UserCancelled | ( |  | ) |

inlineconstexpr

## Member Data Documentation

## ContentExtraWidth

constexpr u32 pu::ui::Dialog::ContentExtraWidth = 90

staticconstexpr

## ContentX

constexpr u32 pu::ui::Dialog::ContentX = 45

staticconstexpr

## ContentY

constexpr u32 pu::ui::Dialog::ContentY = 140

staticconstexpr

## DefaultContentColor

constexpr Color pu::ui::Dialog::DefaultContentColor = { 0x14, 0x14, 0x14, 0xFF }

staticconstexpr

## DefaultOptionColor

constexpr Color pu::ui::Dialog::DefaultOptionColor = { 0xA, 0xA, 0xA, 0xFF }

staticconstexpr

## DefaultTitleColor

constexpr Color pu::ui::Dialog::DefaultTitleColor = { 0xA, 0xA, 0xA, 0xFF }

staticconstexpr

## DialogBorderRadius

constexpr u32 pu::ui::Dialog::DialogBorderRadius = 35

staticconstexpr

## DialogExtraBaseWidth

constexpr u32 pu::ui::Dialog::DialogExtraBaseWidth = 250

staticconstexpr

## FadeAlphaIncrement

constexpr u8 pu::ui::Dialog::FadeAlphaIncrement = 25

staticconstexpr

## IconExtraHeight

constexpr u32 pu::ui::Dialog::IconExtraHeight = 25

staticconstexpr

## IconMargin

constexpr u32 pu::ui::Dialog::IconMargin = 30

staticconstexpr

## MaxScreenFadeAlpha

constexpr u8 pu::ui::Dialog::MaxScreenFadeAlpha = 125

staticconstexpr

## OptionBorderRadius

constexpr u32 pu::ui::Dialog::OptionBorderRadius = OptionHeight / 3

staticconstexpr

## OptionBottomMargin

constexpr u32 pu::ui::Dialog::OptionBottomMargin = 25

staticconstexpr

## OptionHeight

constexpr u32 pu::ui::Dialog::OptionHeight = 60

staticconstexpr

## OptionHorizontalMargin

constexpr u32 pu::ui::Dialog::OptionHorizontalMargin = 30

staticconstexpr

## OptionsBaseHorizontalMargin

constexpr u32 pu::ui::Dialog::OptionsBaseHorizontalMargin = 45

staticconstexpr

## OverAlphaIncrement

constexpr u8 pu::ui::Dialog::OverAlphaIncrement = 48

staticconstexpr

## SpaceBetweenContentAndOptions

constexpr u32 pu::ui::Dialog::SpaceBetweenContentAndOptions = 140

staticconstexpr

## SpaceBetweenOptions

constexpr u32 pu::ui::Dialog::SpaceBetweenOptions = 20

staticconstexpr

## TitleExtraWidth

constexpr u32 pu::ui::Dialog::TitleExtraWidth = 90

staticconstexpr

## TitleTopMargin

constexpr u32 pu::ui::Dialog::TitleTopMargin = 20

staticconstexpr

## TitleX

constexpr u32 pu::ui::Dialog::TitleX = 45

staticconstexpr

## TitleY

constexpr u32 pu::ui::Dialog::TitleY = 55

staticconstexpr

The documentation for this class was generated from the following file:

- Plutonium/include/pu/ui/ui_Dialog.hpp