Noir
  • πŸšΆβ€β™‚οΈIntro
  • πŸ“Tutorials
    • πŸŽ“Starting Noir
    • πŸ“–Libraries
    • πŸ–₯️Services
    • ❔Libraries VS Services
    • πŸ’¬Callbacks
    • πŸ’₯Classes
    • πŸ”ŽDebugging
  • πŸ“šExamples
  • β˜„οΈAPI Reference
    • Bootstrapper
    • Built-Ins
      • Classes
        • AITarget
        • Body
        • Command
        • Connection
        • Event
        • HTTPRequest
        • HTTPResponse
        • Library
        • Message
        • Object
        • Player
        • Service
        • Task
        • TickIterationProcess
        • Tracker
        • Vehicle
        • Widgets
          • MapLabelWidget
          • MapLineWidget
          • MapObjectWidget
          • PopupWidget
          • ScreenPopupWidget
          • Widget
      • Libraries
        • Base64
        • Dataclasses
        • Deprecation
        • Events
        • HTTP
        • JSON
        • Logging
        • Matrix
        • Number
        • String
        • Table
      • Services
        • CommandService
        • GameSettingsService
        • HTTPService
        • MessageService
        • NotificationService
        • ObjectService
        • PlayerService
        • TaskService
        • TPSService
        • UIService
        • VehicleService
    • Callbacks
    • Class
    • Classes
    • Debugging
    • Definition
    • Libraries
    • Noir
    • Services
    • TypeChecking
Powered by GitBook
On this page
  • Parameters
  • Parameters
  • Parameters
  • Returns
  • Parameters
  • Returns
  • Parameters
  • Parameters
Edit on GitHub
  1. API Reference
  2. Built-Ins
  3. Classes
  4. Widgets

PopupWidget

Noir.Classes.PopupWidget: NoirClass

Represents a 3D space popup UI widget to be shown to players via UIService.


Noir.Classes.PopupWidget:Init(ID, visible, text, position, renderDistance, player)

Initializes a new popup widget.

Parameters

  • ID: number

  • visible: boolean

  • text: string

  • position: SWMatrix

  • renderDistance: number

  • player: NoirPlayer|nil


Noir.Classes.PopupWidget:AttachToBody(body)

Attaches this popup to a body.

Upon doing so, the popup will follow the body's position until detached with the :Detach() method.

You can offset the popup from the body by setting the AttachmentOffset property.

Note that :Update() is called automatically.

Parameters

  • body: NoirBody


Noir.Classes.PopupWidget:AttachToObject(object)

Attaches this popup to an object.

Upon doing so, the popup will follow the object's position until detached with the :Detach() method.

You can offset the popup from the object by setting the AttachmentOffset property.

Note that :Update() is called automatically.

Parameters

  • object: NoirObject


Noir.Classes.PopupWidget:Detach()

Detaches this popup from any body or object.


Noir.Classes.PopupWidget:_Serialize() ---@diagnostic disable-next-line missing-return

Serializes this popup widget.

Returns

  • NoirSerializedPopupWidget


Noir.Classes.PopupWidget:Deserialize(serializedWidget)

Deserializes a popup widget.

Parameters

  • serializedWidget: NoirSerializedPopupWidget

Returns

  • NoirPopupWidget|nil


Noir.Classes.PopupWidget:_Update(player)

Handles updating this widget.

Parameters

  • player: NoirPlayer


Noir.Classes.PopupWidget:_Destroy(player)

Handles destroying this widget.

Parameters

  • player: NoirPlayer

PreviousMapObjectWidgetNextScreenPopupWidget

Last updated 2 months ago

β˜„οΈ