Jump to content

Window Transparency


Go to solution Solved by Mali,

Recommended Posts

Hello. Is there any way of managing the window object transparency? To be more specific, is there a way to change the transparency of a whole window with its children? I see there are methods of doing that for other objects like images but can't find a way for the whole CWindow object.

Thank you in advance 😄

 

Link to comment
Share on other sites

  • Honorable Member
  • Solution

ui.Board class example:

This is the hidden content, please

 

CWindow object example:

This is the hidden content, please

 

You can extend these logics

Edited by Mali
  • Metin2 Dev 57
  • Eyes 1
  • Good 11
  • Love 3
  • Love 13

 

Link to comment
Share on other sites

On 11/1/2023 at 6:36 PM, Mali said:

ui.Board class example:

Hidden Content

 

	def SetAlpha(self, alpha):
		self.Base.SetAlpha(alpha)

		for corner in self.Corners:
			corner.SetAlpha(alpha)

		for line in self.Lines:
			line.SetAlpha(alpha)

 

 

 

CWindow object example:

Hidden Content

 

	void CWindow::SetWindowAlpha(float alpha)
	{
		if (IsType(CExpandedImageBox::Type()))
		{
			dynamic_cast<CExpandedImageBox*>(this)->SetDiffuseColor(1.0f, 1.0f, 1.0f, alpha);
		}
		
		for (CWindow* pWindow : m_pChildList)
			if (pWindow)
				pWindow->SetWindowAlpha(alpha);
	}

 

 

 

You can extend these logics

Thank you so much ❤️

  • Metin2 Dev 1
Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

Announcements



×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.