ID:1669869
 
Resolved
Skins with can-resize=false on a window did not translate properly. Now controls in these windows will be auto-anchored if not anchored already, and the main window's size cannot be changed by winset() as it doesn't make sense in a webclient context.
BYOND Version:507
Operating System:Windows 8 64-bit
Web Browser:Chrome 36.0.1985.143
Applies to:Webclient
Status: Resolved (507.1251)

This issue has been resolved.
Descriptive Problem Summary:
It appears that the anchoring system for skins in the WebClient is funky.

Numbered Steps to Reproduce Problem:
Play a game with a custom skin.

World of Business by Ralf1324


Dreambox (My Classroom) by Kidpaddle45

...clicking View Schedules

...clicking Join Lobby


Manacept by The Magic Man


If you'd like any more examples, let me know. If you'd like me to dish up an example game for your testing purposes, let me know.

Additionally, resizing the iframe doesn't count as a winget(..."size"). I just tested it with an automatic client.view script. It just stretches the icons instead of increasing the view size.

P.S. Sekia seems to run somewhat fine. Better than other games I have tried. I could extract the skins from it and send it in for testing.
A reliable test would be ideal, especially a simple one.

I haven't seen anchoring issues in other games I've tested, but maybe there's some kind of load order or timing situation in play.
I've tested it myself and I came to the conclusion that if a game doesn't have proper anchoring then it will just anchor worse than it would in a DreamSeeker window. While this goes against the whose thought that "BYOND makes game developing easier", it is still the developer's fault for not implementing a proper anchoring system. It's not a bug but instead a more strict system it seems. Especially on windows that aren't allowed to be resized in the first place.

Perhaps a way to solve this issue is to check the can-resize parameter on the current window. If it's false, center it and grab its default window size from the skin and set that to the iframe's size if there isn't an iframe size present. Thus, allowing the dev to set what the iframe size should or should not be. Otherwise, developers will just have to step up their interface building skills and compensate.

http://files.byondhome.com/Xirre/TestSkin1.dmf is properly anchored.


http://files.byondhome.com/Xirre/TestSkin2.dmf is poorly anchored.
I really don't understand what you mean about proper anchoring vs. improper anchoring. Can you describe the difference in some detail?
In response to Lummox JR
A lot of people like to get away with cheap anchoring that only works to a certain extent. TestSkin2.dmf can be taken as an example as it doesn't have anchoring for some of the elements.

Apparently all of the games that I used as an example, sadly, aren't meant to be re-sized. Because they're not meant to be re-sized, the developer probably went about the TestSkin2.dmf method, leaving out some anchors for some of the elements, even though in a DreamSeeker environment they wouldn't need this since the window never re-sizes in the first place.

Would you like me to post the skins for the 3 games that were in the original post along with the fourth one in the second post or is this enough?

P.S. I'm only making small assumptions in hope that you can come up with something as well.
I could put in a check for can-resize on the window/pane when translating the skin, and force the issue by setting auto-anchors.
Auto-anchors might work. We'll have to see how it handles that. I know I enter my anchors in by hand to keep things neat. But, that's just me.

If you do that, there should also be a way to override it. Just for user-friendliness.
Of the games you pointed out that don't work, only Manacept was downloadable; the other two were not. (The classroom project had a bogus download link that I removed, pointing to an old BYOND version of all things. Honestly the temptation to suppress the entry was very high.)

Manacept's issue was actually more subtle, because the anchoring was irrelevant but it was resizing the main window. So that was kind of a separate deal, but I'll lump it in with this fix.
Lummox JR resolved issue with message:
Skins with can-resize=false on a window did not translate properly. Now controls in these windows will be auto-anchored if not anchored already, and the main window's size cannot be changed by winset() as it doesn't make sense in a webclient context.