stohrendorf / CroftEngine

An open-source Tomb Raider 1 engine remake
Other
281 stars 18 forks source link

CE-478: Add tabs to graphics option settings. #226

Closed serishema closed 2 years ago

serishema commented 2 years ago

This adds a tab for each category of graphics options. press left and right on the dpad to move between tabs.

stohrendorf commented 2 years ago

Can you take a look at the build error reported by lgtm?

[2022-06-13 04:16:51] [build-stderr] In file included from /usr/include/c++/9/memory:80,
[2022-06-13 04:16:51] [build-stderr]                  from /opt/src/src/menu/menustate.h:3,
[2022-06-13 04:16:51] [build-stderr]                  from /opt/src/src/menu/selectedmenustate.h:3,
[2022-06-13 04:16:51] [build-stderr]                  from /opt/src/src/menu/selectedmenustate.cpp:1:
[2022-06-13 04:16:51] [build-stderr] /usr/include/c++/9/bits/unique_ptr.h: In instantiation of ‘void std::default_delete<_Tp>::operator()(_Tp*) const [with _Tp = ui::widgets::TabBox]’:
[2022-06-13 04:16:51] [build-stderr] /usr/include/c++/9/bits/unique_ptr.h:292:17:   required from ‘std::unique_ptr<_Tp, _Dp>::~unique_ptr() [with _Tp = ui::widgets::TabBox; _Dp = std::default_delete<ui::widgets::TabBox>]’
[2022-06-13 04:16:51] [build-stderr] /opt/src/3rdparty/gsl-lite-0.40.0/include/gsl/gsl-lite.hpp:2534:8:   required from ‘void std::default_delete<_Tp>::operator()(_Tp*) const [with _Tp = menu::RenderSettingsMenuState]’
[2022-06-13 04:16:51] [build-stderr] /usr/include/c++/9/bits/unique_ptr.h:292:17:   required from ‘std::unique_ptr<_Tp, _Dp>::~unique_ptr() [with _Tp = menu::RenderSettingsMenuState; _Dp = std::default_delete<menu::RenderSettingsMenuState>]’
[2022-06-13 04:16:51] [build-stderr] /opt/src/src/menu/selectedmenustate.cpp:46:24:   required from here
[2022-06-13 04:16:51] [build-stderr] /usr/include/c++/9/bits/unique_ptr.h:79:16: error: invalid application of ‘sizeof’ to incomplete type ‘ui::widgets::TabBox’
[2022-06-13 04:16:51] [build-stderr]    79 |  static_assert(sizeof(_Tp)>0,
[2022-06-13 04:16:51] [build-stderr]       |                ^~~~~~~~~~~
stohrendorf commented 2 years ago

Looks good. One last thing: when scrolling through the checkboxes of a tab, make it so that it wraps around within the list instead of switching to the next/previous tab. Once that's done, please squash all commits into a single one, and rebase onto the master branch. If possible, also let clang-format reformat the code. Good work.

serishema commented 2 years ago

Thanks, i've made up/down wrap in the list, squashed and rebased this against orgin/master.