Zappy GUI
C++ graphic client: renderer, camera, network
Loading...
Searching...
No Matches
IWidget Class Referenceabstract

Interface for GUI widgets. More...

#include <IWidget.hpp>

+ Inheritance diagram for IWidget:
+ Collaboration diagram for IWidget:

Public Member Functions

virtual ~IWidget ()=default
 
virtual void draw (int scaledFontSize) const =0
 Draws the widget.
 
virtual bool handleInput ()=0
 Processes user input.
 

Detailed Description

Interface for GUI widgets.

Definition at line 11 of file IWidget.hpp.

Constructor & Destructor Documentation

◆ ~IWidget()

virtual IWidget::~IWidget ( )
virtualdefault

Member Function Documentation

◆ draw()

virtual void IWidget::draw ( int  scaledFontSize) const
pure virtual

Draws the widget.

Parameters
scaledFontSizeBase font size for UI scaling.

Implemented in ButtonWidget, EntityTooltipWidget, HudWidget, PlayerPanel, SpeedSlider, TooltipWidget, and WinScreen.

◆ handleInput()

virtual bool IWidget::handleInput ( )
pure virtual

Processes user input.

Returns
true if the widget consumed the input, false otherwise.

Implemented in ButtonWidget, EntityTooltipWidget, HudWidget, PlayerPanel, SpeedSlider, TooltipWidget, and WinScreen.


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