Page 1 of 1

ButtomImage on CEGUI 0.8

Posted: Tue Feb 28, 2012 23:03
by 2escopetastengo
Hello;

Im using CEGUI 0.8 and Im trying to display an ImageButtom with ImageNormal, ImageHover, etc. The image never appears on the screen.
Thats what i have:

My scheme:

Code: Select all

<?xml version="1.0" ?>
 <GUIScheme Name="StuffedGUI">
       <Imageset Name="StuffedALook" Filename="StuffedALook.imageset"/>
       <Imageset Name="Traps" Filename="Traps.imageset"/>
 </GUIScheme>


My imageset

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<Imageset Name="Traps" Imagefile="Traps.png" NativeHorzRes="128"
NativeVertRes="128" AutoScaled="true">
       <Image Name="btnNormal" XPos="0" YPos="0"  Width="64" Height="64" />
       <Image Name="btnHover"  XPos="0" YPos="64" Width="64" Height="64" />
       <Image Name="btnPushed" XPos="64" YPos="0" Width="64" Height="64" />
       <Image Name="btnDisabl" XPos="64" YPos="64" Width="64" Height="64" />
</Imageset>


and finally my layaout

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>

<GUILayout version="4">
   <Window Type="OgreTray/FrameWindow" Name="Time" >
       <Property Name="Font" Value="DejaVuSans-10" />
       <Property Name="Text" Value="Time: 0" />
       <Property Name="AlwaysOnTop" Value="True" />
       <Property Name="CaptionFont" Value="DejaVuSans-10" />
       <Property Name="TitlebarEnabled" Value="True" />
       <Property Name="Area" Value="{{0,0},{0,0},{0.25,0},{0.1,0}}" />
   </Window>
   <Window Type="TaharezLook/ImageButton" Name="btnNewGame">
       <Property Name="NormalImage" Value="Traps/btnNormal" />
       <Property Name="HoverImage" Value="Traps/btnHover" />
       <Property Name="PushedImage" Value="Traps/btnPushed" />
       <Property Name="DisabledImage" Value="Traps/btnDisabled" />
       <Property Name="Area" Value="{{0.25,0},{0.1,0},{0.35,0},{0.2,0}}" />
    </Window>
</GUILayout>


I think there is a problem with the "Name" fields in the layout. Are "NormalImage", "HoverImage" etc still supported on 0.8? If not, how can i do this?

pd i load the layout and the scheme on the .cpp source files!

Re: ButtomImage on CEGUI 0.8

Posted: Wed Feb 29, 2012 09:04
by CrazyEddie
Hi,

Please read the information linked to in my signature.

Please also understand that there is no CEGUI 0.8 as such. What you are referring to is the unstable development code, so please (and I mean everyone who reads this, not just the OP) when raising potential issues with the development code - or, in fact, any code sourced from mercurial - include the precise changeset that you are currently working with.

Elaborating: while we are always happy to see people trying out the development code, to say "0.8" here is meaningless. Due to the fact the code is under heavy development, requirements and approaches can change from one hour to the next - so to identify what user mistakes (or even bugs) are causing issues, the changeset id is absolutely essential.

CE.