mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-11-08 19:46:49 +00:00
Example:
local GUI_LISTBOX = 42
function OnPlayerSendMessage(pid, message)
if message == "/lb" then
local items = "consectetur adipiscing elit\nsed do eiusmod tempor incididunt ut labore\net dolore magna aliqua." -- items can be separated through newline
local label = "Lorem ipsum dolor sit amet"
tes3mp.ListBox(pid, GUI_LISTBOX, label, items)
end
end
function OnGUIAction(pid, idGui, data)
if idGui == GUI_LISTBOX then
print("ID: " .. idGui .. " data: " .. tostring(data)) -- if value higher than last item id
end
end
68 lines
1.3 KiB
C++
68 lines
1.3 KiB
C++
#ifndef MWGUI_MODE_H
|
|
#define MWGUI_MODE_H
|
|
|
|
namespace MWGui
|
|
{
|
|
enum GuiMode
|
|
{
|
|
GM_None,
|
|
GM_Settings, // Settings window
|
|
GM_Inventory, // Inventory mode
|
|
GM_Container,
|
|
GM_Companion,
|
|
GM_MainMenu, // Main menu mode
|
|
|
|
GM_Console, // Console mode
|
|
GM_Journal, // Journal mode
|
|
|
|
GM_Scroll, // Read scroll
|
|
GM_Book, // Read book
|
|
GM_Alchemy, // Make potions
|
|
GM_Repair,
|
|
|
|
GM_Dialogue, // NPC interaction
|
|
GM_Barter,
|
|
GM_Rest,
|
|
GM_RestBed,
|
|
GM_SpellBuying,
|
|
GM_Travel,
|
|
GM_SpellCreation,
|
|
GM_Enchanting,
|
|
GM_Recharge,
|
|
GM_Training,
|
|
GM_MerchantRepair,
|
|
|
|
GM_Levelup,
|
|
|
|
// Startup character creation dialogs
|
|
GM_Name,
|
|
GM_Race,
|
|
GM_Birth,
|
|
GM_Class,
|
|
GM_ClassGenerate,
|
|
GM_ClassPick,
|
|
GM_ClassCreate,
|
|
GM_Review,
|
|
|
|
GM_Loading,
|
|
GM_LoadingWallpaper,
|
|
GM_Jail,
|
|
|
|
GM_QuickKeysMenu
|
|
};
|
|
|
|
// Windows shown in inventory mode
|
|
enum GuiWindow
|
|
{
|
|
GW_None = 0,
|
|
|
|
GW_Map = 0x01,
|
|
GW_Inventory = 0x02,
|
|
GW_Magic = 0x04,
|
|
GW_Stats = 0x08,
|
|
|
|
GW_ALL = 0xFF
|
|
};
|
|
}
|
|
|
|
#endif
|