[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: Re: [pygame] Pygame-UI: UI Component Framework for python and pygame



For rendering, what do you plan on doing? ( blit, opengl, svg_blit, pygame.draw )

My main request for reusability is loading a .css file.
If for XML, I tried this. [ Using attributes for sll style info seemed wrong. ]

<configuration>
        <component name="inventory left" width="200px" height="150px">
            <parent>inventory root</parent>
            <type>window frame</type>
            <!-- load base, except set font size -->
            <basestyle>inventory.css</basestyle>
            <style>font-size: 20px;</style>
        </component>
        <component name="inventory right" width="100px" height="150px">
            <parent>inventory root</parent>
            <type>window frame</type>
            <basestyle>inventory.css</basestyle>
            <style>font-size: 12px;</style>
        </component>
</configuration>

Or, you could define that in xml:

<configuration>
    <stylelist>
        <style id="inventory base">font-size: 1em; color:gray; font-family: sans-serif;</style>
    </stylelist>
 
    <component name="inventory left pane" basestyle="inventory base" width="200px" height="150px">
        <parent>inventory root</parent>
        <type>window frame</type>
        <style>font-size: 20px;</style>
    </component>
   
    <component name="inventory right pane" basestyle="inventory base" width="100px" height="150px">
        <parent>inventory root</parent>
        <type>window frame</type>
        <style>font-size: 12px;</style>
    </component>
</configuration>





--
Jake