Difference between revisions of "TODO/User interface toolkit/Popup"
Jump to navigation
Jump to search
(Created page with '*<code>MN_InitPopup(name, title, text, button number)</code> **<code>name</code>: menu name, if we want to use another popup definition. Next functions will reuse the menu name d…') |
(No difference)
|
Latest revision as of 14:14, 13 August 2010
MN_InitPopup(name, title, text, button number)
name
: menu name, if we want to use another popup definition. Next functions will reuse the menu name defined here.button number
: number of button for the popup (0..3) to update the layout.
MN_InitPopupButton(num, label, tooltip, action)
- For each button we must call
MN_InitPopupButton
. Then it allow to use one call ofva
for each call.
- For each button we must call
MN_PushPopup(...)
- Yet not sure we should add this function.
Every param from this functions will be cloned. We dont need static string for label, or command.
Example cp_installation_callback.c line 267:
MN_InitPopup(NULL, _("Destroy Installation"), _("Do you really want to destroy this installation?"), 2); MN_InitPopupButton(0, _("Destroy"), _("Destroy installation"), command); MN_InitPopupButton(1, _("Cancel"), _("Forget it"), "mn_pop;"); MN_PushPopup()
Then we also can take a look at MN_PopupList
to see if we can do the same (convert to MN_InitPopupList).
We should finally aim to allow multi instance of the same popup, but it's not yet possible.