Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

How to realize the interaction between pop-up window and main page in TE

Shulou Source: shulou.com Published: 2022-06-01 03:39:10 09月26日 Update

This article is about how to implement the interaction between pop-ups and home pages in TE. Xiaobian thinks it is quite practical, so share it with everyone for reference. Let's follow Xiaobian and have a look.

In te web development, because ordinary div is difficult to float on te's three-dimensional earth window, even if it floats up, it is unstable. Therefore, it is generally used to pop up a bubble floating on te's three-dimensional window.

The pop-up bubble of te is realized through ShowPopup under Window. The parameters in ShowPopup can be linked to a web page by src.

Pop-up bubbles and home page interaction has two aspects, one is to control some operations of the three-dimensional ball, this can be achieved by defining an sgword object in the pop-up web page, the code and normal api development te.

The other is to operate on the pop-up page to change some html elements on the main page, which will be implemented through the api interface in te.

Define an OnSGWorldMessage event on the main page. The event contains two passed parameters: MessageID and SourceObjectID. According to the api description," If sent by IWindow701.ShowMessageBarText- "MessageBarText". In this case, the MessageID contains the message text。", message content can be transmitted through ShowMessageBarText, messages can be received in OnSGWorldMessage, ShowMessageBarText in Window interface can transmit text parameters, define text content rules, that is, message transmission can be realized.

To prevent the message bar below from popping up during message delivery, use the

The HideMessageBarText method hides the message bar.

In addition, OnSGWorldMessage can also receive some messages of ITerraExplorerObject objects, such as flying to objects.

Thank you for reading! About "how to realize the interaction between pop-up window and main page in TE" this article is shared here. I hope the above content can be of some help to everyone, so that everyone can learn more knowledge. If you think the article is good, you can share it and let more people see it!

Tags: Messages home pages content parameters interfaces 3D floating faceted events objects text more articles web pages development good practical ordinary two code Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Microsoft Xiaomi Redmi Huawei vpn