Good UI lib?
Hi there
I'm new to addon development and I now want to create a nicer ui for https://www.curseforge.com/wow/addon...troke-launcher. Are there any good libs out there? I found Ace3 GUI and Sushi 3.0, what would you recommend? Ideally one which has support for eg displaying tables (no lua tables, html tables), lists, etc I'm new to LUA and am probably spoiled from other languages, but the amount of everyday functions (eg trim, or 'is in table') you have to write on you own is too damn high :O Thanks, Jan |
You cannot run any language outside of Lua/XML.
Look into multiple libraries and see which all is going to fit your needs and go from there. |
AceGUI and Sushi are intended primarily for configuration GUIs -- they provide checkboxes, dropdowns, sliders, etc. Based on the screenshots on your addon page, those don't really apply in your case.
You might get more helpful replies if you describe what kind of GUI you're looking to build. That said, for a non-config GUI you're probably not going to find much of anything. The reason we have libraries for config GUIs is because every checkbox in every addon looks and works pretty much exactly the same way, so abstracting their structure logic away into a library saves everyone whose addon uses a checkbox time and effort. The same doesn't really apply to other UI stuff. |
Ah, ok ... I would like to do someting like this:
1. have a lua table with multiple rows/ columns 2. print that out into a ui element nicely: fixed column width, table headers, autoscrolling, etc 3. read where the user currently has the cursor and highlight that line 4. on key press execute someting based in the current line As I understand it currently, I would need to write something which does the parsing/ displaying based on newline, tabstops, etc ... so I would basically need to do everything manually. If I would be using eg HTML/ Javascript, I would just google for it and take one of the many already available libs which deal with taht topic (eg https://datatables.net/). My hope was that there already exists a lua lib which has such a functionality ... |
Quote:
Code:
local data = { Code:
for i, row in ipairs(data) do Quote:
Each row of the table will be a frame object (or a button, if you want OnClick functionality). Each cell within the row will be a font string. Lay out the cells within the row by anchoring the first cell's TOPLEFT point to the row's TOPLEFT point, and each subsequent cell's TOPLEFT point to the previous cell's TOPRIGHT point, and setting the width of each cell based on its column position. If you want your cells to be bottom-aligned instead of top-aligned, use BOTTOMLEFT and BOTTOMRIGHT instead. If you want vertical center-alignment, use LEFT and RIGHT instead. The table header is just another row, maybe with a different background or different font style to distinguish it from the body rows. To make updating your rows and cells easy, store them in another table when you create them: Code:
local rowFrames = {} Code:
for i, row in ipairs(data) do Quote:
Quote:
Quote:
|
@Phanx: cool, thanks for the extensive info, a lot of usefull information now to work through :)
|
All times are GMT -6. The time now is 02:18 PM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI