-
-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Preview in Controller should more reflect the final result of the Viewer #34
Comments
This suggestion should help with this issue as well:#29 |
For this and #29 to work, we would need the dimensions of the phone screen. Would probably be possible to achieve with a subviewport. But I've been experiencing problems resizing subviewport containers in Godot 4. When setting their inner subwindow size, resizing the subviewport container itself changes the inner subwindow size as well. |
You don't need the size of the screen for that, nor subwindow. If you get the size of the RichTextLabel from the Viewer, it will be simple to put the preview one in the Controller to the same size. Creating right and left "pushers" using Control nodes with expanding flag in a HBoxContainer will "squeeze" the RichTextLabel until you set its min_width value to the same as the Viewer's one... The same applies for the height. But to simplify things, you just have to use a CenterContainer and put the Controller's RichTextLabel inside. It will "squeeze" the Label in its center as well, and setting the Label's min_width/height will then do the trick. The real difficulty would be to handle portrait/landscape orientation and to make the Controller's preview Label to fit in the allocated space. But I don't see a big issue there. |
The View only accept landscape mode. Using the way you mention would be possible, main reason why I was thinking of using a subviewport was to keep the font size similar to what would be seen in the view. |
Was able to quickly fix the alignment and colors of the preview. Making it similar to the screen size of the phone is something which will take more time. |
Problem:
After tweaking a bit with the configuration, I found that the "preview" and "side-by-side panels are not reflecting at all the configuration.
For example, if I change the background, foreground colors and text alignment / size, everything is still as default in the previews.
Even more, the large preview of the text on the Controller is not even what I will have on my Viewer as the screen size is not matching, making configuration impossible without an actual connection.
Possible Solution:
Make the preview/side-by-side RichTextLabels to reflect the one on the Viewer.
To make things to work very well, it could be possible to require a 1st connection so the Viewer can transmit the dimensions of the RichTextLabel to the Controller so we can adapt it to reflect the final result.
The text was updated successfully, but these errors were encountered: