Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Webbrowser

Classes

Class: Webbrowser

Extends Widget

Webbrowser

Warning: Most methods for this class are broken.

A Webbrowser widget embeds a web page viewer within the UI. It allows loading and navigating URLs, simulating mouse events, scrolling, setting zoom levels, and managing focus and drawables for loading or default states. Many predefined requests exist for game-specific pages, although some are broken or not fully functional.

Dependencies:

Method: ClearFocus

(method) Webbrowser:ClearFocus()

Clears focus from the Webbrowser.

Method: RequestWiki

(method) Webbrowser:RequestWiki()

Requests the wiki page in the Webbrowser.

Method: SetDefaultDrawable

(method) Webbrowser:SetDefaultDrawable(drawable: Drawablebase)

Sets the default drawable for the Webbrowser.

@param drawable — The default drawable to set.

Method: RequestTGOS

(method) Webbrowser:RequestTGOS(arg: number)

Requests a TGOS operation in the Webbrowser.

@param arg — The argument for the TGOS request.

Method: RequestPlayDiaryOnTarget

(method) Webbrowser:RequestPlayDiaryOnTarget()

Requests the play diary page based on the current target in the Webbrowser.

Method: RequestSensitiveOperationVerify

(method) Webbrowser:RequestSensitiveOperationVerify(url: string)

Requests verification for a sensitive operation with the specified URL.

@param url — The URL for the sensitive operation.

Method: RequestPlayDiaryInstant

(method) Webbrowser:RequestPlayDiaryInstant(fileName: string)

Requests an instant play diary page by file name in the Webbrowser.

@param fileName — The file name for the play diary.

Method: SetEscEvent

(method) Webbrowser:SetEscEvent(has: boolean)

Enables or disables the WEB_BROWSER_ESC_EVENT event registration for the Webbrowser.

@param hastrue to enable the escape event, false to disable. (default: false)

Method: SetLoadingDrawable

(method) Webbrowser:SetLoadingDrawable(drawable: Drawablebase)

Sets the loading drawable for the Webbrowser.

@param drawable — The drawable to display during loading.

Method: SetZoomLevel

(method) Webbrowser:SetZoomLevel(level: number)

Sets the zoom level for the Webbrowser.

@param level — The zoom level to set. (default: 1)

Method: SetFocus

(method) Webbrowser:SetFocus()

Sets focus to the Webbrowser.

Method: SetUiLayer

(method) Webbrowser:SetUiLayer(layer: "background")

Sets the UI layer for the Webbrowser.

@param layer — The UI layer to set (only “background” confirmed working).

layer:
    | "background"

Method: SetMsgToParent

(method) Webbrowser:SetMsgToParent(toParent: boolean)

Sets whether messages are sent to the parent of the Webbrowser.

@param toParenttrue to send messages to parent, false otherwise.

Method: SetURL

(method) Webbrowser:SetURL(url: string)

Sets the URL for the Webbrowser.

@param url — The URL to load.

Method: WheelDown

(method) Webbrowser:WheelDown()

Scrolls down the page in the Webbrowser.

widget:SetHandler("OnWheelDown", function(self)
  self:WheelDown()
end)

Method: RequestPlayDiaryByPcName

(method) Webbrowser:RequestPlayDiaryByPcName(pcName: string)

Requests the play diary page for a specific PC name in the Webbrowser.

@param pcName — The PC name for the play diary request.

Method: RequestMessengerOnTarget

(method) Webbrowser:RequestMessengerOnTarget()

Requests the messenger page based on the current target in the Webbrowser.

Method: MouseMove

(method) Webbrowser:MouseMove()

Simulates a mouse move event on the Webbrowser and triggers the "OnMouseMove" event.

Method: MouseUp

(method) Webbrowser:MouseUp(button: "LeftButton"|"RightButton")

Simulates a mouse up event on the Webbrowser.

@param button — The mouse button to simulate.

button:
    | "LeftButton"
    | "RightButton"

Method: MouseDown

(method) Webbrowser:MouseDown(button: "LeftButton"|"RightButton")

Simulates a mouse down event on the Webbrowser.

@param button — The mouse button to simulate.

button:
    | "LeftButton"
    | "RightButton"

Method: GetURL

(method) Webbrowser:GetURL()
  -> url: string

Retrieves the current URL of the Webbrowser.

@return url — The current URL. (default: "")

Method: LoadBlankPage

(method) Webbrowser:LoadBlankPage()

Loads a blank page in the Webbrowser.

Method: RequestPlayDiary

(method) Webbrowser:RequestPlayDiary()

Requests the play diary page in the Webbrowser.

Method: RequestExpeditionBBS

(method) Webbrowser:RequestExpeditionBBS()

Requests the expedition BBS page in the Webbrowser.’

Method: RequestExternalPage

(method) Webbrowser:RequestExternalPage(url: string)

Requests an external page in the Webbrowser.

@param url — The URL of the external page.

Method: RequestMessengerByPcName

(method) Webbrowser:RequestMessengerByPcName(pcName: string)

Requests the messenger page for a specific PC name in the Webbrowser.

@param pcName — The PC name for the messenger request.

Method: RequestExpeditionHome

(method) Webbrowser:RequestExpeditionHome()

Requests the expedition home page in the Webbrowser.

Method: RequestMessenger

(method) Webbrowser:RequestMessenger()

Requests the messenger page in the Webbrowser.

Method: RequestHelp

(method) Webbrowser:RequestHelp()

Requests the help page in the Webbrowser.

Method: WheelUp

(method) Webbrowser:WheelUp()

Scrolls up the page in the Webbrowser.

widget:SetHandler("OnWheelUp", function(self)
  self:WheelUp()
end)