1.1 --- a/core/smn_menus.cpp Sun Aug 19 17:31:26 2007 +0000
1.2 +++ b/core/smn_menus.cpp Sun Aug 19 18:34:36 2007 +0000
1.3 @@ -1217,6 +1217,20 @@
1.4 return panel->GetCurrentKey();
1.5 }
1.6
1.7 +static cell_t GetPanelTextRemaining(IPluginContext *pContext, const cell_t *params)
1.8 +{
1.9 + Handle_t hndl = (Handle_t)params[1];
1.10 + HandleError err;
1.11 + IMenuPanel *panel;
1.12 +
1.13 + if ((err=ReadPanelHandle(hndl, &panel)) != HandleError_None)
1.14 + {
1.15 + return pContext->ThrowNativeError("Menu handle %x is invalid (error %d)", hndl, err);
1.16 + }
1.17 +
1.18 + return panel->GetAmountRemaining();
1.19 +}
1.20 +
1.21 static cell_t SetPanelCurrentKey(IPluginContext *pContext, const cell_t *params)
1.22 {
1.23 Handle_t hndl = (Handle_t)params[1];
1.24 @@ -1355,6 +1369,7 @@
1.25 {"GetMenuStyle", GetMenuStyle},
1.26 {"GetMenuStyleHandle", GetMenuStyleHandle},
1.27 {"GetMenuTitle", GetMenuTitle},
1.28 + {"GetPanelTextRemaining", GetPanelTextRemaining},
1.29 {"GetPanelCurrentKey", GetPanelCurrentKey},
1.30 {"GetPanelStyle", GetPanelStyle},
1.31 {"InsertMenuItem", InsertMenuItem},