summaryrefslogtreecommitdiff
path: root/scene/gui/link_button.h
blob: d2184823378c7d3f8c4c6161ca4377f02b85b735 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#ifndef LINKBUTTON_H
#define LINKBUTTON_H


#include "scene/gui/base_button.h"
#include "scene/resources/bit_mask.h"

class LinkButton : public BaseButton {

	OBJ_TYPE( LinkButton, BaseButton );
public:

	enum UnderlineMode {
		UNDERLINE_MODE_ALWAYS,
		UNDERLINE_MODE_ON_HOVER
	};
private:
	String text;
	UnderlineMode underline_mode;

protected:

	virtual Size2 get_minimum_size() const;
	void _notification(int p_what);
	static void _bind_methods();

public:

	void set_text(const String& p_text);
	String get_text() const;

	void set_underline_mode(UnderlineMode p_underline_mode);
	UnderlineMode get_underline_mode() const;

	LinkButton();
};

VARIANT_ENUM_CAST( LinkButton::UnderlineMode );

#endif // LINKBUTTON_H