Closed lexnewgate closed 5 years ago
I think you didn't understand one thing about windows. You should add window scripts to UI prefab, not in Startup scene. Just open UI.prefab and see where StartGameWindow is attached.
OK. I will have a look at it.
Working on UI Part now. Since I have never used IMGUI, it will take some time.
This is a screenshot of GXT window for the moment.
First, click any button in tablename col. Then a col of crc shows. Then click any item in crc. The corresponding text will be shown in the rightmost col.
There are some performance issues still. When click the MAIN
button, the program will freeze a little bit . Because the MAIN
button contains lots of items. I will work it tomorrow. I know how to handle this issue in UGUI(by using object pool and only show items when they are in viewport), but have no idea how to handle them in IMGUI.
Looks good.
To solve performance issues, use pages. Divide content into pages, and let user select current page. See how it's done in peds window.
The page solution solves the performance problem.
Currently it looks like this. However, when main button clicked.
What do you suggest? Should I make a scroll view of these numbers? Or add two more buttons such as <<
>>
. (When clicked, add all indices to a certain number?)
Mhm, I understand. I think you should limit number of pages to some number, eg 6. And display buttons <<
and >>
, like you said.
I have make the following function a little messy.
public static int DrawPagedViewNumbers (Rect rect, int currentPage, int numPages)
I don't know whether should I refactor it by some design patterns? Or just leave it be. Since it may make the function more complex.
It seems complicated. Leave paging to me. Can you revert changes to GUIUtils
?
And that should be all regarding gxt for now.
Also, revert changes to Startup scene.
Actually, if it works fine with both peds and gxt window, then don't revert GUIUtils
.
yeah. It works well with both peds and gxt window. So I will only revert startup scene. I am not familiar git yet. I will search how to do it.
I have reverted the changes to startup scene.
22
I have integrated the none-ui part. You can test it by uncomment the following code in
GXTWindow.cs
.I am intertested in UI part. However it may take some time for me. So I think I'd better submit the none-ui part first.
There are some thoughts I commented in code. It may look messy. I will delete those after I put them in issues next time.