MeshLib Documentation
Loading...
Searching...
No Matches
MRUISaveChangesPopup.h
Go to the documentation of this file.
1#pragma once
2
3#include <string>
4#include <functional>
5
6#include "exports.h"
7
8namespace MR
9{
10
11namespace UI
12{
13
15{
16 // menu scaling
17 float scaling = 1.0f;
18 // text that is shown if we have nothing to save
19 std::string shortCloseText = "Close";
20 // text that is shown if we have changes but don't want to save them
21 std::string dontSaveText = "Don't Save";
22
23 std::string saveTooltip = "Save current scene";
24 std::string dontSaveTooltip = "Donh't save current scene";
25 std::string cancelTooltip = "Cansel";
26 // header that is used in dialog
27 std::string header;
28 // if not empty this function is called on "save" and "not save" options( if succeed )
29 std::function<void()> onOk = {};
30};
31// Shows ImGui popup that suggests user to save changes,
32// user need to call ImGui::OpenPopup( str_id ) to open this popup.
33// It has 3 options: save, don't save, cancel
34// str_id - ImGui string id for the popup window
35// settings - settings for dialog
36MRVIEWER_API void saveChangesPopup( const char* str_id, const SaveChangesPopupSettings& settings = {} );
37}
38
39}
MRVIEWER_API void saveChangesPopup(const char *str_id, const SaveChangesPopupSettings &settings={})
Definition MRCameraOrientationPlugin.h:8
Definition MRUISaveChangesPopup.h:15
std::string dontSaveText
Definition MRUISaveChangesPopup.h:21
std::string header
Definition MRUISaveChangesPopup.h:27
std::string saveTooltip
Definition MRUISaveChangesPopup.h:23
std::string shortCloseText
Definition MRUISaveChangesPopup.h:19
std::string dontSaveTooltip
Definition MRUISaveChangesPopup.h:24
std::string cancelTooltip
Definition MRUISaveChangesPopup.h:25
std::function< void()> onOk
Definition MRUISaveChangesPopup.h:29
float scaling
Definition MRUISaveChangesPopup.h:17