New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add optional labels to overlays. #1514
Conversation
We can't do that on the right side, -there is no units but maybe indicators No good idea to make the right overlays free configurable, indicators do not change. therefore restricted configuration to OFF and default only
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- see comment in code
- you can't remove option to change right overlay
- on your screenshot
"mc" title overwrite AutoMC indicator [E/T/F]
"time" title overwrite compass arrow
for (int i=0; i<NumDataOptions; i++) { | ||
dfe->addEnumText(LKGetText(Data_Options[i].Description)); | ||
} | ||
dfe->Sort(2); | ||
dfe->Sort(2);*/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why ?
dfe->addEnumText(LKGetText(Data_Options[i].Description)); | ||
} | ||
dfe->Sort(2); | ||
dfe->Sort(2);*/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why ?
dfe->addEnumText(LKGetText(Data_Options[i].Description)); | ||
} | ||
dfe->Sort(2); | ||
dfe->Sort(2);*/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why ?
@@ -336,6 +351,8 @@ void dlgOverlaysShowModal(void){ | |||
else | |||
Overlay_RightBottom = dataField+1000-2; // Custom overlay have a code LKValue+1000 | |||
} | |||
|
|||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
???
@@ -32,6 +32,7 @@ | |||
#define RIGHTMARGIN NIBLSCALE(2) // spacing on right border | |||
#define MAPSCALE_SIZE NIBLSCALE(46) | |||
|
|||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
?
Surface.GetTextSize(BufferValue, &TextSize); | ||
if (!HideUnits) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wrong indent and GetTestSize() is costly, so don't call it if it's not needed
@@ -634,11 +659,17 @@ void MapWindow::DrawLook8000(LKSurface& Surface, const RECT& rc) { | |||
rcy = yrightoffset - SizeBigFont.cy +yoffset; | |||
|
|||
LKWriteText(Surface, BufferValue, rcx, rcy, WTMODE_OUTLINED, WTALIGN_LEFT, OverColorRef, true); | |||
if (!HideUnits) { | |||
Surface.GetTextSize(BufferValue, &TextSize); | |||
Surface.GetTextSize(BufferValue, &TextSize); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
GetTestSize() is costly, so don't call it if it's not needed
@@ -661,12 +692,16 @@ void MapWindow::DrawLook8000(LKSurface& Surface, const RECT& rc) { | |||
Surface.SelectObject(LK8OverlayBigFont); | |||
rcy=yrightoffset - fixBigInterline+yoffset; | |||
LKWriteText(Surface, BufferValue, rcx, rcy, WTMODE_OUTLINED, WTALIGN_LEFT, OverColorRef, true); | |||
Surface.GetTextSize(BufferValue, &TextSize); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
GetTestSize() is costly, so don't call it if it's not needed
} | ||
LKWriteText(Surface, BufferValue, cx, cy, | ||
WTMODE_OUTLINED, WTALIGN_RIGHT, OverColorRef, true); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LKWriteText called 2 time with same parameter if ScreenLandscape is false
@@ -207,6 +207,7 @@ GEXTERN short Overlay_LeftDown; | |||
GEXTERN short Overlay_RightTop; | |||
GEXTERN short Overlay_RightMid; | |||
GEXTERN short Overlay_RightBottom; | |||
GEXTERN short Overlay_Title; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ON/OFF parameter should be "bool"
We can't do labels that on the right side,
-there is no units but maybe indicators
No good idea to make the right overlays free configurable, indicators do not change.
Therefore restricted configuration to OFF and default only