Example #1
0
    def parse_inner(cls, bits):
        CharacterID = bits.read(UI16)
        Bounds = Rect.from_bitstream(bits)
        bits.skip_flush()

        HasText = bits.read(Bit)
        WordWrap = bits.read(Bit)
        Multiline = bits.read(Bit)
        Password = bits.read(Bit)
        ReadOnly = bits.read(Bit)
        HasColor = bits.read(Bit)
        HasMaxLength = bits.read(Bit)
        HasFont = bits.read(Bit)

        HasFontClass = bits.read(Bit)
        AutoSize = bits.read(Bit)
        HasLayout = bits.read(Bit)
        NotSelectable = bits.read(Bit)
        HasBorder = bits.read(Bit)
        WasStatic = bits.read(Bit)
        IsHTML = bits.read(Bit)
        HasOutlines = bits.read(Bit)

        FontID = None
        FontClass = None
        FontSize = None

        Color = None
        MaxLength = None
        Layout = None
        Text = None

        if HasFont: FontID = bits.read(UI16)
        if HasFontClass: FontClass = bits.read(CString)
        if HasFont: FontSize = bits.read(UI16)

        if HasColor: Color = RGB.from_bitstream(bits)
        if HasMaxLength: MaxLength = bits.read(UI16)
        # if HasLayout:    Layout    = NonExistant.parse(bits)

        Variable = bits.read(CString)
        if HasText: Text = bits.read(CString)

        inst = cls(Bounds, Variable, Text, ReadOnly, IsHTML, WordWrap,
                   Multiline, Password, AutoSize, not NotSelectable, HasBorder,
                   Color, MaxLength, Layout, FontID, FontSize, FontClass,
                   CharacterID)
        inst.wasstatic = WasStatic
        inst.outlines = HasOutlines
        return inst
Example #2
0
    def parse_inner(cls, bits):
        CharacterID = bits.read(UI16)
        Bounds      = Rect.from_bitstream(bits)
        bits.skip_flush()

        HasText       = bits.read(Bit)
        WordWrap      = bits.read(Bit)
        Multiline     = bits.read(Bit)
        Password      = bits.read(Bit)
        ReadOnly      = bits.read(Bit)
        HasColor      = bits.read(Bit)
        HasMaxLength  = bits.read(Bit)
        HasFont       = bits.read(Bit)

        HasFontClass  = bits.read(Bit)
        AutoSize      = bits.read(Bit)
        HasLayout     = bits.read(Bit)
        NotSelectable = bits.read(Bit)
        HasBorder     = bits.read(Bit)
        WasStatic     = bits.read(Bit)
        IsHTML        = bits.read(Bit)
        HasOutlines   = bits.read(Bit)

        FontID    = None
        FontClass = None
        FontSize  = None

        Color     = None
        MaxLength = None
        Layout    = None
        Text      = None

        if HasFont:      FontID    = bits.read(UI16)
        if HasFontClass: FontClass = bits.read(CString)
        if HasFont:      FontSize  = bits.read(UI16)

        if HasColor:     Color     = RGB.from_bitstream(bits)
        if HasMaxLength: MaxLength = bits.read(UI16)
        # if HasLayout:    Layout    = NonExistant.parse(bits)

        Variable         = bits.read(CString)
        if HasText: Text = bits.read(CString)

        inst = cls(Bounds, Variable, Text, ReadOnly, IsHTML, WordWrap,
                   Multiline, Password, AutoSize, not NotSelectable,
                   HasBorder, Color, MaxLength, Layout, FontID, FontSize,
                   FontClass, CharacterID)
        inst.wasstatic = WasStatic
        inst.outlines  = HasOutlines
        return inst
Example #3
0
 def parse_inner(cls, bits):
     return cls(RGB.from_bitstream(bits).color)
Example #4
0
 def parse_inner(cls, bits):
     return cls(RGB.from_bitstream(bits).color)