1
0
EQ2Emu/docs/lua_functions/CreateOptionWindow.md
2025-05-28 21:48:33 -04:00

17 lines
695 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

### Function: CreateOptionWindow()
**Description:** Creates a new custom option selection window. This window can hold multiple options (buttons) that the script can present to the player, usually as part of a custom UI or dialogue.
**Parameters:** None (after creation, use other functions to add options).
**Returns:** OptionWindow A handle or reference to the newly created option window object.
**Example:**
```lua
-- Example usage (creating an option window with choices)
local window = CreateOptionWindow()
AddOptionWindowOption(window, "Accept Quest", "Do you accept the quest?")
AddOptionWindowOption(window, "Decline Quest", "Maybe later.")
SendOptionWindow(window, Player)
```