TDME2  1.9.200
TooltipScreenController.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <string>
4 
5 #include <tdme/tdme.h>
10 
11 using std::string;
12 
16 
17 /**
18  * Tooltip screen controller
19  * @author Andreas Drewke
20  */
22  : public ScreenController
23 {
24 
25 private:
26  GUIScreenNode* screenNode { nullptr };
27  GUITextNode* tooltipNode { nullptr };
28 
29 public:
30  // forbid class copy
32 
33  /**
34  * Public constructor
35  */
37 
38  /**
39  * Destructor
40  */
41  virtual ~TooltipScreenController();
42 
43  // overridden methods
44  GUIScreenNode* getScreenNode() override;
45  void initialize() override;
46  void dispose() override;
47 
48  /**
49  * Show tooltip
50  * @param mouseX mouse X
51  * @param mouseY mouse Y
52  * @param tooltip tooltip
53  */
54  void show(int mouseX, int mouseY, const string& tooltip);
55 
56  /**
57  * Closes the tool tip
58  */
59  void close();
60 
61 };
GUI screen node that represents a screen that can be rendered via GUI system.
Definition: GUIScreenNode.h:72
void show(int mouseX, int mouseY, const string &tooltip)
Show tooltip.
Screen controller, which connects GUI screen definition with code.
#define FORBID_CLASS_COPY(CLASS)
Definition: tdme.h:6