• <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>

            socketref,再見!高德

            https://github.com/adoggie

              C++博客 :: 首頁 :: 聯系 :: 聚合  :: 管理
              246 Posts :: 4 Stories :: 312 Comments :: 0 Trackbacks

            常用鏈接

            留言簿(54)

            我參與的團隊

            搜索

            •  

            最新評論

            閱讀排行榜

            評論排行榜

            note: This page only applies to CEGUI >= 0.4.0

            The unified metrics system in CEGUI 0.4.0 and up, allows you to have both a relative and absolute component of a coordinate / dimension. This gives you alot more flexibility in how you layout your windows. For example you can use relative metrics for the height and absolute metrics for the width. Or simply mix and match.

            There are three different forms in unified metrics:

            • UDim - a single dimension.
            • UVector2 - a two dimensional UDim vector
            • URect - four UDims describing a rectangle by its left, top, right and bottom edges.

            The property system in CEGUI uses a special syntax for unified dimensions.

            Contents

            [hide]

            UDim

            The UDim is the simplest.

            {''scale'',''offset''}   fx:   {1,0}

            The scale component relative to the parent window, after it has been translated to pixels the offset is added. So if we used the example above as value for the UnifiedWidth property we would get a window exactly the width of its parent.

            Another example could be
            {0.5,25}
            which would make it half the width of its parent plus 25 pixels.

            The properties that take a single UDim like the ones used above are:

            • UnifiedXPosition
            • UnifiedYPosition
            • UnifiedWidth
            • UnifiedHeight

            UVector2

            The UVector2 is used for position and size if you want avoid specifying each single dimension seperately (x,y,w,h).

            {{''x-scale'',''x-offset''},{''y-scale'',''y-offset''}}   fx:   {{1,0},{1,0}}

            Besides the extra {..} around its two UDims it's very similar. Let's say we use the example above as value for the UnifiedSize property of a window, we would get a window that had exactly the same size as its parent.

            {{1,0},{0,100}}
            would yield a window width the same width as its parent but an absolute height of 100 pixels.

            The properties that take UVector2 values are:

            • UnifiedPosition
            • UnifiedSize
            • UnifiedMinSize
            • UnifiedMaxSize

            URect

            The last type is URect. It's a little special in that it specifies the left, top, right and bottom edges instead of position and size. As there is alot of parameters I'll write ls instead of left-scale, to instead of top-offset etc.

            {{ls,lo},{ts,to},{rs,ro},{bs,bo}}   fx:   {{0,0},{0,0},{1,0},{1,0}}

            The example above is the default rectangle for a DefaultWindow type window. It will cover the entire area of it's parent window. There is only one property that takes a URect. UnifiedAreaRect.

            The fact that we are specifying edges instead of size, can be useful. For example if we want a window to cover its entire parent, but leave a 10 pixel border a value like this could be used:
            {{0,10},{0,10},{1,-10},{1,-10}}

            The x and y position are simple absolute-only dims with a value of 10 pixels. The right and bottom edges are 100% relative components with a offset of -10 which will make it "move back" 10 pixels relative to the parent's right and bottom edges.

            XML examples

            <Property Name="UnifiedPosition" Value="{{0.1,10},{1.0,-30}}" />

            X-position: 10% of the width of the parent window + 10 pixel 父窗體1/10+ 10個像素

            Y-position: 30 pixel above the bottom of the parent window 父窗體高度差30個像數


            <Property Name="UnifiedSize" Value="{{0.6,5},{0.3,20}}" />

            Width: 60% of the width of the parent window + 5 pixel

            Height: 30% of the height of the parent window + 20 pixel


            <Property Name="UnifiedXPosition" Value="{0.25,-5}" />

            X-position: 25% of the width of the parent window minus 5 pixel


            <Property Name="UnifiedAreaRect" Value="{{0.1,0},{0.1,0},{0.9,0},{0.9,0}}" />

            X-position: 10% of the width of the parent window.

            Y-position: 10% of the height of the parent window.

            Width: 80% of the width of the parent window.

            Height: 80% of the height of the parent window.

            posted on 2008-05-10 03:04 放屁阿狗 閱讀(318) 評論(0)  編輯 收藏 引用 所屬分類: OpenSource開源工程
            久久成人18免费网站| 久久精品免费大片国产大片| 99久久精品国产毛片| 中文字幕久久欲求不满| 色综合久久综合网观看| 久久99精品久久久久久齐齐| 亚洲国产成人精品久久久国产成人一区二区三区综 | 亚洲精品99久久久久中文字幕| 亚洲精品国精品久久99热一| 99999久久久久久亚洲| 免费一级欧美大片久久网| 久久99国产综合精品女同| 日日狠狠久久偷偷色综合免费| 狠狠色丁香婷婷久久综合五月 | 久久久www免费人成精品| 久久综合丁香激情久久| 久久综合成人网| 青青草国产成人久久91网| 国产成人精品综合久久久久| 久久久久久久亚洲精品| 欧美黑人激情性久久| 人妻无码久久一区二区三区免费| 色综合久久久久| 国产精品久久免费| 亚洲精品乱码久久久久久自慰| 久久青青草原精品国产不卡| 国内精品久久久久久99蜜桃 | 久久夜色精品国产www| 91精品国产综合久久精品| 久久精品国产亚洲av麻豆蜜芽| 精品国产乱码久久久久久浪潮| 狠狠色丁香婷婷久久综合不卡| 精品久久久久香蕉网| 久久妇女高潮几次MBA| 久久久久久久综合狠狠综合| 日本精品久久久久久久久免费| 久久精品国产免费一区| 99久久国产热无码精品免费 | 91久久精品国产91性色也| 秋霞久久国产精品电影院| 色综合色天天久久婷婷基地|