2015-09-30 02:56:11 +02:00
|
|
|
#ifndef _ENTITY_TEXTDRAW_HPP_
|
|
|
|
#define _ENTITY_TEXTDRAW_HPP_
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
|
|
#include "Entity.hpp"
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
|
|
namespace SqMod {
|
|
|
|
|
|
|
|
/* ------------------------------------------------------------------------------------------------
|
2015-10-29 22:14:17 +01:00
|
|
|
* Class responsible for managing the referenced textdraw instance.
|
2015-09-30 02:56:11 +02:00
|
|
|
*/
|
|
|
|
class CTextdraw : public Reference< CTextdraw >
|
|
|
|
{
|
|
|
|
public:
|
2015-10-29 22:14:17 +01:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* Import the constructors, destructors and assignment operators from the base class.
|
|
|
|
*/
|
2015-09-30 02:56:11 +02:00
|
|
|
using RefType::Reference;
|
2015-10-29 21:55:36 +01:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
2015-10-29 22:14:17 +01:00
|
|
|
* Show the referenced textdraw instance to all players on the server.
|
2015-10-29 21:55:36 +01:00
|
|
|
*/
|
|
|
|
void ShowAll() const noexcept;
|
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
2015-10-29 22:14:17 +01:00
|
|
|
* Show the referenced textdraw instance to the specified player instance.
|
2015-10-29 21:55:36 +01:00
|
|
|
*/
|
|
|
|
void ShowFor(const Reference< CPlayer > & player) const noexcept;
|
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
2015-10-29 22:14:17 +01:00
|
|
|
* Show the referenced textdraw instance to all players in the specified range.
|
2015-10-29 21:55:36 +01:00
|
|
|
*/
|
|
|
|
void ShowRange(SQInt32 first, SQInt32 last) const noexcept;
|
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
2015-10-29 22:14:17 +01:00
|
|
|
* Hide the referenced textdraw instance from all players on the server.
|
2015-10-29 21:55:36 +01:00
|
|
|
*/
|
|
|
|
void HideAll() const noexcept;
|
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
2015-10-29 22:14:17 +01:00
|
|
|
* Hide the referenced textdraw instance from the specified player instance.
|
2015-10-29 21:55:36 +01:00
|
|
|
*/
|
|
|
|
void HideFor(const Reference< CPlayer > & player) const noexcept;
|
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
2015-10-29 22:14:17 +01:00
|
|
|
* Hide the referenced textdraw instance from all players in the specified range.
|
2015-10-29 21:55:36 +01:00
|
|
|
*/
|
|
|
|
void HideRange(SQInt32 first, SQInt32 last) const noexcept;
|
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
2015-10-29 22:14:17 +01:00
|
|
|
* Set the position of the referenced textdraw instance for all players on the server.
|
2015-10-29 21:55:36 +01:00
|
|
|
*/
|
|
|
|
void SetPositionAll(const Vector2i & pos) const noexcept;
|
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
2015-10-29 22:14:17 +01:00
|
|
|
* Set the position of the referenced textdraw instance for all players on the server.
|
2015-10-29 21:55:36 +01:00
|
|
|
*/
|
|
|
|
void SetPositionAllEx(SQInt32 x, SQInt32 y) const noexcept;
|
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
2015-10-29 22:14:17 +01:00
|
|
|
* Set the position of the referenced textdraw instance for the specified player instance.
|
2015-10-29 21:55:36 +01:00
|
|
|
*/
|
|
|
|
void SetPositionFor(const Reference< CPlayer > & player, const Vector2i & pos) const noexcept;
|
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
2015-10-29 22:14:17 +01:00
|
|
|
* Set the position of the referenced textdraw instance for the specified player instance.
|
2015-10-29 21:55:36 +01:00
|
|
|
*/
|
|
|
|
void SetPositionForEx(const Reference< CPlayer > & player, SQInt32 x, SQInt32 y) const noexcept;
|
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
2015-10-29 22:14:17 +01:00
|
|
|
* Set the position of the referenced textdraw instance for all players in the specified range.
|
2015-10-29 21:55:36 +01:00
|
|
|
*/
|
|
|
|
void SetPositionRange(SQInt32 first, SQInt32 last, const Vector2i & pos) const noexcept;
|
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
2015-10-29 22:14:17 +01:00
|
|
|
* Set the center of the referenced textdraw instance for all players on the server.
|
2015-10-29 21:55:36 +01:00
|
|
|
*/
|
|
|
|
void SetColorAll(const Color4 & col) const noexcept;
|
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
2015-10-29 22:14:17 +01:00
|
|
|
* Set the color of the referenced textdraw instance for all players on the server.
|
2015-10-29 21:55:36 +01:00
|
|
|
*/
|
|
|
|
void SetColorAllEx(Uint8 r, Uint8 g, Uint8 b, Uint8 a) const noexcept;
|
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
2015-10-29 22:14:17 +01:00
|
|
|
* Set the color of the referenced textdraw instance for the specified player instance.
|
2015-10-29 21:55:36 +01:00
|
|
|
*/
|
|
|
|
void SetColorFor(const Reference< CPlayer > & player, const Color4 & col) const noexcept;
|
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
2015-10-29 22:14:17 +01:00
|
|
|
* Set the color of the referenced textdraw instance for the specified player instance.
|
2015-10-29 21:55:36 +01:00
|
|
|
*/
|
|
|
|
void SetColorForEx(const Reference< CPlayer > & player, Uint8 r, Uint8 g, Uint8 b, Uint8 a) const noexcept;
|
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
2015-10-29 22:14:17 +01:00
|
|
|
* Set the color of the referenced textdraw instance for all players in the specified range.
|
2015-10-29 21:55:36 +01:00
|
|
|
*/
|
|
|
|
void SetColorRange(SQInt32 first, SQInt32 last, const Color4 & col) const noexcept;
|
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
2015-10-29 22:14:17 +01:00
|
|
|
* Retrieve the text string used by the referenced textdraw instance.
|
2015-10-29 21:55:36 +01:00
|
|
|
*/
|
|
|
|
const SQChar * GetText() const noexcept;
|
2015-09-30 02:56:11 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
} // Namespace:: SqMod
|
|
|
|
|
|
|
|
#endif // _ENTITY_TEXTDRAW_HPP_
|