From: Laszlo T. <ave...@us...> - 2004-11-22 21:41:46
|
Update of /cvsroot/gemrb/gemrb/gemrb/plugins/GUIScript In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30823/plugins/GUIScript Modified Files: GUIScript.cpp Log Message: Correct button order for iwd2 action buttons Set text for mapnote windows in bg2/iwd2 Correct buffer length for iwd2 mapnote window Index: GUIScript.cpp =================================================================== RCS file: /cvsroot/gemrb/gemrb/gemrb/plugins/GUIScript/GUIScript.cpp,v retrieving revision 1.247 retrieving revision 1.248 diff -C2 -d -r1.247 -r1.248 *** GUIScript.cpp 21 Nov 2004 23:00:24 -0000 1.247 --- GUIScript.cpp 22 Nov 2004 21:41:29 -0000 1.248 *************** *** 843,846 **** --- 843,868 ---- } + PyDoc_STRVAR( GemRB_SetBufferLength__doc, + "SetBufferLength(WindowIndex, ControlIndex, Length)\n\n" + "Sets the maximum text length of a TextEdit Control." ); + + static PyObject* GemRB_SetBufferLength(PyObject * /*self*/, PyObject* args) + { + int WindowIndex, ControlIndex, Length; + + if (!PyArg_ParseTuple( args, "iii", &WindowIndex, &ControlIndex, &Length)) { + return AttributeError( GemRB_SetBufferLength__doc ); + } + + TextEdit* te = (TextEdit *) GetControl( WindowIndex, ControlIndex, IE_GUI_EDIT ); + if (!te) + return NULL; + + te->SetBufferLength( Length ); + + Py_INCREF( Py_None ); + return Py_None; + } + PyDoc_STRVAR( GemRB_SetText__doc, "SetText(WindowIndex, ControlIndex, String|Strref) => int\n\n" *************** *** 4094,4097 **** --- 4116,4120 ---- METHOD(GetSymbolValue, METH_VARARGS), METHOD(GetControl, METH_VARARGS), + METHOD(SetBufferLength, METH_VARARGS), METHOD(SetText, METH_VARARGS), METHOD(QueryText, METH_VARARGS), |