Custom CEGUI Component inheriting from ImageComponent
Posted: Thu Dec 22, 2011 18:15
Hi, I am writing a custom CEGUI component to present theora video. I am having a problem with what I inherit from.
The way I have got video on to a CEGUI control before was by using the Image CEGUI component and using setProperty("Image", ...). My aim was to continue using this.
My problem is I am not sure what to inherit from in my class to let my component be based on this component. Clearly it isn't CEGUI::Image as this isn't a component. When I use CEGUI::Window I can do all the stuff I need to like addProperty calls and casting the class to a PropertyReciever. However, when I try to set the image property, it says it cannot find property Image (unsurprisingly).
However, if I use ImageryComponent (what I assume the Image control is), then I can't cast it to a PropertyReciever, do addProperty calls etc. because it doesn't inherit from Window.
My question is, is there a class I can inherit from that inherits from Window but has the Image property already. If not, will I need to reimplement the image control or is there a shortcut?
Thanks,
Thomas
The way I have got video on to a CEGUI control before was by using the Image CEGUI component and using setProperty("Image", ...). My aim was to continue using this.
My problem is I am not sure what to inherit from in my class to let my component be based on this component. Clearly it isn't CEGUI::Image as this isn't a component. When I use CEGUI::Window I can do all the stuff I need to like addProperty calls and casting the class to a PropertyReciever. However, when I try to set the image property, it says it cannot find property Image (unsurprisingly).
However, if I use ImageryComponent (what I assume the Image control is), then I can't cast it to a PropertyReciever, do addProperty calls etc. because it doesn't inherit from Window.
My question is, is there a class I can inherit from that inherits from Window but has the Image property already. If not, will I need to reimplement the image control or is there a shortcut?
Thanks,
Thomas