How can I get the top window's handle?

For help with general CEGUI usage:
- Questions about the usage of CEGUI and its features, if not explained in the documentation.
- Problems with the CMAKE configuration or problems occuring during the build process/compilation.
- Errors or unexpected behaviour.

Moderators: CEGUI MVP, CEGUI Team

chenltm
Just popping in
Just popping in
Posts: 8
Joined: Sun Nov 22, 2009 06:50

How can I get the top window's handle?

Postby chenltm » Fri Feb 05, 2010 09:11

When I use callback funtion like

Code: Select all

bool CInputprocSystem::guiUserMove(const CEGUI::EventArgs &e)



I'd like to found out the top window where the event occurde.
Unfortunately I can not find out the way. :x

Is there any way? please help me.

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Re: How can I get the top window's handle?

Postby CrazyEddie » Fri Feb 05, 2010 09:53

Hi,

I'm not quite sure I understand; the 'top' window of the hierarchy is always the root window / gui sheet. If you mean visually, then something like Window::getActiveChild called on the root window might be useful; when used in this way, this returns the window that the system considers to have input focus.

Having said this, assuming you are subscribing the event on a CEGUI::Window, you can get the window associated with the event casting the CEGUI::EventArgs to CEGUI::WindowEventArgs and accessing the 'window' variable:

Code: Select all

bool CInputprocSystem::guiUserMove(const CEGUI::EventArgs &e)
{
    // wnd is the Window that received or generated the event.
    CEGUI::Window* wnd = static_cast<const CEGUI::WindowEventArgs&>(e).window;

    // TODO: Rest of the handler!

    return true;
}


HTH

CE.

chenltm
Just popping in
Just popping in
Posts: 8
Joined: Sun Nov 22, 2009 06:50

Re: How can I get the top window's handle?

Postby chenltm » Sun Feb 07, 2010 09:40

:hammer:

I've created a visible window which as big as my render window,then I've added a parent button on it .
I want to know whether the mouse is in the button or not When I clicked .
:cry: I hope I described the problem clearly.

Now I've found out the funtion "getWindowContainingMouse" can help .but another problem occured...

When I added a button,

Code: Select all

     <Window Type="GuiLook/ImageButton" Name="PlayButton" >
               <Property Name="UnifiedPosition" Value="{{.5,-20},{1,-40}}" />
               <Property Name="UnifiedSize" Value="{{0,40},{0,40}}" />
               <Property Name="NormalImage" Value="set:GuiLook image:ButtonPlay" />
               <Property Name="HoverImage" Value="set:GuiLook image:ButtonPlayHighlight" />
      <Property Name="Tooltip" Value="" />
       </Window>




I can resolve my problem by

Code: Select all

   Window* activewindow = System::getSingleton().getWindowContainingMouse();

   Window* root = winMgr.getWindow("root");

        if(activewindow!=root)
       .....



but when I added a image,

Code: Select all

<FalagardMapping WindowType="GuiLook/StaticImage" TargetType="DefaultWindow" Renderer="Falagard/StaticImage" LookNFeel="GuiLook/StaticImage" />
.....


        <Window Type="GuiLook/StaticImage" Name="TargetHealth" >
               <Property Name="UnifiedPosition" Value="{{.5,-127.5},{0,32}}" />
               <Property Name="UnifiedSize" Value="{{0,255},{0,25}}" />
            <Property Name="Image" Value="set:GuiLook image:TargetHealth" />
            <Property Name="MousePassThroughEnabled" Value="True" />
          <Window Type="GuiLook/StaticImage" Name="TargetHealthBar" >
               <Property Name="UnifiedPosition" Value="{{0,18},{0,7}}" />
               <Property Name="UnifiedSize" Value="{{0,221},{0,8}}" />
         <Property Name="MousePassThroughEnabled" Value="True" />
          <Window Type="GuiLook/StaticImage" Name="TargetHealthBarSub" >
                  <Property Name="UnifiedPosition" Value="{{0,0},{0,0}}" />
                  <Property Name="UnifiedSize" Value="{{0,221},{0,8}}" />
            <Property Name="Image" Value="set:GuiLook image:TargetHealthBar" />
            <Property Name="MousePassThroughEnabled" Value="True" />
             </Window>
          </Window>
     </Window>



then I found out the two function return the same window. :x

Code: Select all

   Window* activewindow = System::getSingleton().getWindowContainingMouse();

   Window* root = winMgr.getWindow("root");



I've done some test and found that the "image" window don't respond to any mouse event. :evil:


What is the problem? I've made a mistake by using them? Please help!! :evil:

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Re: How can I get the top window's handle?

Postby CrazyEddie » Sun Feb 07, 2010 10:11

There are mechanisms within CEGUI that are supposed to insulate you from, for example, needing to directly establish which window the mouse was in when a button was clicked. These mechanisms suffice for most (but certainly not all ;)) scenarios - so at the moment it sounds to me like you're trying to do whatever you are doing the 'hard way'. I think what might be useful is if you tell us what you're trying to achieve at a higher level and what you have so far as a solution goes (meaning post complete functions, not little snippets that are not very informative when out of context).

For example, where is that second layout snippet loaded? What does the full and complete layout look like? How are you actually adding that to the content you already have? Which version of CEGUI are you using? And why have you not yet posted your CEGUI.log? I ask for it in every single post I make in the forums!
CE's Sig wrote:Remember to post your CEGUI.log - or CE will get mad!!

:rofl:

Thanks :mrgreen:

CE.

chenltm
Just popping in
Just popping in
Posts: 8
Joined: Sun Nov 22, 2009 06:50

Re: How can I get the top window's handle?

Postby chenltm » Mon Feb 08, 2010 02:15

:( I'm sorry.

This is my codes about the problem.

Code: Select all

      CEGUI::HgeRenderer* myRenderer= new CEGUI::HgeRenderer();
      //CEGUI::LuaScriptModule* script_module = new CEGUI::LuaScriptModule();
      new CEGUI::System(myRenderer/*,0,0,script_module,"CEGUI.config"*/);

      CEGUI::DefaultResourceProvider* rp = static_cast<CEGUI::DefaultResourceProvider*>
         (CEGUI::System::getSingleton().getResourceProvider());

      rp->setResourceGroupDirectory("schemes", "Pak/media/ui/");
      rp->setResourceGroupDirectory("imagesets", "Pak/media/ui/");
      rp->setResourceGroupDirectory("fonts", "Pak/media/ui/");
      rp->setResourceGroupDirectory("layouts", "Pak/media/ui/");
      rp->setResourceGroupDirectory("looknfeels", "Pak/media/ui/");
      rp->setResourceGroupDirectory("lua_scripts", "Pak/media/ui/");

      CEGUI::Imageset::setDefaultResourceGroup("imagesets");
      CEGUI::Font::setDefaultResourceGroup("fonts");
      CEGUI::Scheme::setDefaultResourceGroup("schemes");
      CEGUI::WidgetLookManager::setDefaultResourceGroup("looknfeels");
      CEGUI::WindowManager::setDefaultResourceGroup("layouts");
      CEGUI::ScriptModule::setDefaultResourceGroup("lua_scripts");
      CEGUI::SchemeManager::getSingleton().loadScheme( "GuiLookSkin.scheme" );
      CEGUI::SchemeManager::getSingleton().loadScheme( "WindowsLook.scheme" );

      // load in a font.  The first font loaded automatically becomes the default font.
      if(! CEGUI::FontManager::getSingleton().isFontPresent( "System" ) )
      {
         CEGUI::FontManager::getSingleton().createFont( "System.font" );
      }
      CEGUI::System::getSingleton().setDefaultFont( "System" );
      CEGUI::System::getSingleton().setDefaultMouseCursor( "WindowsLook", "MouseArrow" );
      CEGUI::System::getSingleton().setDefaultTooltip("GuiLook/Tooltip");

      CEGUI::WindowManager& wmgr =CEGUI:: WindowManager::getSingleton();

      CEGUI::Window* sheet = wmgr.createWindow("DefaultWindow","root");

      sheet->setPosition(CEGUI::UVector2(cegui_reldim(0), cegui_reldim( 0)));
      sheet->setSize(CEGUI::UVector2(cegui_reldim(1), cegui_reldim( 1)));
      sheet->subscribeEvent(CEGUI::DefaultWindow::EventMouseButtonDown,CEGUI::Event::Subscriber(&CInputprocSystem::guiUserMove,this));
      CEGUI::System::getSingleton().setGUISheet(sheet);

      sheet->addChildWindow(wmgr.loadWindowLayout("test.layout"));

   //   CEGUI::DefaultWindow* healthimage=  (CEGUI::DefaultWindow*)wmgr.getWindow("TargetHealth");
   //   healthimage->subscribeEvent(CEGUI::DefaultWindow::EventMouseEnters,CEGUI::Event::Subscriber(&CInputprocSystem::MouseEnter,this));




The fuction I've used :

Code: Select all

bool CInputprocSystem::guiUserMove(const CEGUI::EventArgs &e)
{
   using namespace CEGUI;
   MouseEventArgs *m_event = (MouseEventArgs*)(&e);

   WindowManager& winMgr = WindowManager::getSingleton();

   Window* activewindow = System::getSingleton().getWindowContainingMouse();

   Window* root = winMgr.getWindow("root");
   //Window* wnd = static_cast<const WindowEventArgs&>(e).window;
   //Window* active = root->getActiveChild();
   //Window* health = winMgr.getWindow("TargetHealth");
   if (root!=activewindow )
   {
      return false;
   }
   

   float mouseX = 0;
   float mouseY = 0;



         hge->Input_GetMousePos(&mouseX, &mouseY);


         float x,y;
         m_pPlayer->GetPlayerLocation(x,y);
         targetX = x-PLAYER_IN_SCREEN_X+mouseX;
         targetY = y-PLAYER_IN_SCREEN_Y+mouseY;
         m_pPlayer->SetState(MOVE_STATE_RUN);

         float dir = atan((mouseY-PLAYER_IN_SCREEN_Y)/(mouseX-PLAYER_IN_SCREEN_X));
         if ((mouseY<PLAYER_IN_SCREEN_Y)&&(mouseX<PLAYER_IN_SCREEN_X))
         {
            dir+=pi;
         }
         else if ((mouseY>PLAYER_IN_SCREEN_Y)&&(mouseX<PLAYER_IN_SCREEN_X))
         {
            dir-=pi;
         }

         while(dir<0)
         {
            dir+=2*pi;
         }

         while (dir>2*pi)
         {
            dir-=2*pi;
         }

         float tmp = pi/6;

         if ((0<dir)&&(dir<tmp))
         {
            m_pPlayer->SetPlayerDir(DIRECTION_RIGHT);
         }

         else if ((tmp<dir)&&(dir<2*tmp))
         {
            m_pPlayer->SetPlayerDir(DIRECTION_RIGHTDOWN);
         }
         else if ((2*tmp<dir)&&(dir<4*tmp))
         {
            m_pPlayer->SetPlayerDir(DIRECTION_DOWN);
         }
         else if ((4*tmp<dir)&&(dir<5*tmp))
         {
            m_pPlayer->SetPlayerDir(DIRECTION_LEFTDOWN);
         }
         else if ((5*tmp<dir)&&(dir<7*tmp))
         {
            m_pPlayer->SetPlayerDir(DIRECTION_LEFT);
         }
         else if ((7*tmp<dir)&&(dir<8*tmp))
         {
            m_pPlayer->SetPlayerDir(DIRECTION_LEFTUP);
         }
         else if ((8*tmp<dir)&&(dir<10*tmp))
         {
            m_pPlayer->SetPlayerDir(DIRECTION_UP);
         }
         else if ((10*tmp<dir)&&(dir<11*tmp))
         {
            m_pPlayer->SetPlayerDir(DIRECTION_UPRIGHT);
         }
         else if ((11*tmp<dir)&&(dir<12*tmp))
         {
            m_pPlayer->SetPlayerDir(DIRECTION_RIGHT);
         }
         m_pPlayer->SetState(MOVE_STATE_RUN);

         m_pPlayer->SetMoveDirection(dir);

   return true;
}




The scheme:

Code: Select all

<?xml version="1.0" ?>
<GUIScheme Name="GuiLook">
   <Imageset Name="GuiLook" Filename="hud.imageset" />
   <Imageset Name="UIIcons" Filename="uiicons.imageset" />
   <Imageset Name="ui2" Filename="ui2.imageset" />
   <Imageset Name="Loading" Filename="loading.imageset" />
   <Imageset Name="Logo" Filename="logo.imageset" />
   <Imageset Name="StatsMenu_UI" Filename="statsmenu_ui.imageset" />
   <Font Name="Serif" Filename="Serif.font" />
   <Font Name="SerifBig" Filename="SerifBig.font" />
   <Font Name="SerifHuge" Filename="SerifHuge.font" />
   <Font Name="SerifSmall" Filename="SerifSmall.font" />
   <Font Name="FrizQuadrata" Filename="FrizQuadrata.font" />
   <Font Name="FrizQuadrataSmall" Filename="FrizQuadrataSmall.font" />
   <Font Name="FrizQuadrataBig" Filename="FrizQuadrataBig.font" />
   <LookNFeel Filename="GuiLook.looknfeel" />
   <WindowRendererSet Filename="CEGUIFalagardWRBase" />
   <FalagardMapping WindowType="GuiLook/Button"      TargetType="CEGUI/PushButton"  Renderer="Falagard/Button"       LookNFeel="GuiLook/Button" />
   <FalagardMapping WindowType="GuiLook/CloseButton"      TargetType="CEGUI/PushButton"  Renderer="Falagard/Button"       LookNFeel="GuiLook/CloseButton" />
   <FalagardMapping WindowType="GuiLook/Checkbox"    TargetType="CEGUI/Checkbox"    Renderer="Falagard/ToggleButton" LookNFeel="GuiLook/Checkbox" />
   <FalagardMapping WindowType="GuiLook/ImageButton" TargetType="CEGUI/PushButton"  Renderer="Falagard/Button"       LookNFeel="GuiLook/ImageButton" />
   <FalagardMapping WindowType="GuiLook/StandardButton" TargetType="CEGUI/PushButton"  Renderer="Falagard/Button"       LookNFeel="GuiLook/StandardButton" />
   <FalagardMapping WindowType="GuiLook/StandardButtonSmall" TargetType="CEGUI/PushButton"  Renderer="Falagard/Button"       LookNFeel="GuiLook/StandardButtonSmall" />
   <FalagardMapping WindowType="GuiLook/RadioButton" TargetType="CEGUI/RadioButton" Renderer="Falagard/ToggleButton" LookNFeel="GuiLook/RadioButton" />
   <FalagardMapping WindowType="GuiLook/FrameWindow"  TargetType="CEGUI/FrameWindow" Renderer="Falagard/FrameWindow"  LookNFeel="GuiLook/FrameWindow" />
   <FalagardMapping WindowType="GuiLook/Titlebar"     TargetType="CEGUI/Titlebar"    Renderer="Falagard/Titlebar"     LookNFeel="GuiLook/Titlebar" />
   <FalagardMapping WindowType="GuiLook/SystemButton" TargetType="CEGUI/PushButton"  Renderer="Falagard/SystemButton" LookNFeel="GuiLook/Button" />
   <FalagardMapping WindowType="GuiLook/Editbox"          TargetType="CEGUI/Editbox"          Renderer="Falagard/Editbox"          LookNFeel="GuiLook/Editbox" />
   <FalagardMapping WindowType="GuiLook/MultiLineEditbox" TargetType="CEGUI/MultiLineEditbox" Renderer="Falagard/MultiLineEditbox" LookNFeel="GuiLook/MultiLineEditbox" />
   <FalagardMapping WindowType="GuiLook/MultiLineTextbox" TargetType="DefaultWindow" Renderer="Falagard/StaticText" LookNFeel="GuiLook/MultiLineTextbox" />
   <FalagardMapping WindowType="GuiLook/Menubar"   TargetType="CEGUI/Menubar"   Renderer="Falagard/Menubar"   LookNFeel="GuiLook/Menubar" />
   <FalagardMapping WindowType="GuiLook/PopupMenu" TargetType="CEGUI/PopupMenu" Renderer="Falagard/PopupMenu" LookNFeel="GuiLook/PopupMenu" />
   <FalagardMapping WindowType="GuiLook/MenuItem"  TargetType="CEGUI/MenuItem"  Renderer="Falagard/MenuItem"  LookNFeel="GuiLook/MenuItem" />
   <FalagardMapping WindowType="GuiLook/AlternateProgressBar" TargetType="CEGUI/ProgressBar" Renderer="Falagard/ProgressBar" LookNFeel="GuiLook/AltProgressBar" />
   <FalagardMapping WindowType="GuiLook/ProgressBar"          TargetType="CEGUI/ProgressBar" Renderer="Falagard/ProgressBar" LookNFeel="GuiLook/ProgressBar" />
   <FalagardMapping WindowType="GuiLook/VUMeter"              TargetType="CEGUI/ProgressBar" Renderer="Falagard/ProgressBar" LookNFeel="GuiLook/VUMeter" />
   <FalagardMapping WindowType="GuiLook/VerticalScrollbar"   TargetType="CEGUI/Scrollbar" Renderer="Falagard/Scrollbar" LookNFeel="GuiLook/VerticalScrollbar" />
   <FalagardMapping WindowType="GuiLook/HorizontalScrollbar" TargetType="CEGUI/Scrollbar" Renderer="Falagard/Scrollbar" LookNFeel="GuiLook/HorizontalScrollbar" />
   <FalagardMapping WindowType="GuiLook/VerticalScrollbarThumb"   TargetType="CEGUI/Thumb" Renderer="Falagard/Button" LookNFeel="GuiLook/VerticalScrollbarThumb" />
   <FalagardMapping WindowType="GuiLook/HorizontalScrollbarThumb" TargetType="CEGUI/Thumb" Renderer="Falagard/Button" LookNFeel="GuiLook/HorizontalScrollbarThumb" />
   <FalagardMapping WindowType="GuiLook/LargeVerticalScrollbar"      TargetType="CEGUI/Scrollbar" Renderer="Falagard/Scrollbar" LookNFeel="GuiLook/LargeVerticalScrollbar" />
   <FalagardMapping WindowType="GuiLook/LargeVerticalScrollbarThumb" TargetType="CEGUI/Thumb"     Renderer="Falagard/Button"    LookNFeel="GuiLook/LargeVerticalScrollbarThumb" />
   <FalagardMapping WindowType="GuiLook/TabButton"  TargetType="CEGUI/TabButton"  Renderer="Falagard/TabButton"  LookNFeel="GuiLook/TabButton" />
   <FalagardMapping WindowType="GuiLook/TabControl" TargetType="CEGUI/TabControl" Renderer="Falagard/TabControl" LookNFeel="GuiLook/TabControl" />
   <FalagardMapping WindowType="GuiLook/TabContentPane"    TargetType="DefaultWindow"    Renderer="Falagard/Default"    LookNFeel="GuiLook/TabContentPane" />
   <FalagardMapping WindowType="GuiLook/TabButtonPane"    TargetType="DefaultWindow"    Renderer="Falagard/Default"    LookNFeel="GuiLook/TabButtonPane" />
   <FalagardMapping WindowType="GuiLook/ComboDropList" TargetType="CEGUI/ComboDropList" Renderer="Falagard/Listbox" LookNFeel="GuiLook/ComboDropList" />
   <FalagardMapping WindowType="GuiLook/ComboEditbox"  TargetType="CEGUI/Editbox"    Renderer="Falagard/Editbox" LookNFeel="GuiLook/ComboEditbox" />
   <FalagardMapping WindowType="GuiLook/Combobox"   TargetType="CEGUI/Combobox"    Renderer="Falagard/Default" LookNFeel="GuiLook/Combobox" />
   <FalagardMapping WindowType="GuiLook/Listbox"           TargetType="CEGUI/Listbox"           Renderer="Falagard/Listbox"           LookNFeel="GuiLook/Listbox" />
   <FalagardMapping WindowType="GuiLook/ListHeader"        TargetType="CEGUI/ListHeader"        Renderer="Falagard/ListHeader"        LookNFeel="GuiLook/ListHeader" />
   <FalagardMapping WindowType="GuiLook/ListHeaderSegment" TargetType="CEGUI/ListHeaderSegment" Renderer="Falagard/ListHeaderSegment" LookNFeel="GuiLook/ListHeaderSegment" />
   <FalagardMapping WindowType="GuiLook/MultiColumnList"   TargetType="CEGUI/MultiColumnList"   Renderer="Falagard/MultiColumnList"   LookNFeel="GuiLook/MultiColumnList" />
   <FalagardMapping WindowType="GuiLook/Slider"      TargetType="CEGUI/Slider"      Renderer="Falagard/Slider"  LookNFeel="GuiLook/Slider" />
   <FalagardMapping WindowType="GuiLook/SliderThumb" TargetType="CEGUI/Thumb" Renderer="Falagard/Button"  LookNFeel="GuiLook/SliderThumb" />
   <FalagardMapping WindowType="GuiLook/ScrollablePane" TargetType="CEGUI/ScrollablePane" Renderer="Falagard/ScrollablePane" LookNFeel="GuiLook/ScrollablePane" />
   <FalagardMapping WindowType="GuiLook/Spinner" TargetType="CEGUI/Spinner" Renderer="Falagard/Default" LookNFeel="GuiLook/Spinner" />
   <FalagardMapping WindowType="GuiLook/Tooltip" TargetType="CEGUI/Tooltip" Renderer="Falagard/Tooltip" LookNFeel="GuiLook/Tooltip" />
   <FalagardMapping WindowType="GuiLook/StaticImage" TargetType="DefaultWindow" Renderer="Falagard/StaticImage" LookNFeel="GuiLook/StaticImage" />
   <FalagardMapping WindowType="GuiLook/StaticText"  TargetType="DefaultWindow" Renderer="Falagard/Default"  LookNFeel="GuiLook/StaticText" />
   <FalagardMapping WindowType="GuiLook/StaticTextOutline"  TargetType="DefaultWindow" Renderer="Falagard/Default"  LookNFeel="GuiLook/StaticTextOutline" />
   <FalagardMapping WindowType="GuiLook/StaticTextBox"  TargetType="DefaultWindow" Renderer="Falagard/StaticText"  LookNFeel="GuiLook/StaticTextBox" />
   <FalagardMapping WindowType="GuiLook/ItemText"  TargetType="DefaultWindow" Renderer="Falagard/Default"  LookNFeel="GuiLook/ItemText" />
   <FalagardMapping WindowType="GuiLook/CharacterSlot"  TargetType="DefaultWindow" Renderer="Falagard/Default"  LookNFeel="GuiLook/CharacterSlot" />
   <FalagardMapping WindowType="GuiLook/CharacterSlotHighlight"  TargetType="DefaultWindow" Renderer="Falagard/Default"  LookNFeel="GuiLook/CharacterSlotHighlight" />
   <FalagardMapping WindowType="GuiLook/ItemTooltip"  TargetType="DefaultWindow" Renderer="Falagard/Default"  LookNFeel="GuiLook/ItemTooltip" />
   <FalagardMapping WindowType="GuiLook/ItemTooltip2"  TargetType="DefaultWindow" Renderer="Falagard/Default"  LookNFeel="GuiLook/ItemTooltip2" />
   <FalagardMapping WindowType="GuiLook/CloseButton"      TargetType="CEGUI/PushButton"  Renderer="Falagard/Button"       LookNFeel="GuiLook/CloseButton" />
   <FalagardMapping WindowType="GuiLook/FishingButton"      TargetType="CEGUI/PushButton"  Renderer="Falagard/Button"       LookNFeel="GuiLook/FishingButton" />
   <FalagardMapping WindowType="GuiLook/PetFeedButton"      TargetType="CEGUI/PushButton"  Renderer="Falagard/Button"       LookNFeel="GuiLook/PetFeedButton" />
   <FalagardMapping WindowType="GuiLook/QuestRadioButton" TargetType="CEGUI/PushButton" Renderer="Falagard/Button" LookNFeel="GuiLook/QuestRadioButton" />
   <FalagardMapping WindowType="GuiLook/WeaponSwitch"    TargetType="CEGUI/Checkbox"    Renderer="Falagard/ToggleButton" LookNFeel="GuiLook/WeaponSwitch" />
   <FalagardMapping WindowType="GuiLook/CloseTriangleLeft"      TargetType="CEGUI/PushButton"  Renderer="Falagard/Button"       LookNFeel="GuiLook/CloseTriangleLeft" />
   <FalagardMapping WindowType="GuiLook/CloseTriangleRight"      TargetType="CEGUI/PushButton"  Renderer="Falagard/Button"       LookNFeel="GuiLook/CloseTriangleRight" />
   <FalagardMapping WindowType="GuiLook/RadioTab" TargetType="CEGUI/RadioButton" Renderer="Falagard/ToggleButton" LookNFeel="GuiLook/RadioTab" />


</GUIScheme>




the layout:

Code: Select all

<?xml version="1.0" ?>
<GUILayout>
 
    <Window Type="DefaultWindow" Name="PlayerHealthRoot" >
            <Property Name="UnifiedPosition" Value="{{0,0},{0,0}}" />
            <Property Name="UnifiedSize" Value="{{1,0},{1,0}}" />
      <Property Name="MousePassThroughEnabled" Value="True" />
      <Property Name="AlwaysOnTop" Value="True" />

    <Window Type="GuiLook/StaticImage" Name="BottomBorder">
            <Property Name="UnifiedPosition" Value="{{0,0},{1,-1}}" />
            <Property Name="UnifiedSize" Value="{{1,0},{0,1}}" />
      <Property Name="Image" Value="set:GuiLook image:BlackLine" />
      <Property Name="MousePassThroughEnabled" Value="True" />
   </Window>

        <Window Type="GuiLook/StaticImage" Name="TargetHealth" >
               <Property Name="UnifiedPosition" Value="{{.5,-127.5},{0,32}}" />
               <Property Name="UnifiedSize" Value="{{0,255},{0,25}}" />
            <Property Name="Image" Value="set:GuiLook image:TargetHealth" />
            <Property Name="MousePassThroughEnabled" Value="True" />
       <Property Name="Tooltip" Value="琛€鏉? />
          <Window Type="GuiLook/StaticImage" Name="TargetHealthBar" >
               <Property Name="UnifiedPosition" Value="{{0,18},{0,7}}" />
               <Property Name="UnifiedSize" Value="{{0,221},{0,8}}" />
         <Property Name="MousePassThroughEnabled" Value="True" />
          <Property Name="Tooltip" Value="琛€鏉? />
          <Window Type="GuiLook/StaticImage" Name="TargetHealthBarSub" >
                  <Property Name="UnifiedPosition" Value="{{0,0},{0,0}}" />
                  <Property Name="UnifiedSize" Value="{{0,221},{0,8}}" />
            <Property Name="Image" Value="set:GuiLook image:TargetHealthBar" />
            <Property Name="MousePassThroughEnabled" Value="True" />
         <Property Name="Tooltip" Value="琛€鏉? />
             </Window>
          </Window>
     </Window>

     <Window Type="GuiLook/ImageButton" Name="PlayButton" >
               <Property Name="UnifiedPosition" Value="{{.5,-20},{1,-40}}" />
               <Property Name="UnifiedSize" Value="{{0,40},{0,40}}" />
               <Property Name="NormalImage" Value="set:GuiLook image:ButtonPlay" />
               <Property Name="HoverImage" Value="set:GuiLook image:ButtonPlayHighlight" />
      <Property Name="Tooltip" Value="寮€濮? />

       </Window>

    </Window>
</GUILayout>


the cegui.log:

Code: Select all

08/02/2010 10:06:13 (Std)    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
08/02/2010 10:06:13 (Std)    +                     Crazy Eddie's GUI System - Event log                    +
08/02/2010 10:06:13 (Std)    +                          (http://www.cegui.org.uk/)                         +
08/02/2010 10:06:13 (Std)    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

08/02/2010 10:06:13 (Std)    CEGUI::Logger singleton created. (015BED70)
08/02/2010 10:06:13 (Std)    ---- Begining CEGUI System initialisation ----
08/02/2010 10:06:13 (Std)    CEGUI::ImagesetManager singleton created (015BF338)
08/02/2010 10:06:13 (Std)    CEGUI::FontManager singleton created. (015BF390)
08/02/2010 10:06:13 (Std)    CEGUI::WindowFactoryManager singleton created
08/02/2010 10:06:13 (Std)    CEGUI::WindowManager singleton created (01684A88)
08/02/2010 10:06:13 (Std)    CEGUI::SchemeManager singleton created. (01685940)
08/02/2010 10:06:13 (Std)    CEGUI::MouseCursor singleton created. (01684CD0)
08/02/2010 10:06:13 (Std)    CEGUI::GlobalEventSet singleton created. (01685A80)
08/02/2010 10:06:13 (Std)    CEGUI::WidgetLookManager singleton created. (01685BD0)
08/02/2010 10:06:13 (Std)    CEGUI::WindowRendererManager singleton created (01685E48)
08/02/2010 10:06:13 (Std)    WindowFactory for 'DefaultWindow' windows added. (00E875C8)
08/02/2010 10:06:13 (Std)    WindowFactory for 'DragContainer' windows added. (00E87988)
08/02/2010 10:06:13 (Std)    WindowFactory for 'ScrolledContainer' windows added. (00E870B0)
08/02/2010 10:06:13 (Std)    WindowFactory for 'ClippedContainer' windows added. (00E87848)
08/02/2010 10:06:13 (Std)    WindowFactory for 'CEGUI/Checkbox' windows added. (00E87488)
08/02/2010 10:06:13 (Std)    WindowFactory for 'CEGUI/PushButton' windows added. (00E87C08)
08/02/2010 10:06:13 (Std)    WindowFactory for 'CEGUI/RadioButton' windows added. (00E87CA8)
08/02/2010 10:06:13 (Std)    WindowFactory for 'CEGUI/Combobox' windows added. (00E86F68)
08/02/2010 10:06:13 (Std)    WindowFactory for 'CEGUI/ComboDropList' windows added. (00E87DE8)
08/02/2010 10:06:13 (Std)    WindowFactory for 'CEGUI/Editbox' windows added. (00E86E28)
08/02/2010 10:06:13 (Std)    WindowFactory for 'CEGUI/FrameWindow' windows added. (00E872A8)
08/02/2010 10:06:13 (Std)    WindowFactory for 'CEGUI/ItemEntry' windows added. (00E87528)
08/02/2010 10:06:13 (Std)    WindowFactory for 'CEGUI/Listbox' windows added. (00E87D48)
08/02/2010 10:06:13 (Std)    WindowFactory for 'CEGUI/ListHeader' windows added. (00E87F28)
08/02/2010 10:06:13 (Std)    WindowFactory for 'CEGUI/ListHeaderSegment' windows added. (00E87008)
08/02/2010 10:06:13 (Std)    WindowFactory for 'CEGUI/Menubar' windows added. (00E87E88)
08/02/2010 10:06:13 (Std)    WindowFactory for 'CEGUI/PopupMenu' windows added. (00E87348)
08/02/2010 10:06:13 (Std)    WindowFactory for 'CEGUI/MenuItem' windows added. (00E86B00)
08/02/2010 10:06:13 (Std)    WindowFactory for 'CEGUI/MultiColumnList' windows added. (00E87208)
08/02/2010 10:06:13 (Std)    WindowFactory for 'CEGUI/MultiLineEditbox' windows added. (00E87B68)
08/02/2010 10:06:13 (Std)    WindowFactory for 'CEGUI/ProgressBar' windows added. (00E87708)
08/02/2010 10:06:13 (Std)    WindowFactory for 'CEGUI/ScrollablePane' windows added. (00E878E8)
08/02/2010 10:06:13 (Std)    WindowFactory for 'CEGUI/Scrollbar' windows added. (00E86EC8)
08/02/2010 10:06:13 (Std)    WindowFactory for 'CEGUI/Slider' windows added. (00E877A8)
08/02/2010 10:06:13 (Std)    WindowFactory for 'CEGUI/Spinner' windows added. (00E873E8)
08/02/2010 10:06:13 (Std)    WindowFactory for 'CEGUI/TabButton' windows added. (00E87AC8)
08/02/2010 10:06:13 (Std)    WindowFactory for 'CEGUI/TabControl' windows added. (00E87168)
08/02/2010 10:06:13 (Std)    WindowFactory for 'CEGUI/Thumb' windows added. (00E86CE0)
08/02/2010 10:06:13 (Std)    WindowFactory for 'CEGUI/Titlebar' windows added. (00E86C40)
08/02/2010 10:06:13 (Std)    WindowFactory for 'CEGUI/Tooltip' windows added. (00E86BA0)
08/02/2010 10:06:13 (Std)    WindowFactory for 'CEGUI/ItemListbox' windows added. (00E87A28)
08/02/2010 10:06:13 (Std)    WindowFactory for 'CEGUI/GroupBox' windows added. (00E86D88)
08/02/2010 10:06:13 (Std)    WindowFactory for 'CEGUI/Tree' windows added. (00E87668)
08/02/2010 10:06:13 (Std)    Window type alias named 'DefaultGUISheet' added for window type 'DefaultWindow'.
08/02/2010 10:06:13 (Std)    CEGUI::System singleton created. (015BE610)
08/02/2010 10:06:13 (Std)    ---- CEGUI System initialisation completed ----
08/02/2010 10:06:13 (Std)    ---- Version 0.6.2 ----
08/02/2010 10:06:13 (Std)    ---- Renderer module is: HGE Renderer ----
08/02/2010 10:06:13 (Std)    ---- XML Parser module is: CEGUI::ExpatParser - Official expat based parser module for CEGUI ----
08/02/2010 10:06:13 (Std)    ---- Scripting module is: None ----
08/02/2010 10:06:13 (Std)    Attempting to load Scheme from file 'GuiLookSkin.scheme'.
08/02/2010 10:06:13 (Std)    Attempting to create an Imageset from the information specified in file 'hud.imageset'.
08/02/2010 10:06:13 (Std)    Started creation of Imageset from XML specification:
08/02/2010 10:06:13 (Std)    ---- CEGUI Imageset name: GuiLook
08/02/2010 10:06:13 (Std)    ---- Source texture file: ui1.dds in resource group: (Default)
08/02/2010 10:06:13 (Std)    Attempting to create an Imageset from the information specified in file 'uiicons.imageset'.
08/02/2010 10:06:13 (Std)    Started creation of Imageset from XML specification:
08/02/2010 10:06:13 (Std)    ---- CEGUI Imageset name: UIIcons
08/02/2010 10:06:13 (Std)    ---- Source texture file: uiicons.dds in resource group: (Default)
08/02/2010 10:06:13 (Std)    Attempting to create an Imageset from the information specified in file 'ui2.imageset'.
08/02/2010 10:06:13 (Std)    Started creation of Imageset from XML specification:
08/02/2010 10:06:13 (Std)    ---- CEGUI Imageset name: ui2
08/02/2010 10:06:13 (Std)    ---- Source texture file: ui2.dds in resource group: (Default)
08/02/2010 10:06:13 (Std)    Attempting to create an Imageset from the information specified in file 'loading.imageset'.
08/02/2010 10:06:13 (Std)    Started creation of Imageset from XML specification:
08/02/2010 10:06:13 (Std)    ---- CEGUI Imageset name: Loading
08/02/2010 10:06:13 (Std)    ---- Source texture file: loading.dds in resource group: (Default)
08/02/2010 10:06:13 (Std)    Attempting to create an Imageset from the information specified in file 'logo.imageset'.
08/02/2010 10:06:13 (Std)    Started creation of Imageset from XML specification:
08/02/2010 10:06:13 (Std)    ---- CEGUI Imageset name: Logo
08/02/2010 10:06:13 (Std)    ---- Source texture file: logo.dds in resource group: (Default)
08/02/2010 10:06:13 (Std)    Attempting to create an Imageset from the information specified in file 'statsmenu_ui.imageset'.
08/02/2010 10:06:13 (Std)    Started creation of Imageset from XML specification:
08/02/2010 10:06:13 (Std)    ---- CEGUI Imageset name: StatsMenu_UI
08/02/2010 10:06:13 (Std)    ---- Source texture file: statmenu_ui.png in resource group: (Default)
08/02/2010 10:06:13 (Std)    Attempting to create Font from the information specified in file 'Serif.font'.
08/02/2010 10:06:13 (Std)    Started creation of FreeType Font:
08/02/2010 10:06:13 (Std)    ---- CEGUI font name: Serif
08/02/2010 10:06:13 (Std)    ----     Source file: msyh.TTF in resource group: (Default)
08/02/2010 10:06:13 (Std)    ---- Real point size: 11
08/02/2010 10:06:16 (Std)    Succsessfully loaded 29066 glyphs
08/02/2010 10:06:16 (Std)    Attempting to create Font from the information specified in file 'SerifBig.font'.
08/02/2010 10:06:16 (Std)    Started creation of FreeType Font:
08/02/2010 10:06:16 (Std)    ---- CEGUI font name: SerifBig
08/02/2010 10:06:16 (Std)    ----     Source file: msyh.TTF in resource group: (Default)
08/02/2010 10:06:16 (Std)    ---- Real point size: 16
08/02/2010 10:06:19 (Std)    Succsessfully loaded 29066 glyphs
08/02/2010 10:06:19 (Std)    Attempting to create Font from the information specified in file 'SerifHuge.font'.
08/02/2010 10:06:19 (Std)    Started creation of FreeType Font:
08/02/2010 10:06:19 (Std)    ---- CEGUI font name: SerifHuge
08/02/2010 10:06:19 (Std)    ----     Source file: msyh.TTF in resource group: (Default)
08/02/2010 10:06:19 (Std)    ---- Real point size: 32
08/02/2010 10:06:22 (Std)    Succsessfully loaded 29066 glyphs
08/02/2010 10:06:22 (Std)    Attempting to create Font from the information specified in file 'SerifSmall.font'.
08/02/2010 10:06:22 (Std)    Started creation of FreeType Font:
08/02/2010 10:06:22 (Std)    ---- CEGUI font name: SerifSmall
08/02/2010 10:06:22 (Std)    ----     Source file: msyh.TTF in resource group: (Default)
08/02/2010 10:06:22 (Std)    ---- Real point size: 8
08/02/2010 10:06:25 (Std)    Succsessfully loaded 29066 glyphs
08/02/2010 10:06:25 (Std)    Attempting to create Font from the information specified in file 'FrizQuadrata.font'.
08/02/2010 10:06:25 (Std)    Started creation of FreeType Font:
08/02/2010 10:06:25 (Std)    ---- CEGUI font name: FrizQuadrata
08/02/2010 10:06:25 (Std)    ----     Source file: msyh.TTF in resource group: (Default)
08/02/2010 10:06:25 (Std)    ---- Real point size: 11
08/02/2010 10:06:27 (Std)    Succsessfully loaded 29066 glyphs
08/02/2010 10:06:27 (Std)    Attempting to create Font from the information specified in file 'FrizQuadrataSmall.font'.
08/02/2010 10:06:27 (Std)    Started creation of FreeType Font:
08/02/2010 10:06:27 (Std)    ---- CEGUI font name: FrizQuadrataSmall
08/02/2010 10:06:27 (Std)    ----     Source file: msyh.TTF in resource group: (Default)
08/02/2010 10:06:27 (Std)    ---- Real point size: 6
08/02/2010 10:06:30 (Std)    Succsessfully loaded 29066 glyphs
08/02/2010 10:06:30 (Std)    Attempting to create Font from the information specified in file 'FrizQuadrataBig.font'.
08/02/2010 10:06:30 (Std)    Started creation of FreeType Font:
08/02/2010 10:06:30 (Std)    ---- CEGUI font name: FrizQuadrataBig
08/02/2010 10:06:30 (Std)    ----     Source file: msyh.TTF in resource group: (Default)
08/02/2010 10:06:30 (Std)    ---- Real point size: 15
08/02/2010 10:06:33 (Std)    Succsessfully loaded 29066 glyphs
08/02/2010 10:06:33 (Std)    ===== Falagard 'root' element: look and feel parsing begins =====
08/02/2010 10:06:33 (Std)    ===== Look and feel parsing completed =====
08/02/2010 10:06:33 (Std)    No window renderer factories specified for module 'CEGUIFalagardWRBase' - adding all available factories...
08/02/2010 10:06:33 (Std)    WindowRendererFactory 'Falagard/Button' added. (02CD0AE0)
08/02/2010 10:06:33 (Std)    WindowRendererFactory 'Falagard/Default' added. (02CD0CC0)
08/02/2010 10:06:33 (Std)    WindowRendererFactory 'Falagard/Editbox' added. (02CCFD20)
08/02/2010 10:06:33 (Std)    WindowRendererFactory 'Falagard/FrameWindow' added. (02CD0C20)
08/02/2010 10:06:33 (Std)    WindowRendererFactory 'Falagard/ItemEntry' added. (02CD0220)
08/02/2010 10:06:33 (Std)    WindowRendererFactory 'Falagard/ListHeader' added. (02CCFBE0)
08/02/2010 10:06:33 (Std)    WindowRendererFactory 'Falagard/ListHeaderSegment' added. (02CCFFA0)
08/02/2010 10:06:33 (Std)    WindowRendererFactory 'Falagard/Listbox' added. (02CD0900)
08/02/2010 10:06:33 (Std)    WindowRendererFactory 'Falagard/Menubar' added. (02CD0040)
08/02/2010 10:06:33 (Std)    WindowRendererFactory 'Falagard/MenuItem' added. (02CD0540)
08/02/2010 10:06:33 (Std)    WindowRendererFactory 'Falagard/MultiColumnList' added. (02CD0400)
08/02/2010 10:06:33 (Std)    WindowRendererFactory 'Falagard/MultiLineEditbox' added. (02CCFC80)
08/02/2010 10:06:33 (Std)    WindowRendererFactory 'Falagard/PopupMenu' added. (02CD0860)
08/02/2010 10:06:33 (Std)    WindowRendererFactory 'Falagard/ProgressBar' added. (02CD00E0)
08/02/2010 10:06:33 (Std)    WindowRendererFactory 'Falagard/ScrollablePane' added. (02CD09A0)
08/02/2010 10:06:33 (Std)    WindowRendererFactory 'Falagard/Scrollbar' added. (02CD07C0)
08/02/2010 10:06:33 (Std)    WindowRendererFactory 'Falagard/Slider' added. (02CD0A40)
08/02/2010 10:06:33 (Std)    WindowRendererFactory 'Falagard/Static' added. (02CD0720)
08/02/2010 10:06:33 (Std)    WindowRendererFactory 'Falagard/StaticImage' added. (02CD0B80)
08/02/2010 10:06:33 (Std)    WindowRendererFactory 'Falagard/StaticText' added. (02CD04A0)
08/02/2010 10:06:33 (Std)    WindowRendererFactory 'Falagard/SystemButton' added. (02CD0180)
08/02/2010 10:06:33 (Std)    WindowRendererFactory 'Falagard/TabButton' added. (02CD02C0)
08/02/2010 10:06:33 (Std)    WindowRendererFactory 'Falagard/TabControl' added. (02CCFE60)
08/02/2010 10:06:33 (Std)    WindowRendererFactory 'Falagard/Titlebar' added. (02CD0680)
08/02/2010 10:06:33 (Std)    WindowRendererFactory 'Falagard/ToggleButton' added. (02CCFF00)
08/02/2010 10:06:33 (Std)    WindowRendererFactory 'Falagard/Tooltip' added. (02CCFDC0)
08/02/2010 10:06:33 (Std)    WindowRendererFactory 'Falagard/ItemListbox' added. (02CD05E0)
08/02/2010 10:06:33 (Std)    WindowRendererFactory 'Falagard/Tree' added. (02CD0360)
08/02/2010 10:06:33 (Std)    Creating falagard mapping for type 'GuiLook/Button' using base type 'CEGUI/PushButton', window renderer 'Falagard/Button' and Look'N'Feel 'GuiLook/Button'. (0012C708)
08/02/2010 10:06:33 (Std)    Creating falagard mapping for type 'GuiLook/CloseButton' using base type 'CEGUI/PushButton', window renderer 'Falagard/Button' and Look'N'Feel 'GuiLook/CloseButton'. (0012C708)
08/02/2010 10:06:33 (Std)    Creating falagard mapping for type 'GuiLook/Checkbox' using base type 'CEGUI/Checkbox', window renderer 'Falagard/ToggleButton' and Look'N'Feel 'GuiLook/Checkbox'. (0012C708)
08/02/2010 10:06:33 (Std)    Creating falagard mapping for type 'GuiLook/ImageButton' using base type 'CEGUI/PushButton', window renderer 'Falagard/Button' and Look'N'Feel 'GuiLook/ImageButton'. (0012C708)
08/02/2010 10:06:33 (Std)    Creating falagard mapping for type 'GuiLook/StandardButton' using base type 'CEGUI/PushButton', window renderer 'Falagard/Button' and Look'N'Feel 'GuiLook/StandardButton'. (0012C708)
08/02/2010 10:06:33 (Std)    Creating falagard mapping for type 'GuiLook/StandardButtonSmall' using base type 'CEGUI/PushButton', window renderer 'Falagard/Button' and Look'N'Feel 'GuiLook/StandardButtonSmall'. (0012C708)
08/02/2010 10:06:33 (Std)    Creating falagard mapping for type 'GuiLook/RadioButton' using base type 'CEGUI/RadioButton', window renderer 'Falagard/ToggleButton' and Look'N'Feel 'GuiLook/RadioButton'. (0012C708)
08/02/2010 10:06:33 (Std)    Creating falagard mapping for type 'GuiLook/FrameWindow' using base type 'CEGUI/FrameWindow', window renderer 'Falagard/FrameWindow' and Look'N'Feel 'GuiLook/FrameWindow'. (0012C708)
08/02/2010 10:06:33 (Std)    Creating falagard mapping for type 'GuiLook/Titlebar' using base type 'CEGUI/Titlebar', window renderer 'Falagard/Titlebar' and Look'N'Feel 'GuiLook/Titlebar'. (0012C708)
08/02/2010 10:06:33 (Std)    Creating falagard mapping for type 'GuiLook/SystemButton' using base type 'CEGUI/PushButton', window renderer 'Falagard/SystemButton' and Look'N'Feel 'GuiLook/Button'. (0012C708)
08/02/2010 10:06:33 (Std)    Creating falagard mapping for type 'GuiLook/Editbox' using base type 'CEGUI/Editbox', window renderer 'Falagard/Editbox' and Look'N'Feel 'GuiLook/Editbox'. (0012C708)
08/02/2010 10:06:33 (Std)    Creating falagard mapping for type 'GuiLook/MultiLineEditbox' using base type 'CEGUI/MultiLineEditbox', window renderer 'Falagard/MultiLineEditbox' and Look'N'Feel 'GuiLook/MultiLineEditbox'. (0012C708)
08/02/2010 10:06:33 (Std)    Creating falagard mapping for type 'GuiLook/MultiLineTextbox' using base type 'DefaultWindow', window renderer 'Falagard/StaticText' and Look'N'Feel 'GuiLook/MultiLineTextbox'. (0012C708)
08/02/2010 10:06:33 (Std)    Creating falagard mapping for type 'GuiLook/Menubar' using base type 'CEGUI/Menubar', window renderer 'Falagard/Menubar' and Look'N'Feel 'GuiLook/Menubar'. (0012C708)
08/02/2010 10:06:33 (Std)    Creating falagard mapping for type 'GuiLook/PopupMenu' using base type 'CEGUI/PopupMenu', window renderer 'Falagard/PopupMenu' and Look'N'Feel 'GuiLook/PopupMenu'. (0012C708)
08/02/2010 10:06:33 (Std)    Creating falagard mapping for type 'GuiLook/MenuItem' using base type 'CEGUI/MenuItem', window renderer 'Falagard/MenuItem' and Look'N'Feel 'GuiLook/MenuItem'. (0012C708)
08/02/2010 10:06:33 (Std)    Creating falagard mapping for type 'GuiLook/AlternateProgressBar' using base type 'CEGUI/ProgressBar', window renderer 'Falagard/ProgressBar' and Look'N'Feel 'GuiLook/AltProgressBar'. (0012C708)
08/02/2010 10:06:33 (Std)    Creating falagard mapping for type 'GuiLook/ProgressBar' using base type 'CEGUI/ProgressBar', window renderer 'Falagard/ProgressBar' and Look'N'Feel 'GuiLook/ProgressBar'. (0012C708)
08/02/2010 10:06:33 (Std)    Creating falagard mapping for type 'GuiLook/VUMeter' using base type 'CEGUI/ProgressBar', window renderer 'Falagard/ProgressBar' and Look'N'Feel 'GuiLook/VUMeter'. (0012C708)
08/02/2010 10:06:33 (Std)    Creating falagard mapping for type 'GuiLook/VerticalScrollbar' using base type 'CEGUI/Scrollbar', window renderer 'Falagard/Scrollbar' and Look'N'Feel 'GuiLook/VerticalScrollbar'. (0012C708)
08/02/2010 10:06:33 (Std)    Creating falagard mapping for type 'GuiLook/HorizontalScrollbar' using base type 'CEGUI/Scrollbar', window renderer 'Falagard/Scrollbar' and Look'N'Feel 'GuiLook/HorizontalScrollbar'. (0012C708)
08/02/2010 10:06:33 (Std)    Creating falagard mapping for type 'GuiLook/VerticalScrollbarThumb' using base type 'CEGUI/Thumb', window renderer 'Falagard/Button' and Look'N'Feel 'GuiLook/VerticalScrollbarThumb'. (0012C708)
08/02/2010 10:06:33 (Std)    Creating falagard mapping for type 'GuiLook/HorizontalScrollbarThumb' using base type 'CEGUI/Thumb', window renderer 'Falagard/Button' and Look'N'Feel 'GuiLook/HorizontalScrollbarThumb'. (0012C708)
08/02/2010 10:06:33 (Std)    Creating falagard mapping for type 'GuiLook/LargeVerticalScrollbar' using base type 'CEGUI/Scrollbar', window renderer 'Falagard/Scrollbar' and Look'N'Feel 'GuiLook/LargeVerticalScrollbar'. (0012C708)
08/02/2010 10:06:33 (Std)    Creating falagard mapping for type 'GuiLook/LargeVerticalScrollbarThumb' using base type 'CEGUI/Thumb', window renderer 'Falagard/Button' and Look'N'Feel 'GuiLook/LargeVerticalScrollbarThumb'. (0012C708)
08/02/2010 10:06:33 (Std)    Creating falagard mapping for type 'GuiLook/TabButton' using base type 'CEGUI/TabButton', window renderer 'Falagard/TabButton' and Look'N'Feel 'GuiLook/TabButton'. (0012C708)
08/02/2010 10:06:33 (Std)    Creating falagard mapping for type 'GuiLook/TabControl' using base type 'CEGUI/TabControl', window renderer 'Falagard/TabControl' and Look'N'Feel 'GuiLook/TabControl'. (0012C708)
08/02/2010 10:06:33 (Std)    Creating falagard mapping for type 'GuiLook/TabContentPane' using base type 'DefaultWindow', window renderer 'Falagard/Default' and Look'N'Feel 'GuiLook/TabContentPane'. (0012C708)
08/02/2010 10:06:33 (Std)    Creating falagard mapping for type 'GuiLook/TabButtonPane' using base type 'DefaultWindow', window renderer 'Falagard/Default' and Look'N'Feel 'GuiLook/TabButtonPane'. (0012C708)
08/02/2010 10:06:33 (Std)    Creating falagard mapping for type 'GuiLook/ComboDropList' using base type 'CEGUI/ComboDropList', window renderer 'Falagard/Listbox' and Look'N'Feel 'GuiLook/ComboDropList'. (0012C708)
08/02/2010 10:06:33 (Std)    Creating falagard mapping for type 'GuiLook/ComboEditbox' using base type 'CEGUI/Editbox', window renderer 'Falagard/Editbox' and Look'N'Feel 'GuiLook/ComboEditbox'. (0012C708)
08/02/2010 10:06:33 (Std)    Creating falagard mapping for type 'GuiLook/Combobox' using base type 'CEGUI/Combobox', window renderer 'Falagard/Default' and Look'N'Feel 'GuiLook/Combobox'. (0012C708)
08/02/2010 10:06:33 (Std)    Creating falagard mapping for type 'GuiLook/Listbox' using base type 'CEGUI/Listbox', window renderer 'Falagard/Listbox' and Look'N'Feel 'GuiLook/Listbox'. (0012C708)
08/02/2010 10:06:33 (Std)    Creating falagard mapping for type 'GuiLook/ListHeader' using base type 'CEGUI/ListHeader', window renderer 'Falagard/ListHeader' and Look'N'Feel 'GuiLook/ListHeader'. (0012C708)
08/02/2010 10:06:33 (Std)    Creating falagard mapping for type 'GuiLook/ListHeaderSegment' using base type 'CEGUI/ListHeaderSegment', window renderer 'Falagard/ListHeaderSegment' and Look'N'Feel 'GuiLook/ListHeaderSegment'. (0012C708)
08/02/2010 10:06:33 (Std)    Creating falagard mapping for type 'GuiLook/MultiColumnList' using base type 'CEGUI/MultiColumnList', window renderer 'Falagard/MultiColumnList' and Look'N'Feel 'GuiLook/MultiColumnList'. (0012C708)
08/02/2010 10:06:33 (Std)    Creating falagard mapping for type 'GuiLook/Slider' using base type 'CEGUI/Slider', window renderer 'Falagard/Slider' and Look'N'Feel 'GuiLook/Slider'. (0012C708)
08/02/2010 10:06:33 (Std)    Creating falagard mapping for type 'GuiLook/SliderThumb' using base type 'CEGUI/Thumb', window renderer 'Falagard/Button' and Look'N'Feel 'GuiLook/SliderThumb'. (0012C708)
08/02/2010 10:06:33 (Std)    Creating falagard mapping for type 'GuiLook/ScrollablePane' using base type 'CEGUI/ScrollablePane', window renderer 'Falagard/ScrollablePane' and Look'N'Feel 'GuiLook/ScrollablePane'. (0012C708)
08/02/2010 10:06:33 (Std)    Creating falagard mapping for type 'GuiLook/Spinner' using base type 'CEGUI/Spinner', window renderer 'Falagard/Default' and Look'N'Feel 'GuiLook/Spinner'. (0012C708)
08/02/2010 10:06:33 (Std)    Creating falagard mapping for type 'GuiLook/Tooltip' using base type 'CEGUI/Tooltip', window renderer 'Falagard/Tooltip' and Look'N'Feel 'GuiLook/Tooltip'. (0012C708)
08/02/2010 10:06:33 (Std)    Creating falagard mapping for type 'GuiLook/StaticImage' using base type 'DefaultWindow', window renderer 'Falagard/StaticImage' and Look'N'Feel 'GuiLook/StaticImage'. (0012C708)
08/02/2010 10:06:33 (Std)    Creating falagard mapping for type 'GuiLook/StaticText' using base type 'DefaultWindow', window renderer 'Falagard/Default' and Look'N'Feel 'GuiLook/StaticText'. (0012C708)
08/02/2010 10:06:33 (Std)    Creating falagard mapping for type 'GuiLook/StaticTextOutline' using base type 'DefaultWindow', window renderer 'Falagard/Default' and Look'N'Feel 'GuiLook/StaticTextOutline'. (0012C708)
08/02/2010 10:06:33 (Std)    Creating falagard mapping for type 'GuiLook/StaticTextBox' using base type 'DefaultWindow', window renderer 'Falagard/StaticText' and Look'N'Feel 'GuiLook/StaticTextBox'. (0012C708)
08/02/2010 10:06:33 (Std)    Creating falagard mapping for type 'GuiLook/ItemText' using base type 'DefaultWindow', window renderer 'Falagard/Default' and Look'N'Feel 'GuiLook/ItemText'. (0012C708)
08/02/2010 10:06:33 (Std)    Creating falagard mapping for type 'GuiLook/CharacterSlot' using base type 'DefaultWindow', window renderer 'Falagard/Default' and Look'N'Feel 'GuiLook/CharacterSlot'. (0012C708)
08/02/2010 10:06:33 (Std)    Creating falagard mapping for type 'GuiLook/CharacterSlotHighlight' using base type 'DefaultWindow', window renderer 'Falagard/Default' and Look'N'Feel 'GuiLook/CharacterSlotHighlight'. (0012C708)
08/02/2010 10:06:33 (Std)    Creating falagard mapping for type 'GuiLook/ItemTooltip' using base type 'DefaultWindow', window renderer 'Falagard/Default' and Look'N'Feel 'GuiLook/ItemTooltip'. (0012C708)
08/02/2010 10:06:33 (Std)    Creating falagard mapping for type 'GuiLook/ItemTooltip2' using base type 'DefaultWindow', window renderer 'Falagard/Default' and Look'N'Feel 'GuiLook/ItemTooltip2'. (0012C708)
08/02/2010 10:06:33 (Std)    Creating falagard mapping for type 'GuiLook/FishingButton' using base type 'CEGUI/PushButton', window renderer 'Falagard/Button' and Look'N'Feel 'GuiLook/FishingButton'. (0012C708)
08/02/2010 10:06:33 (Std)    Creating falagard mapping for type 'GuiLook/PetFeedButton' using base type 'CEGUI/PushButton', window renderer 'Falagard/Button' and Look'N'Feel 'GuiLook/PetFeedButton'. (0012C708)
08/02/2010 10:06:33 (Std)    Creating falagard mapping for type 'GuiLook/QuestRadioButton' using base type 'CEGUI/PushButton', window renderer 'Falagard/Button' and Look'N'Feel 'GuiLook/QuestRadioButton'. (0012C708)
08/02/2010 10:06:33 (Std)    Creating falagard mapping for type 'GuiLook/WeaponSwitch' using base type 'CEGUI/Checkbox', window renderer 'Falagard/ToggleButton' and Look'N'Feel 'GuiLook/WeaponSwitch'. (0012C708)
08/02/2010 10:06:33 (Std)    Creating falagard mapping for type 'GuiLook/CloseTriangleLeft' using base type 'CEGUI/PushButton', window renderer 'Falagard/Button' and Look'N'Feel 'GuiLook/CloseTriangleLeft'. (0012C708)
08/02/2010 10:06:33 (Std)    Creating falagard mapping for type 'GuiLook/CloseTriangleRight' using base type 'CEGUI/PushButton', window renderer 'Falagard/Button' and Look'N'Feel 'GuiLook/CloseTriangleRight'. (0012C708)
08/02/2010 10:06:33 (Std)    Creating falagard mapping for type 'GuiLook/RadioTab' using base type 'CEGUI/RadioButton', window renderer 'Falagard/ToggleButton' and Look'N'Feel 'GuiLook/RadioTab'. (0012C708)
08/02/2010 10:06:34 (Std)    Attempting to load Scheme from file 'WindowsLook.scheme'.
08/02/2010 10:06:34 (Std)    Attempting to create an Imageset from the information specified in file 'WindowsLook.imageset'.
08/02/2010 10:06:34 (Std)    Started creation of Imageset from XML specification:
08/02/2010 10:06:34 (Std)    ---- CEGUI Imageset name: WindowsLook
08/02/2010 10:06:34 (Std)    ---- Source texture file: WindowsLook.dds in resource group: (Default)
08/02/2010 10:06:34 (Std)    Attempting to create Font from the information specified in file 'System.font'.
08/02/2010 10:06:34 (Std)    Started creation of FreeType Font:
08/02/2010 10:06:34 (Std)    ---- CEGUI font name: System
08/02/2010 10:06:34 (Std)    ----     Source file: msyh.TTF in resource group: (Default)
08/02/2010 10:06:34 (Std)    ---- Real point size: 10
08/02/2010 10:06:36 (Std)    Succsessfully loaded 29066 glyphs
08/02/2010 10:06:36 (Std)    ===== Falagard 'root' element: look and feel parsing begins =====
08/02/2010 10:06:37 (Std)    ===== Look and feel parsing completed =====
08/02/2010 10:06:37 (Std)    No window factories specified for module 'CEGUIFalagardWRBase' - adding all available factories...
08/02/2010 10:06:37 (Std)    Creating falagard mapping for type 'WindowsLook/Button' using base type 'CEGUI/PushButton', window renderer 'Falagard/Button' and Look'N'Feel 'WindowsLook/Button'. (0012C708)
08/02/2010 10:06:37 (Std)    Creating falagard mapping for type 'WindowsLook/Checkbox' using base type 'CEGUI/Checkbox', window renderer 'Falagard/ToggleButton' and Look'N'Feel 'WindowsLook/Checkbox'. (0012C708)
08/02/2010 10:06:37 (Std)    Creating falagard mapping for type 'WindowsLook/IconButton' using base type 'CEGUI/PushButton', window renderer 'Falagard/Button' and Look'N'Feel 'WindowsLook/IconButton'. (0012C708)
08/02/2010 10:06:37 (Std)    Creating falagard mapping for type 'WindowsLook/RadioButton' using base type 'CEGUI/RadioButton', window renderer 'Falagard/ToggleButton' and Look'N'Feel 'WindowsLook/RadioButton'. (0012C708)
08/02/2010 10:06:37 (Std)    Creating falagard mapping for type 'WindowsLook/FrameWindow' using base type 'CEGUI/FrameWindow', window renderer 'Falagard/FrameWindow' and Look'N'Feel 'WindowsLook/FrameWindow'. (0012C708)
08/02/2010 10:06:37 (Std)    Creating falagard mapping for type 'WindowsLook/Titlebar' using base type 'CEGUI/Titlebar', window renderer 'Falagard/Titlebar' and Look'N'Feel 'WindowsLook/Titlebar'. (0012C708)
08/02/2010 10:06:37 (Std)    Creating falagard mapping for type 'WindowsLook/SystemButton' using base type 'CEGUI/PushButton', window renderer 'Falagard/SystemButton' and Look'N'Feel 'WindowsLook/SystemButton'. (0012C708)
08/02/2010 10:06:37 (Std)    Creating falagard mapping for type 'WindowsLook/Editbox' using base type 'CEGUI/Editbox', window renderer 'Falagard/Editbox' and Look'N'Feel 'WindowsLook/Editbox'. (0012C708)
08/02/2010 10:06:37 (Std)    Creating falagard mapping for type 'WindowsLook/MultiLineEditbox' using base type 'CEGUI/MultiLineEditbox', window renderer 'Falagard/MultiLineEditbox' and Look'N'Feel 'WindowsLook/MultiLineEditbox'. (0012C708)
08/02/2010 10:06:37 (Std)    Creating falagard mapping for type 'WindowsLook/Menubar' using base type 'CEGUI/Menubar', window renderer 'Falagard/Menubar' and Look'N'Feel 'WindowsLook/Menubar'. (0012C708)
08/02/2010 10:06:37 (Std)    Creating falagard mapping for type 'WindowsLook/PopupMenu' using base type 'CEGUI/PopupMenu', window renderer 'Falagard/PopupMenu' and Look'N'Feel 'WindowsLook/PopupMenu'. (0012C708)
08/02/2010 10:06:37 (Std)    Creating falagard mapping for type 'WindowsLook/MenuItem' using base type 'CEGUI/MenuItem', window renderer 'Falagard/MenuItem' and Look'N'Feel 'WindowsLook/MenuItem'. (0012C708)
08/02/2010 10:06:37 (Std)    Creating falagard mapping for type 'WindowsLook/ProgressBar' using base type 'CEGUI/ProgressBar', window renderer 'Falagard/ProgressBar' and Look'N'Feel 'WindowsLook/ProgressBar'. (0012C708)
08/02/2010 10:06:37 (Std)    Creating falagard mapping for type 'WindowsLook/VerticalScrollbar' using base type 'CEGUI/Scrollbar', window renderer 'Falagard/Scrollbar' and Look'N'Feel 'WindowsLook/VerticalScrollbar'. (0012C708)
08/02/2010 10:06:37 (Std)    Creating falagard mapping for type 'WindowsLook/HorizontalScrollbar' using base type 'CEGUI/Scrollbar', window renderer 'Falagard/Scrollbar' and Look'N'Feel 'WindowsLook/HorizontalScrollbar'. (0012C708)
08/02/2010 10:06:37 (Std)    Creating falagard mapping for type 'WindowsLook/VerticalScrollbarThumb' using base type 'CEGUI/Thumb', window renderer 'Falagard/Button' and Look'N'Feel 'WindowsLook/VerticalScrollbarThumb'. (0012C708)
08/02/2010 10:06:37 (Std)    Creating falagard mapping for type 'WindowsLook/HorizontalScrollbarThumb' using base type 'CEGUI/Thumb', window renderer 'Falagard/Button' and Look'N'Feel 'WindowsLook/HorizontalScrollbarThumb'. (0012C708)
08/02/2010 10:06:37 (Std)    Creating falagard mapping for type 'WindowsLook/TabButton' using base type 'CEGUI/TabButton', window renderer 'Falagard/TabButton' and Look'N'Feel 'WindowsLook/TabButton'. (0012C708)
08/02/2010 10:06:37 (Std)    Creating falagard mapping for type 'WindowsLook/TabControl' using base type 'CEGUI/TabControl', window renderer 'Falagard/TabControl' and Look'N'Feel 'WindowsLook/TabControl'. (0012C708)
08/02/2010 10:06:37 (Std)    Creating falagard mapping for type 'WindowsLook/TabContentPane' using base type 'DefaultWindow', window renderer 'Falagard/Default' and Look'N'Feel 'WindowsLook/TabContentPane'. (0012C708)
08/02/2010 10:06:37 (Std)    Creating falagard mapping for type 'WindowsLook/TabButtonPane' using base type 'DefaultWindow', window renderer 'Falagard/Default' and Look'N'Feel 'WindowsLook/TabButtonPane'. (0012C708)
08/02/2010 10:06:37 (Std)    Creating falagard mapping for type 'WindowsLook/ComboDropList' using base type 'CEGUI/ComboDropList', window renderer 'Falagard/Listbox' and Look'N'Feel 'WindowsLook/ComboDropList'. (0012C708)
08/02/2010 10:06:37 (Std)    Creating falagard mapping for type 'WindowsLook/Combobox' using base type 'CEGUI/Combobox', window renderer 'Falagard/Default' and Look'N'Feel 'WindowsLook/Combobox'. (0012C708)
08/02/2010 10:06:37 (Std)    Creating falagard mapping for type 'WindowsLook/Listbox' using base type 'CEGUI/Listbox', window renderer 'Falagard/Listbox' and Look'N'Feel 'WindowsLook/Listbox'. (0012C708)
08/02/2010 10:06:37 (Std)    Creating falagard mapping for type 'WindowsLook/ListHeader' using base type 'CEGUI/ListHeader', window renderer 'Falagard/ListHeader' and Look'N'Feel 'WindowsLook/ListHeader'. (0012C708)
08/02/2010 10:06:37 (Std)    Creating falagard mapping for type 'WindowsLook/ListHeaderSegment' using base type 'CEGUI/ListHeaderSegment', window renderer 'Falagard/ListHeaderSegment' and Look'N'Feel 'WindowsLook/ListHeaderSegment'. (0012C708)
08/02/2010 10:06:37 (Std)    Creating falagard mapping for type 'WindowsLook/MultiColumnList' using base type 'CEGUI/MultiColumnList', window renderer 'Falagard/MultiColumnList' and Look'N'Feel 'WindowsLook/MultiColumnList'. (0012C708)
08/02/2010 10:06:37 (Std)    Creating falagard mapping for type 'WindowsLook/Slider' using base type 'CEGUI/Slider', window renderer 'Falagard/Slider' and Look'N'Feel 'WindowsLook/Slider'. (0012C708)
08/02/2010 10:06:37 (Std)    Creating falagard mapping for type 'WindowsLook/SliderThumb' using base type 'CEGUI/Thumb', window renderer 'Falagard/Button' and Look'N'Feel 'WindowsLook/SliderThumb'. (0012C708)
08/02/2010 10:06:37 (Std)    Creating falagard mapping for type 'WindowsLook/ScrollablePane' using base type 'CEGUI/ScrollablePane', window renderer 'Falagard/ScrollablePane' and Look'N'Feel 'WindowsLook/ScrollablePane'. (0012C708)
08/02/2010 10:06:37 (Std)    Creating falagard mapping for type 'WindowsLook/Spinner' using base type 'CEGUI/Spinner', window renderer 'Falagard/Default' and Look'N'Feel 'WindowsLook/Spinner'. (0012C708)
08/02/2010 10:06:37 (Std)    Creating falagard mapping for type 'WindowsLook/Tooltip' using base type 'CEGUI/Tooltip', window renderer 'Falagard/Tooltip' and Look'N'Feel 'WindowsLook/Tooltip'. (0012C708)
08/02/2010 10:06:37 (Std)    Creating falagard mapping for type 'WindowsLook/Static' using base type 'DefaultWindow', window renderer 'Falagard/Static' and Look'N'Feel 'WindowsLook/Static'. (0012C708)
08/02/2010 10:06:37 (Std)    Creating falagard mapping for type 'WindowsLook/StaticImage' using base type 'DefaultWindow', window renderer 'Falagard/StaticImage' and Look'N'Feel 'WindowsLook/StaticImage'. (0012C708)
08/02/2010 10:06:37 (Std)    Creating falagard mapping for type 'WindowsLook/StaticText' using base type 'DefaultWindow', window renderer 'Falagard/StaticText' and Look'N'Feel 'WindowsLook/StaticText'. (0012C708)
08/02/2010 10:06:37 (Std)    Creating falagard mapping for type 'WindowsLook/ItemListbox' using base type 'CEGUI/ItemListbox', window renderer 'Falagard/ItemListbox' and Look'N'Feel 'WindowsLook/ItemListbox'. (0012C708)
08/02/2010 10:06:37 (Std)    Creating falagard mapping for type 'WindowsLook/ListboxItem' using base type 'CEGUI/ItemEntry', window renderer 'Falagard/ItemEntry' and Look'N'Feel 'WindowsLook/ListboxItem'. (0012C708)
08/02/2010 10:06:37 (Std)    Creating falagard mapping for type 'WindowsLook/GroupBox' using base type 'CEGUI/GroupBox', window renderer 'Falagard/Default' and Look'N'Feel 'WindowsLook/GroupBox'. (0012C708)
08/02/2010 10:06:37 (Std)    ---- Successfully completed loading of GUI layout from 'test.layout' ----



I used the CEGUI 0.6.2 version.

What I want to do is that if clicked on the GUIs,do nothing ,if not ,move the player .So I created a unvisible default window,and added the GUIs as it's parent .But I found that if I clicked on the window which type is "GuiLook/StaticImage" ,the player still moved ,and if clicke on other type ,"GuiLook/ImageButton"for example , the player did not move.

:oops: Thanks for reading .

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Re: How can I get the top window's handle?

Postby CrazyEddie » Mon Feb 08, 2010 09:05

Right, thanks for the information, that definitely helps a lot. What you are trying to do, and the issue you are having, is very common. Unfortunately the 'issue' aspect is a bug in the 0.6.x versions of the code (my fault ;)) - I'll get to this in a moment.

A couple of things though. I can't remember how inputs are injected to CEGUI when using HGE. If the app is in control of that, normally you would examine the return value to determine whether CEGUI consumed the originally input event and then proceed to use the input in your game logic (for moving the man, or whatever) if CEGUI did not consume the event. However, if this is not exposed under HGE, then linking the game logic via CEGUI events is also fine.

The issue I mention above is basically that - most, but not all, times - injected inputs eventually find their way back to the root window, regardless of the window where the input was originally sent. As you might imagine, this is quite a major issue for a lot of people. The solution is basically to short-circuit the propagation of mouse based events so that this no longer happens, and is done by using event subscribers to manually mark certain events as handled so that they are not passed back up the window hierarchy. There are numerous ways of doing this, for this post I'll suggest the CEGUI::GlobalEventSet method...

What you need is a handler that you can subscribe to all mouse originated events. Within the handler - which will be called for all windows - you just need to look at the target window, see if this is a window where you want to stop propagation, and if it is return true (else return false). What this will basically do is make it so that when your current handler, subscribed to the root window, is only called when the event originated for that root window. Since that's quite confusing, some example:

This is the handler that will be subscribed to some events - obviously you can change it to a member func or whatever you need:

Code: Select all

bool mouseEventFixHandler(const CEGUI::EventArgs& e)
{
    const CEGUI::Window* const wnd = static_cast<const CEGUI::MouseEventArgs&>(e).window;
    return (wnd != CEGUI::System::getSingleton().getGUISheet());
}


This handler needs to be subscribed to the mouse events globally, so you might have lines such as (note you may not need all of these, just do the one's you're interested in):

Code: Select all

CEGUI::GlobalEventSet& ges(CEGUI::GlobalEventSet::getSingleton());

ges.subscribeEvent( "Window/MouseMove", &mouseEventFixHandler );
ges.subscribeEvent( "Window/MouseButtonDown", &mouseEventFixHandler );
ges.subscribeEvent( "Window/MouseButtonUp", &mouseEventFixHandler );
ges.subscribeEvent( "Window/MouseWheel", &mouseEventFixHandler );
ges.subscribeEvent( "Window/MouseClick", &mouseEventFixHandler );
ges.subscribeEvent( "Window/MouseDoubleClick", &mouseEventFixHandler );
ges.subscribeEvent( "Window/MouseTripleClick", &mouseEventFixHandler );


This should make it so that the only time your handler on the root window is called is when the user actually clicked directly on it - so you can clean out all those redundant checks. There may be scenarios where you need to propagate in some cases, so you may need to make the mouseEventFixHandler more selective in those cases.

HTH

CE.

chenltm
Just popping in
Just popping in
Posts: 8
Joined: Sun Nov 22, 2009 06:50

Re: How can I get the top window's handle?

Postby chenltm » Tue Feb 09, 2010 06:41

:hammer: Both ways can work ! thank you very much.

Still, I want to make a "big" UI with lost of "small" one on it sometime. So if you've changed the code of 0.6.x, please give me a message. :D

Thanks . :D

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Re: How can I get the top window's handle?

Postby CrazyEddie » Tue Feb 09, 2010 10:20

I've not fixed this in the 0.6.x code because it's a major behavioural change. It is fixed in the 0.7.x code, but this contains huge amounts of other changes and requires a new rewritten renderer module (which I guess does not exist for HGE at the current time).

CE.

chenltm
Just popping in
Just popping in
Posts: 8
Joined: Sun Nov 22, 2009 06:50

Re: How can I get the top window's handle?

Postby chenltm » Wed Feb 10, 2010 05:27

Hmm, :hammer: then I'll done my work by another way .
I'll try to make a hge renderer with cegui 0.7.x too when I got time. :D
Thank you.

jheld
Just popping in
Just popping in
Posts: 18
Joined: Sun Aug 09, 2009 04:06

Re: How can I get the top window's handle?

Postby jheld » Fri Feb 19, 2010 04:29

This might be what you're looking for (adopted from an Ogre3d forum long ago)

Code: Select all

bool WinWrap::isMouseOverGUI(void)
{
   CEGUI::Window* mouseOverWin = CEGUI::System::getSingleton().getWindowContainingMouse();
   if (mouseOverWin == NULL) return false;
   
   CEGUI::String type = mouseOverWin->getType();
   
   if(type == ((CEGUI::utf8*)"DefaultWindow"))  return false;
   else return true;
}


Return to “Help”

Who is online

Users browsing this forum: No registered users and 4 guests