Skip to content
This repository has been archived by the owner on Jan 25, 2023. It is now read-only.

Serialization additions #2523

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

MystMagus
Copy link
Contributor

Saving to binary for UIElement ends up working not quite like the others, because they rely on going through the data that's been written and removing values that are defined by the set style, which you can't really do with the binary serialization. I could add so that UIElement overrides the saving from Animatable and Serializable in order to make it do this, but it seemed like a lot of work for something that probably won't be used. In practice, the difference is that when saving to binary it saves all attributes, while the other formats remove ones that are defined by the style while leaving ones set in addition to those (if I understand it right).

I wanted the binary writing in the first place just because I didn't really want to write and read from XML to copy UI in app, it just felt wrong. Animatable came as a side thing to that since it's the parent to UIElement. The JSON implementation was also an aside, it just made no sense to me to not have all the implementations (JSON should work the same as XML load and save does).

Also as a last note, Menu has a custom save function as well, but I left it out for now.

@github-actions
Copy link

github-actions bot commented Mar 7, 2020

Stale pull request message

@weitjong weitjong added backlog улучшение Улучшение существующих вещей and removed no-pr-activity labels Mar 7, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
backlog улучшение Улучшение существующих вещей
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants