Viewer color
Moderators: TomKerekes, dynomotion
Viewer color
Hi Tom.
Can I somehow change the background color of the viewer?
I want to make it black instead of green.
Regards,
Taras.
Can I somehow change the background color of the viewer?
I want to make it black instead of green.
Regards,
Taras.
- Attachments
-
- Viewer.png (10.88 KiB) Viewed 4362 times
- TomKerekes
- Posts: 2676
- Joined: Mon Dec 04, 2017 1:49 am
Re: Viewer color
Hi Taras,
Only if you edit the source code and recompile KMotionCNC.
Only if you edit the source code and recompile KMotionCNC.
Regards,
Tom Kerekes
Dynomotion, Inc.
Tom Kerekes
Dynomotion, Inc.
Re: Viewer color
I'm ready to try. It is in this library - BuildAllLibs.sln ?
Tell me where please.
visual studio 2015 already and installed and include MFC option.
Regards,
Taras.
Tell me where please.
visual studio 2015 already and installed and include MFC option.
Regards,
Taras.
- TomKerekes
- Posts: 2676
- Joined: Mon Dec 04, 2017 1:49 am
Re: Viewer color
No KMotionCNC is an Application Example that uses the Libraries. Open BuildExamples.sln. See Also.
You would change this:
in openglCTL.cpp
HTH
You would change this:
Code: Select all
// Colors
m_ClearColorRed = 0.0f;
m_ClearColorGreen = 0.2f;
m_ClearColorBlue = 0.0f;
HTH
Regards,
Tom Kerekes
Dynomotion, Inc.
Tom Kerekes
Dynomotion, Inc.
Re: Viewer color
Hi Tom.
Thank you Tom! I got it all.
I would like to know where you can change the colors of the current position of the axes?
Regards,
Taras.
Thank you Tom! I got it all.
I would like to know where you can change the colors of the current position of the axes?
Regards,
Taras.
Re: Viewer color
I mean yellow, green, white, orange and blue colors showing the current state of the axes.
Thank you.
Thank you.
- Attachments
-
- Axis.png (29.41 KiB) Viewed 4337 times
- TomKerekes
- Posts: 2676
- Joined: Mon Dec 04, 2017 1:49 am
Re: Viewer color
See
Code: Select all
void CKMotionCNCDlg::SetBigValueColor(CDisplay *Disp,int axis, bool KMotionPresent, bool DisplayedEnc)
{
if (m_Simulate)
Disp->SetTextColor(0xFFFFFF);
else if (KMotionPresent && (MainStatus.Enables & (1<<CS_axis[axis])) && CS_axis[axis] >= 0)
{
if (m_ShowMach)
Disp->SetTextColor(0x0080FF);
else
if (DisplayedEnc)
Disp->SetTextColor(0xFFC000);
else
Disp->SetTextColor(0x00FF00);
}
else
Disp->SetTextColor(0x00FFFF);
}
Regards,
Tom Kerekes
Dynomotion, Inc.
Tom Kerekes
Dynomotion, Inc.
Re: Viewer color
Hi Tom.
Thank you Tom! I got it all.
I'm sorry for distracting you.I could not find where the yellow color of the axes is set.
Regards,
Taras.
Thank you Tom! I got it all.
I'm sorry for distracting you.I could not find where the yellow color of the axes is set.
Regards,
Taras.
Re: Viewer color
I'm sorry , I figured it out
Disp->SetTextColor(0x00FFFF);
It's just that this code - 00FFFF is the color of the sea wave.
Thank you Tom!
Regards,
Taras.
Disp->SetTextColor(0x00FFFF);
It's just that this code - 00FFFF is the color of the sea wave.
Thank you Tom!
Regards,
Taras.
Re: Viewer color
Hi Tom.
Is it possible to change the background bitmap of the main window depending on the color of the current position of the axes?
That is, for example, when the axes are not initialized, the background will be one when the second one is initialized.
How to access the main window background bitmap from code?
Regards,
Taras.
Is it possible to change the background bitmap of the main window depending on the color of the current position of the axes?
That is, for example, when the axes are not initialized, the background will be one when the second one is initialized.
How to access the main window background bitmap from code?
Regards,
Taras.