Jump to content
  • Advertisement
Sign in to follow this  
nickvbs

DX UI Static Controls

This topic is 4858 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Is there a way to change the background color or put a texture/skin for static controls? I can change the bk color of the whole dialog but thats not what I want. Heres some code to look at... g_UI.AddStatic( IDC_MSG, L"Hello, Static ", 315, 410, 100, 200 ); g_UI.SetFont(1, L"Times New Roman", 15, NULL); pElementMsg = g_UI.GetStatic(IDC_MSG)->GetElement(0); pElementMsg->SetFont(1,D3DCOLOR_ARGB(255,255,255,255),DT_CENTER | DT_WORDBREAK); pElementMsg->Refresh(); pElementMsg = NULL;

Share this post


Link to post
Share on other sites
Advertisement
right now I'm rendering a sprite behind the static control that acts as a frame for making floating type captions. The sprite width is fixed and the height is adjusted based on the length of the string stored in the static control.

The problem is that not every character takes up the same amount of space. For example, when the string is in all caps, the frames(sprite) height is usually to short.

HeightScale = int(wcslen(m_Tiles.strDescr) / 15) + 1;

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!