@@ -463,7 +463,7 @@ int CLuaFunctionDefs::GetBrowserProperty ( lua_State* luaVM )
463463
464464int CLuaFunctionDefs::GUICreateBrowser ( lua_State* luaVM )
465465{
466- // element guiCreateBrowser ( float x, float y, float width, float height, string url, bool isLocal, bool relative, [element parent = nil] )
466+ // element guiCreateBrowser ( float x, float y, float width, float height, bool isLocal, bool relative, [element parent = nil] )
467467 float x; float y; float width; float height; SString url; bool bIsLocal; bool bIsRelative; CClientGUIElement* parent;
468468
469469 CScriptArgReader argStream ( luaVM );
@@ -482,16 +482,9 @@ int CLuaFunctionDefs::GUICreateBrowser ( lua_State* luaVM )
482482
483483 if ( pLuaMain )
484484 {
485- CResource* pResource = pLuaMain->GetResource ();
486- SString strPath;
487- // if ( CResourceManager::ParseResourcePathInput( url, pResource, strPath ) )
488- {
489- CClientGUIElement* pGUIElement = CStaticFunctionDefinitions::GUICreateBrowser ( *pLuaMain, x, y, width, height, strPath, bIsLocal, bIsRelative, parent );
490- lua_pushelement ( luaVM, pGUIElement );
491- return 1 ;
492- }
493- /* else
494- argStream.SetCustomError( strPath, "Bad file path" );*/
485+ CClientGUIElement* pGUIElement = CStaticFunctionDefinitions::GUICreateBrowser ( *pLuaMain, x, y, width, height, bIsLocal, bIsRelative, parent );
486+ lua_pushelement ( luaVM, pGUIElement );
487+ return 1 ;
495488 }
496489 }
497490 else
@@ -501,7 +494,7 @@ int CLuaFunctionDefs::GUICreateBrowser ( lua_State* luaVM )
501494 return 1 ;
502495}
503496
504- int CLuaFunctionDefs::GUIGetBrowser ( lua_State* luaVM )
497+ int CLuaFunctionDefs::GUIGetBrowser ( lua_State* luaVM ) // Or rather guiGetBrowserBrowser?
505498{
506499// webbrowser guiGetBrowser ( gui-webbrowser browser )
507500 CClientGUIElement* pGUIElement;
@@ -511,7 +504,7 @@ int CLuaFunctionDefs::GUIGetBrowser ( lua_State* luaVM )
511504
512505 if ( !argStream.HasErrors () )
513506 {
514- if ( IS_GUI ( pGUIElement) && pGUIElement->GetCGUIType () == CGUI_WEBBROWSER )
507+ if ( IS_GUI ( pGUIElement ) && pGUIElement->GetCGUIType () == CGUI_WEBBROWSER )
515508 {
516509 CClientGUIWebBrowser* pGUIBrowser = static_cast < CClientGUIWebBrowser* > ( pGUIElement );
517510 lua_pushelement ( luaVM, pGUIBrowser->GetBrowser () );
0 commit comments