在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):warxander/warmenu开源软件地址(OpenSource Url):https://github.com/warxander/warmenu开源编程语言(OpenSource Language):Lua 100.0%开源软件介绍(OpenSource Introduction):WarMenuInspired by Dear ImGui and GTA V menu system How to Install
Features
Demo menuYou can read its source code to understand how framework works API--- * - optional parameters
WarMenu.CreateMenu(id, title, subTitle*, style*)
WarMenu.CreateSubMenu(id, parent, subTitle*, style*)
WarMenu.CurrentMenu() -- id
WarMenu.OpenMenu(id)
WarMenu.Begin(id)
WarMenu.IsAnyMenuOpened()
WarMenu.IsMenuAboutToBeClosed() -- DEPRECATED: always return false
WarMenu.CloseMenu()
-- Controls
WarMenu.Button(text, subText*)
WarMenu.InputButton(text, windowTitleEntry*, defaultText*, maxLength*, subText*)
WarMenu.SpriteButton(text, dict, name, r*, g*, b*, a*)
WarMenu.MenuButton(text, id, subText*)
WarMenu.CheckBox(text, checked)
WarMenu.ComboBox(text, items, currentIndex)
WarMenu.ToolTip(text, width*, flipHorizontal*)
-- Use them in loop to draw
-- They return true if were selected OR you can use functions below for more granual control
WarMenu.IsItemHovered()
WarMenu.IsItemSelected()
-- See Usage section for more details
WarMenu.End() -- Processing key events and menu logic, use it in loop
-- Customizable options
--- Menu
WarMenu.SetMenuTitle(id, title)
WarMenu.SetMenuSubTitle(id, text) -- it will uppercase automatically
--- Style
--- Property name can be extracted from setter signature, i. e. 'SetMenuTitleColor' -> 'titleColor'
--- Example: local style = { titleColor = { 255, 255, 255 }, maxOptionCountOnScreen = 7, buttonPressedSound = { name = 'name', set = 'set' } }
WarMenu.SetMenuStyle(id, style)
WarMenu.SetMenuX(id, x) -- [0.0..1.0] top left corner
WarMenu.SetMenuY(id, y) -- [0.0..1.0] top
WarMenu.SetMenuWidth(id, width) -- [0.0..1.0]
WarMenu.SetMenuMaxOptionCountOnScreen(id, count) -- 10 by default
WarMenu.SetMenuTitleColor(id, r, g, b, a*)
WarMenu.SetMenuSubTitleColor(id, r, g, b, a*)
WarMenu.SetMenuTitleBackgroundColor(id, r, g, b, a*)
-- or
WarMenu.SetMenuTitleBackgroundSprite(id, dict, name)
WarMenu.SetMenuBackgroundColor(id, r, g, b, a*)
WarMenu.SetMenuTextColor(id, r, g, b, a*)
WarMenu.SetMenuSubTextColor(id, r, g, b, a*)
WarMenu.SetMenuFocusColor(id, r, g, b, a*)
WarMenu.SetMenuFocusTextColor(id, r, g, b, a*)
WarMenu.SetMenuButtonPressedSound(id, name, set) -- https://pastebin.com/0neZdsZ5 Changelog1.5
1.4
1.3
1.2
1.1
1.0
0.9.15
0.9.14
0.9.12
0.9.11
0.9.10
0.9.9
0.9.8
0.9.7
0.9.6
0.9.5
|
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论