[ui] reintroducing tooltip

This commit is contained in:
Martin Fouilleul 2023-03-09 16:08:42 +01:00
parent c362751c23
commit c7d5cf113e
2 changed files with 9 additions and 2 deletions

View File

@ -318,6 +318,14 @@ int main()
{
ui_style_next(&(ui_style){.fontSize = 26}, UI_STYLE_FONT_SIZE);
ui_label("Milepost UI Demo");
if(ui_box_sig(ui_box_top()).hovering)
{
ui_tooltip("tooltip")
{
ui_label("That is a tooltip!");
}
}
}
ui_style_next(&(ui_style){.size.width = {UI_SIZE_PARENT, 1},

View File

@ -1766,7 +1766,7 @@ void ui_panel_end(void)
//------------------------------------------------------------------------------
// tooltips
//------------------------------------------------------------------------------
/*
ui_sig ui_tooltip_begin(const char* name)
{
ui_context* ui = ui_get_context();
@ -1797,7 +1797,6 @@ void ui_tooltip_end(void)
ui_box_pop(); // tooltip
ui_box_pop(); // ui->overlay
}
*/
//------------------------------------------------------------------------------
// Menus