forked from SuperTux/supertux
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create stubs for the music picking menu (SuperTux#2617)
- Loading branch information
James De Ricco
committed
Oct 17, 2023
1 parent
14fa511
commit 6ab2ef8
Showing
3 changed files
with
50 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#include "gui/item_music.hpp" | ||
|
||
#include "gui/menu_manager.hpp" | ||
#include "gui/menu_music.hpp" | ||
|
||
ItemMusic::ItemMusic(const std::string& text, int id) : | ||
MenuItem(text, id) | ||
{ | ||
} | ||
|
||
void | ||
ItemMusic::process_action(const MenuAction& action) | ||
{ | ||
if (action == MenuAction::HIT) { | ||
MenuManager::instance().push_menu(std::make_unique<MusicMenu>()); | ||
} | ||
} | ||
|
||
/* EOF */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#ifndef HEADER_SUPERTUX_GUI_ITEM_MUSIC_HPP | ||
#define HEADER_SUPERTUX_GUI_ITEM_MUSIC_HPP | ||
|
||
#include "gui/menu_item.hpp" | ||
|
||
class ItemMusic : public MenuItem | ||
{ | ||
public: | ||
ItemMusic(const std::string& text, int id = -1); | ||
|
||
/** Processes the menu action. */ | ||
virtual void process_action(const MenuAction& action) override; | ||
|
||
}; | ||
|
||
#endif | ||
|
||
/* EOF */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#ifndef HEADER_SUPERTUX_GUI_MENU_MUSIC_HPP | ||
#define HEADER_SUPERTUX_GUI_MENU_MUSIC_HPP | ||
|
||
#include "gui/menu.hpp" | ||
|
||
class MusicMenu : public Menu { | ||
public: | ||
MusicMenu(); | ||
}; | ||
|
||
#endif | ||
|
||
/* EOF */ |