-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Migrate uilist to ImGui #73045
Migrate uilist to ImGui #73045
Commits on Apr 15, 2024
-
Mostly in pretty good shape. * the loading progress indicators don’t look right * imgui layer doesn’t properly handle a ui_adaptor that is supposed to hide all other ui * a uilist that is reset doesn’t show any options * no second column text is drawn * uilist is now an imgui window with a title, so the "text" of the list has been split into a title and a help text; most just have a title with no help text * maybe other things
Configuration menu - View commit details
-
Copy full SHA for 9a9eb72 - Browse repository at this point
Copy the full SHA 9a9eb72View commit details -
Configuration menu - View commit details
-
Copy full SHA for 0781a9d - Browse repository at this point
Copy the full SHA 0781a9dView commit details -
Taking a different approach with imgui uilist, going to try to make t…
…his smaller, we can refactor uilist in a different PR
Configuration menu - View commit details
-
Copy full SHA for d5abe30 - Browse repository at this point
Copy the full SHA d5abe30View commit details -
Configuration menu - View commit details
-
Copy full SHA for 91f87f3 - Browse repository at this point
Copy the full SHA 91f87f3View commit details -
Configuration menu - View commit details
-
Copy full SHA for 2fedf29 - Browse repository at this point
Copy the full SHA 2fedf29View commit details -
Configuration menu - View commit details
-
Copy full SHA for 2b6d797 - Browse repository at this point
Copy the full SHA 2b6d797View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6b2bf55 - Browse repository at this point
Copy the full SHA 6b2bf55View commit details
Commits on May 2, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 5c8c964 - Browse repository at this point
Copy the full SHA 5c8c964View commit details -
Configuration menu - View commit details
-
Copy full SHA for 22b97aa - Browse repository at this point
Copy the full SHA 22b97aaView commit details -
Configuration menu - View commit details
-
Copy full SHA for 4a8eff3 - Browse repository at this point
Copy the full SHA 4a8eff3View commit details -
Configuration menu - View commit details
-
Copy full SHA for 7487b55 - Browse repository at this point
Copy the full SHA 7487b55View commit details -
move draw_colored_text to the cataimgui namespace
There’s no need for it to be a method of cataimgui::window, since it accesses no state on the window. This will allow callers that are not derived classes.
Configuration menu - View commit details
-
Copy full SHA for 55e71af - Browse repository at this point
Copy the full SHA 55e71afView commit details -
make foldstring wrap each line separately
This shouldn’t change the output except in the case where no wrapping is actually happening. When width was zero, the input was not actually being broken into lines at all, causing confusion later on.
Configuration menu - View commit details
-
Copy full SHA for 53033b1 - Browse repository at this point
Copy the full SHA 53033b1View commit details -
rewrite pocket_favorite_callback (advanced inventory) to use ImGui
This uilist is supposed to fill the screen, but for some reason it is too short. Also, the title has a color tag in it; probably that should be moved to the help text.
Configuration menu - View commit details
-
Copy full SHA for 6df2bed - Browse repository at this point
Copy the full SHA 6df2bedView commit details -
Configuration menu - View commit details
-
Copy full SHA for ab939f1 - Browse repository at this point
Copy the full SHA ab939f1View commit details -
remove mention of ui_adaptor from users of uilist
The uilist_impl derives from cataimgui::window, which creates and manages the ui_adaptor for us.
Configuration menu - View commit details
-
Copy full SHA for bf8f720 - Browse repository at this point
Copy the full SHA bf8f720View commit details -
Configuration menu - View commit details
-
Copy full SHA for 41c0d2a - Browse repository at this point
Copy the full SHA 41c0d2aView commit details -
It was purely aesthetic. All it did was tweak the border of the uilist so that it blends more seamlessly with some other UI already on the screen, which is now unnecessary.
Configuration menu - View commit details
-
Copy full SHA for ef0cf55 - Browse repository at this point
Copy the full SHA ef0cf55View commit details -
rewrite teleporter_callback to use ImGui
Drawing the map needed more work than I expected. It traverses the map in an odd order, causing it to be flipped or rotated 180° when printed naively. Thus both the original and the new implementation for ImGui calculate the position of each character and reposition the cursor for each one.
Configuration menu - View commit details
-
Copy full SHA for 582c7d8 - Browse repository at this point
Copy the full SHA 582c7d8View commit details -
Configuration menu - View commit details
-
Copy full SHA for d03ef9d - Browse repository at this point
Copy the full SHA d03ef9dView commit details -
Configuration menu - View commit details
-
Copy full SHA for c8dd700 - Browse repository at this point
Copy the full SHA c8dd700View commit details -
uilist should allow the choices to scroll, not the whole window
Now actually measure the menu items to find their width, and size the window reliably to fit without growing larger than the screen. (Will need to be tweaked when I fix the title bar though.)
Configuration menu - View commit details
-
Copy full SHA for d75d0b1 - Browse repository at this point
Copy the full SHA d75d0b1View commit details -
Configuration menu - View commit details
-
Copy full SHA for b351e9e - Browse repository at this point
Copy the full SHA b351e9eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 15ae4e3 - Browse repository at this point
Copy the full SHA 15ae4e3View commit details -
Rewrite the wish_item_callback to use ImGui, but imperfectly
There are some niggling little bugs left that I am too tired to work out at the moment.
Configuration menu - View commit details
-
Copy full SHA for c885ab4 - Browse repository at this point
Copy the full SHA c885ab4View commit details -
Configuration menu - View commit details
-
Copy full SHA for cfe4df4 - Browse repository at this point
Copy the full SHA cfe4df4View commit details -
Configuration menu - View commit details
-
Copy full SHA for 60631ff - Browse repository at this point
Copy the full SHA 60631ffView commit details -
remove color stack and wrap width from cataimgui::draw_colored_text
ImGui already has stacks for those. Of course, it's still not working perfectly.
Configuration menu - View commit details
-
Copy full SHA for ab41c11 - Browse repository at this point
Copy the full SHA ab41c11View commit details -
Configuration menu - View commit details
-
Copy full SHA for d9a01bd - Browse repository at this point
Copy the full SHA d9a01bdView commit details -
finally remove all mention of catacurses from the uilist
and a bunch of useless commented–out code that we have replaced.
Configuration menu - View commit details
-
Copy full SHA for 6735c49 - Browse repository at this point
Copy the full SHA 6735c49View commit details -
uilist uses Selectable correctly to handle mouse events
Actually clicking to select an item doesn’t work for unknown reasons, however. It always selects the wrong item.
Configuration menu - View commit details
-
Copy full SHA for 57536be - Browse repository at this point
Copy the full SHA 57536beView commit details -
Configuration menu - View commit details
-
Copy full SHA for 5c192b5 - Browse repository at this point
Copy the full SHA 5c192b5View commit details -
it must have been brought in by a transitive include
Configuration menu - View commit details
-
Copy full SHA for 2340525 - Browse repository at this point
Copy the full SHA 2340525View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5c308e7 - Browse repository at this point
Copy the full SHA 5c308e7View commit details -
mouse input actually works correctly in uilists
The selected menu item is now updated on hover, and the correct menu item now is activated on click. Really all that was missing was that parent.selected was not being updated.
Configuration menu - View commit details
-
Copy full SHA for e4aa53f - Browse repository at this point
Copy the full SHA e4aa53fView commit details -
oops, forgot about it again
Configuration menu - View commit details
-
Copy full SHA for a0b0e23 - Browse repository at this point
Copy the full SHA a0b0e23View commit details