I need help, I can not draw behind each text a black rectangle and that this rectangle when maximizing or adjusting the screen is kept next to the text.
I don't understand how to use Viewport Drawing Methods to make the black rectangular drawing stay behind the text
macroScript StatisticsInfo
category:"DG3Duy"
toolTip:"StatisticsInfo"
buttonText:"StatisticsInfo"
(
fn CoordStatistics =
(
try (MaterialName = getRefCoordSys() ) catch(MaterialName = "")
GW.hText [GW.GetWinSizeX()*0.45,30,0] MaterialName color:yellow
gw.updateScreen()
(
fn playAndStopAnimation =
(
if isAnimPlaying() != true do
forcecompleteRedraw doDisabled:true
)
playAndStopAnimation()
)
)
unRegisterRedrawViewsCallback CoordStatistics
registerRedrawViewsCallback CoordStatistics
CoordStatistics ()
--------------------------------------------------------------------------------------------------
fn TransformationsStatistics =
(
try (MaterialName = toolMode.commandmode) catch(MaterialName = "")
GW.hText [GW.GetWinSizeX()*0.35,30,0] MaterialName color:yellow
gw.updateScreen()
)
unRegisterRedrawViewsCallback TransformationsStatistics
registerRedrawViewsCallback TransformationsStatistics
TransformationsStatistics ()
-------------------------------------------------------------------------------------------------
fn SubselectionStatistics =
(
try (MaterialName = $.GetEPolySelLevel()) catch(MaterialName = "")
GW.hText [GW.GetWinSizeX()*0.55,30,0] MaterialName color:yellow
gw.updateScreen()
)
unRegisterRedrawViewsCallback SubselectionStatistics
registerRedrawViewsCallback SubselectionStatistics
SubselectionStatistics ()
--------------------------------------------------------------------------------------------------
fn NameselectionStatistics =
(
try (MaterialName = objName = selection[1].name) catch(MaterialName = "")
GW.hText [GW.GetWinSizeX()*0.65,30,0] MaterialName color:yellow
gw.updateScreen()
)
unRegisterRedrawViewsCallback NameselectionStatistics
registerRedrawViewsCallback NameselectionStatistics
NameselectionStatistics ()
--------------------------------------------------------------------------------------------------
fn meshStatistics =
if(classof (modPanel.getCurrentObject()) == Editable_Mesh) Then
(
SOLevelName = case SubObjectLevel of
(
3: #face
)
try (SOLevelName = SubObjectLevel() ) catch(MaterialName = "")
GW.hText [GW.GetWinSizeX()*0.55,30,0] SOLevelName color:yellow
gw.updateScreen()
)
unRegisterRedrawViewsCallback meshStatistics
registerRedrawViewsCallback meshStatistics
meshStatistics ()
--------------------------------------------------------------------------------------------------
)
Replies