From: <ave...@us...> - 2008-09-13 13:57:56
|
Revision: 5279 http://gemrb.svn.sourceforge.net/gemrb/?rev=5279&view=rev Author: avenger_teambg Date: 2008-09-13 13:58:02 +0000 (Sat, 13 Sep 2008) Log Message: ----------- fixed ConvertEdit (now links scrollbar too) Modified Paths: -------------- gemrb/trunk/gemrb/plugins/GUIScript/GUIScript.cpp Modified: gemrb/trunk/gemrb/plugins/GUIScript/GUIScript.cpp =================================================================== --- gemrb/trunk/gemrb/plugins/GUIScript/GUIScript.cpp 2008-09-13 13:28:58 UTC (rev 5278) +++ gemrb/trunk/gemrb/plugins/GUIScript/GUIScript.cpp 2008-09-13 13:58:02 UTC (rev 5279) @@ -1988,7 +1988,7 @@ return RuntimeError("Cannot find window!"); } - Control *ctrl = GetControl(WindowIndex, ControlIndex, IE_GUI_EDIT); + TextEdit *ctrl = (TextEdit *) GetControl(WindowIndex, ControlIndex, IE_GUI_EDIT); if (!ctrl) { return NULL; } @@ -2000,11 +2000,16 @@ ta->ControlID = ctrl->ControlID; ta->ControlType = IE_GUI_TEXTAREA; ta->Owner = win; + ta->SetFonts (ctrl->GetFont(), ctrl->GetFont() ); win->AddControl( ta ); + win->Link( ScrollBarID, ( unsigned short ) ta->ControlID ); - win->DelControl ( ControlIndex ); - Py_INCREF( Py_None ); - return Py_None; + int ret = core->GetControl( WindowIndex, ta->ControlID ); + + if (ret<0) { + return NULL; + } + return PyInt_FromLong( ret ); } PyDoc_STRVAR( GemRB_SetButtonSprites__doc, This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |