Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
TFT_eSPI
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
xpstem
TFT_eSPI
Commits
81646293
Commit
81646293
authored
May 11, 2021
by
Bodmer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix #1168
parent
612e7634
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
3 deletions
+4
-3
Extensions/Button.cpp
Extensions/Button.cpp
+2
-1
Extensions/Button.h
Extensions/Button.h
+2
-2
No files found.
Extensions/Button.cpp
View file @
81646293
...
...
@@ -3,10 +3,11 @@
** Grabbed from Adafruit_GFX library and enhanced to handle any label font
***************************************************************************************/
TFT_eSPI_Button
::
TFT_eSPI_Button
(
void
)
{
_gfx
=
0
;
_gfx
=
nullptr
;
_xd
=
0
;
_yd
=
0
;
_textdatum
=
MC_DATUM
;
_label
[
9
]
=
'\0'
;
}
// Classic initButton() function: pass center & size
...
...
Extensions/Button.h
View file @
81646293
...
...
@@ -10,7 +10,7 @@ class TFT_eSPI_Button {
public:
TFT_eSPI_Button
(
void
);
// "Classic" initButton() uses cent
er
& size
// "Classic" initButton() uses cent
re
& size
void
initButton
(
TFT_eSPI
*
gfx
,
int16_t
x
,
int16_t
y
,
uint16_t
w
,
uint16_t
h
,
uint16_t
outline
,
uint16_t
fill
,
uint16_t
textcolor
,
char
*
label
,
uint8_t
textsize
);
...
...
@@ -34,7 +34,7 @@ class TFT_eSPI_Button {
private:
TFT_eSPI
*
_gfx
;
int16_t
_x1
,
_y1
;
// Coordinates of top-left corner of button
int16_t
_xd
,
_yd
;
// Button text datum offsets (wrt cent
er
of button)
int16_t
_xd
,
_yd
;
// Button text datum offsets (wrt cent
re
of button)
uint16_t
_w
,
_h
;
// Width and height of button
uint8_t
_textsize
,
_textdatum
;
// Text size multiplier and text datum for button
uint16_t
_outlinecolor
,
_fillcolor
,
_textcolor
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment