Page 2 of 2

Posted: Mon Jun 11, 2007 10:52
by Levia
Ok, I have encountered a problem with the label, and that is that it would appear ok on lower resolutions, (800x600 and lower), but the label would be right next to the checkbox in higher ones (1024x786 and above), which is ugly. Fix:

Code: Select all

    <!--
    ***************************************************
        TaharezLook/CheckListboxItem by Levia
    ***************************************************
    -->

<WidgetLook name="TaharezLook/CheckListboxItem">
    <PropertyDefinition name="TextColour" initialValue="FFFFFFFF" redrawOnWrite="true" />
    <PropertyDefinition name="SelectedTextColour" initialValue="FFFFFFFF" redrawOnWrite="true" />
    <PropertyDefinition name="SelectionBrush" initialValue="set:TaharezLook image:ListboxSelectionBrush" redrawOnWrite="true" />
    <PropertyDefinition name="SelectionColour" initialValue="FF4444AA" redrawOnWrite="true" />
    <Property name="Selectable" value="True" />
    <NamedArea name="ContentSize">
        <Area>
            <Dim type="LeftEdge" >
                <AbsoluteDim value="0" />
            </Dim>
            <Dim type="TopEdge" >
                <AbsoluteDim value="0" />
            </Dim>
            <Dim type="Width" >
                <FontDim type="HorzExtent" padding="6" />
            </Dim>
            <Dim type="Height" >
                <FontDim type="LineSpacing" />
            </Dim>
        </Area>
    </NamedArea>
    <Child type ="TaharezLook/Checkbox" nameSuffix="__auto__checkbox">
        <Area>
            <Dim type="LeftEdge">
                <UnifiedDim scale="0" type="LeftEdge" />
                <AbsoluteDim value="3" />
            </Dim>
            <Dim type="TopEdge">
                <UnifiedDim scale="0" type="TopEdge" />
            </Dim>
            <Dim type="Width">
                <UnifiedDim scale="1" type="Width" />
            </Dim>
            <Dim type="Height">
                <UnifiedDim scale="1" type="Height"/>
            </Dim>
        </Area>
    </Child>
    <ImagerySection name="label">
        <TextComponent>
            <Area>
                <Dim type="TopEdge">
                    <AbsoluteDim value="0" />
                </Dim>
                <Dim type="LeftEdge">
          <ImageDim imageset="TaharezLook" image="CheckboxNormal" dimension="Width">
         <DimOperator op="Add">
            <ImageDim imageset="TaharezLook" image="CheckboxNormal" dimension="Width">
               <DimOperator op="Divide">
                  <AbsoluteDim value="2" />
               </DimOperator>
            </ImageDim>
         </DimOperator>
          </ImageDim>
                </Dim>
                <Dim type="RightEdge">
                    <UnifiedDim scale="1" offset="-3" type="RightEdge" />
                </Dim>
                <Dim type="BottomEdge">
                    <UnifiedDim scale="1" type="BottomEdge" />
                </Dim>
            </Area>
        </TextComponent>
    </ImagerySection>
    <ImagerySection name="selection">
        <ImageryComponent>
            <Area>
                <Dim type="TopEdge">
                    <AbsoluteDim value="0" />
                </Dim>
                <Dim type="LeftEdge">
                    <AbsoluteDim value="0" />
                </Dim>
                <Dim type="RightEdge">
                    <UnifiedDim scale="1" type="RightEdge" />
                </Dim>
                <Dim type="BottomEdge">
                    <UnifiedDim scale="1" type="BottomEdge" />
                </Dim>
            </Area>
            <ImageProperty name="SelectionBrush" />
            <ColourProperty name="SelectionColour" />
            <VertFormat type="Stretched" />
            <HorzFormat type="Stretched" />
        </ImageryComponent>
    </ImagerySection>
    <StateImagery name="Enabled">
         <Layer>
              <Section section="label">
                  <ColourProperty name="TextColour" />
              </Section>
         </Layer>
    </StateImagery>
    <StateImagery name="Disabled">
         <Layer>
              <Section section="label">
                  <ColourProperty name="TextColour" />
              </Section>
         </Layer>
    </StateImagery>
    <StateImagery name="SelectedEnabled">
        <Layer>
            <Section section="selection" />
            <Section section="label">
                 <ColourProperty name="SelectedTextColour" />
            </Section>
        </Layer>
    </StateImagery>
    <StateImagery name="SelectedDisabled">
        <Layer>
            <Section section="selection" />
            <Section section="label">
                <ColourProperty name="SelectedTextColour" />
            </Section>
        </Layer>
    </StateImagery>
</WidgetLook>

Posted: Sun Oct 14, 2007 21:01
by tgraupmann
I don't see the SetProperty information in the Wiki for PushButton.
http://www.cegui.org.uk/wiki/index.php/SetProperty

Posted: Mon Oct 15, 2007 07:51
by scriptkid
Appearantly somebody added it already :)

GOOK WORK!

Posted: Thu Mar 27, 2008 06:20
by foruok
aha,I it's great for me. Thanks. I'm a beginner, I really need it.
I comiled it use vc7.1.