ManaPlus
Public Member Functions | Static Public Member Functions
PopupManager Class Reference

#include <popupmanager.h>

Public Member Functions

 PopupManager ()
 
 ~PopupManager ()
 

Static Public Member Functions

static bool isBeingPopupVisible ()
 
static bool isTextPopupVisible ()
 
static void closePopupMenu ()
 
static void hideBeingPopup ()
 
static void hideTextPopup ()
 
static void hideItemPopup ()
 
static bool isPopupMenuVisible ()
 
static void clearPopup ()
 
static void hidePopupMenu ()
 

Detailed Description

Definition at line 29 of file popupmanager.h.

Constructor & Destructor Documentation

◆ PopupManager()

PopupManager::PopupManager ( )

Constructor.

Definition at line 39 of file popupmanager.cpp.

40 {
41 }

◆ ~PopupManager()

PopupManager::~PopupManager ( )

Destructor.

Definition at line 43 of file popupmanager.cpp.

44 {
45 }

Member Function Documentation

◆ clearPopup()

void PopupManager::clearPopup ( )
static

Definition at line 94 of file popupmanager.cpp.

95 {
96 #ifndef DYECMD
97  if (popupMenu != nullptr)
98  popupMenu->clear();
99 #endif // DYECMD
100 }
void clear()
Definition: popupmenu.cpp:2758
PopupMenu * popupMenu
Definition: popupmenu.cpp:103

References PopupMenu::clear(), and popupMenu.

Referenced by Game::changeMap().

◆ closePopupMenu()

void PopupManager::closePopupMenu ( )
static

Closes the popup menu. Needed for when the player dies or switching maps.

Definition at line 47 of file popupmanager.cpp.

48 {
49 #ifndef DYECMD
50  if (popupMenu != nullptr)
51  popupMenu->handleLink("cancel", nullptr);
52 #endif // DYECMD
53 }
void handleLink(const std::string &link, MouseEvent *event)
Definition: popupmenu.cpp:1251

References PopupMenu::handleLink(), and popupMenu.

Referenced by PlayerPostDeathListener::action(), and Game::changeMap().

◆ hideBeingPopup()

void PopupManager::hideBeingPopup ( )
static

Hides the BeingPopup.

Definition at line 55 of file popupmanager.cpp.

56 {
57 #ifndef DYECMD
58  if (beingPopup != nullptr)
60 #endif // DYECMD
61 }
BeingPopup * beingPopup
Definition: beingpopup.cpp:47
void setVisible(Visible visible)
Definition: widget.cpp:225
const bool Visible_false
Definition: visible.h:30

References beingPopup, Widget::setVisible(), and Visible_false.

Referenced by Popup::mouseMoved(), Window::mouseMoved(), and LocalPlayer::updateCoords().

◆ hideItemPopup()

void PopupManager::hideItemPopup ( )
static

Definition at line 77 of file popupmanager.cpp.

78 {
79 #ifndef DYECMD
80  if (itemPopup != nullptr)
81  itemPopup->hide();
82 #endif // DYECMD
83 }
void hide()
Definition: popup.cpp:265
ItemPopup * itemPopup
Definition: itempopup.cpp:64

References Popup::hide(), and itemPopup.

Referenced by PopupMenu::showPopup().

◆ hidePopupMenu()

void PopupManager::hidePopupMenu ( )
static

Definition at line 69 of file popupmanager.cpp.

70 {
71 #ifndef DYECMD
72  if (popupMenu != nullptr)
74 #endif // DYECMD
75 }

References popupMenu, Widget::setVisible(), and Visible_false.

Referenced by Viewport::mousePressed().

◆ hideTextPopup()

void PopupManager::hideTextPopup ( )
static

Definition at line 63 of file popupmanager.cpp.

64 {
65  if (textPopup != nullptr)
67 }
TextPopup * textPopup
Definition: textpopup.cpp:33

References Widget::setVisible(), textPopup, and Visible_false.

Referenced by Popup::mouseMoved(), and Window::mouseMoved().

◆ isBeingPopupVisible()

bool PopupManager::isBeingPopupVisible ( )
static

Definition at line 107 of file popupmanager.cpp.

108 {
109 #ifndef DYECMD
110  return beingPopup != nullptr ? beingPopup->isPopupVisible() : false;
111 #else // DYECMD
112  return false;
113 #endif // DYECMD
114 }
bool isPopupVisible() const
Definition: popup.h:174

References beingPopup, and Popup::isPopupVisible().

◆ isPopupMenuVisible()

bool PopupManager::isPopupMenuVisible ( )
static

Definition at line 85 of file popupmanager.cpp.

86 {
87 #ifndef DYECMD
88  return popupMenu != nullptr ? popupMenu->isPopupVisible() : false;
89 #else
90  return false;
91 #endif // DYECMD
92 }

References Popup::isPopupVisible(), and popupMenu.

Referenced by Viewport::mousePressed().

◆ isTextPopupVisible()

bool PopupManager::isTextPopupVisible ( )
static

Definition at line 102 of file popupmanager.cpp.

103 {
104  return textPopup != nullptr ? textPopup->isPopupVisible() : false;
105 }

References Popup::isPopupVisible(), and textPopup.


The documentation for this class was generated from the following files: