mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 03:08:11 +00:00
GamesSettings: Move classes into the GamesSettings namespace
This is to allow registering future classes as with GML.
This commit is contained in:
parent
e241b47fee
commit
208653a93c
3 changed files with 9 additions and 1 deletions
|
@ -11,6 +11,8 @@
|
|||
#include <LibGUI/FileSystemModel.h>
|
||||
#include <LibGfx/Palette.h>
|
||||
|
||||
namespace GamesSettings {
|
||||
|
||||
static constexpr StringView default_card_back_image_path = "/res/icons/cards/buggie-deck.png"sv;
|
||||
|
||||
CardSettingsWidget::CardSettingsWidget()
|
||||
|
@ -94,3 +96,5 @@ DeprecatedString CardSettingsWidget::card_back_image_path() const
|
|||
card_back_image_index = card_back_selection.first();
|
||||
return static_cast<GUI::FileSystemModel const*>(m_card_back_image_view->model())->full_path(card_back_image_index);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -13,6 +13,8 @@
|
|||
#include <LibGUI/ModelIndex.h>
|
||||
#include <LibGUI/SettingsWindow.h>
|
||||
|
||||
namespace GamesSettings {
|
||||
|
||||
class CardSettingsWidget final : public GUI::SettingsWindow::Tab {
|
||||
C_OBJECT(CardSettingsWidget)
|
||||
public:
|
||||
|
@ -38,3 +40,5 @@ private:
|
|||
|
||||
GUI::ModelIndex m_last_selected_card_back;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
@ -31,7 +31,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
|
||||
auto window = TRY(GUI::SettingsWindow::create("Games Settings", GUI::SettingsWindow::ShowDefaultsButton::Yes));
|
||||
window->set_icon(app_icon.bitmap_for_size(16));
|
||||
(void)TRY(window->add_tab<CardSettingsWidget>("Cards"sv, "cards"sv));
|
||||
(void)TRY(window->add_tab<GamesSettings::CardSettingsWidget>("Cards"sv, "cards"sv));
|
||||
window->set_active_tab(selected_tab);
|
||||
|
||||
window->show();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue