I'm afraid that it isn't possible.
That topic was about the fact that his render texure didn't display correctly anymore after using tgui, which was caused by badly linking the library. So you won't find much interesting in that topic.
Your generalisation will also not be possible due to the way the window is internally used (access to its view and the mapPixelToCoords function).
But depending on what you are trying to do, there are alternatives. If you only want to draw to a render texture in order to only use the gui on part of the screen, then you would be better of with setting a view for the gui.
So what is it that you are trying to accomplish exactly by rendering the gui to a render texture?
That topic was about the fact that his render texure didn't display correctly anymore after using tgui, which was caused by badly linking the library. So you won't find much interesting in that topic.
Your generalisation will also not be possible due to the way the window is internally used (access to its view and the mapPixelToCoords function).
But depending on what you are trying to do, there are alternatives. If you only want to draw to a render texture in order to only use the gui on part of the screen, then you would be better of with setting a view for the gui.
So what is it that you are trying to accomplish exactly by rendering the gui to a render texture?
.