[1.190.008][PB API] TextPanel returns component instead of self in GetSurface()

Digi shared this bug 17 months ago

The problem with returning component instead of self is that the existing text write methods are defined in MyTextPanel and the ones from the component don't actually do anything.

The properties (Font, ContentType, etc) do work along with DrawFrame() because those are indeed handled in the component.

See attached script for replicating, it will find all text surfaces and draw to them while also printing their names in the detail info, you should have at least one PB and one LCD block to test with.

The part with the issue:

// Sandbox.Game.Entities.Blocks.MyTextPanel
IMyTextSurface IMyTextSurfaceProvider.GetSurface(int index)
	if (index != 0)
		return null;
	return this.m_panelComponent;

Either that needs to return `this` or the component needs to handle the textpanel's WriteText()/GetText()/etc too.

Comments (2)


Hello, Engineer!

Thank you for your feedback! Your topic has been added between considered issues.

Please keep voting for the issue as it will help us to identify the most serious bugs.

We really appreciate your patience.

Kind Regards

Keen Software House: QA Department


This issue seems to be fixed, tested in v1.194.211.