1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-15 23:49:55 +00:00
openmw-tes3mp/apps/openmw/mwgui/mode.hpp
Koncord adb49b7c7d Add New GUI dialog: ListBox
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
2016-11-04 00:24:16 +08:00

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