예제 #1
0
파일: Font.cs 프로젝트: sopindm/CodeSamples
        protected override void doDeserialize(Stream stream)
        {
            string alignmentString = stream.tryReadString();
            if(alignmentString != null)
            alignment = (Alignment)Enum.Parse(typeof(Alignment), alignmentString);
            else
            alignment = Alignment.Default;

            string styleString = stream.tryReadString();

            if(styleString != null)
            style = (FontStyle)Enum.Parse(typeof(FontStyle), styleString);
            else style = FontStyle.Default;

            normal = Color.tryCreate(stream);
            onNormal = Color.tryCreate(stream);
            hover = Color.tryCreate(stream);
            onHover = Color.tryCreate(stream);
            focused = Color.tryCreate(stream);
            onFocused = Color.tryCreate(stream);
            active = Color.tryCreate(stream);
            onActive = Color.tryCreate(stream);
        }