Jump to content

MatrixGene

Members
  • Posts

    3
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

MatrixGene's Achievements

Newbie

Newbie (4/54)

0

Reputation

  1. Have you tried guiCreateBrowser? Of course, now I have a solution, which is to still use CEGUI to process text input
  2. I use pinyin input method It currently handles the mouse and keyboard correctly But I can't input non English content into the input in HTML I wonder if someone has solved this problem Here is my code local screenWidth, screenHeight local browser function onBrowserRender() dxDrawImage(0, 0, screenWidth, screenHeight, browser, 0, 0, 0, tocolor(255, 255, 255, 255), true) end function onBrowserCreated() loadBrowserURL(browser, "http://mta/local/index.html") focusBrowser(browser) addEventHandler("onClientRender", root, onBrowserRender) addEventHandler("onClientKey", root, onKey) addEventHandler("onClientCursorMove", root, onCursorMove) end addEventHandler("onClientClick", getRootElement(), function(button, state) if state == "down" then injectBrowserMouseDown(browser, button) else injectBrowserMouseUp(browser, button) end end ) addEventHandler( "onClientResourceStart", getRootElement(), function ( startedRes ) screenWidth, screenHeight = guiGetScreenSize() browser = createBrowser(screenWidth, screenHeight, true, true) addEventHandler( "onClientBrowserCreated", browser, onBrowserCreated) end ) function onKey(button) if button == "mouse_wheel_down" then injectBrowserMouseWheel(webBrowser, -40, 0) elseif button == "mouse_wheel_up" then injectBrowserMouseWheel(webBrowser, 40, 0) end end function onCursorMove(relativeX, relativeY, absoluteX, absoluteY) injectBrowserMouseMove(browser, absoluteX, absoluteY) end
×
×
  • Create New...