mirror of
https://github.com/eried/portapack-mayhem.git
synced 2024-12-25 15:29:37 -05:00
allow printing tag even without a valid heading
This commit is contained in:
parent
f6437adc60
commit
27a549dac7
@ -163,7 +163,10 @@ void GeoMap::paint(Painter& painter) {
|
|||||||
prev_x_pos = x_pos;
|
prev_x_pos = x_pos;
|
||||||
prev_y_pos = y_pos;
|
prev_y_pos = y_pos;
|
||||||
}
|
}
|
||||||
|
//center tag above point
|
||||||
|
if(tag_.find_first_not_of(' ') != tag_.npos){ //only draw tag if we have something other than spaces
|
||||||
|
painter.draw_string(r.center() - Point(((int)tag_.length() * 8 / 2), 2 * 16), style(), tag_);
|
||||||
|
}
|
||||||
if (mode_ == PROMPT) {
|
if (mode_ == PROMPT) {
|
||||||
// Cross
|
// Cross
|
||||||
display.fill_rectangle({ r.center() - Point(16, 1), { 32, 2 } }, Color::red());
|
display.fill_rectangle({ r.center() - Point(16, 1), { 32, 2 } }, Color::red());
|
||||||
@ -171,10 +174,6 @@ void GeoMap::paint(Painter& painter) {
|
|||||||
} else if (angle_ < 360){
|
} else if (angle_ < 360){
|
||||||
//if we have a valid angle draw bearing
|
//if we have a valid angle draw bearing
|
||||||
draw_bearing(r.center(), angle_, 10, Color::red());
|
draw_bearing(r.center(), angle_, 10, Color::red());
|
||||||
//center tag above bearing
|
|
||||||
if(tag_.find_first_not_of(' ') != tag_.npos){ //only draw tag if we have something other than spaces
|
|
||||||
painter.draw_string(r.center() - Point(((int)tag_.length() * 8 / 2), 2 * 16), style(), tag_);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
//draw a small cross
|
//draw a small cross
|
||||||
|
Loading…
Reference in New Issue
Block a user