A couple questions:fonts & boost

For help with anything that CEGUI doesn't offer straight out-of-the-box, e.g.:
- Implementation of new features, such as new Core classes, widgets, WindowRenderers, etc. ...
- Modification of any existing features for specific purposes
- Integration of CEGUI in new engines or frameworks and writing of new plugins (Renderer, Parser, ...) or modules

Moderators: CEGUI MVP, CEGUI Team

User avatar
saetrum
Quite a regular
Quite a regular
Posts: 55
Joined: Wed Jan 12, 2005 12:06
Location: Albuquerque, NM USA

A couple questions:fonts & boost

Postby saetrum » Wed Aug 11, 2004 13:49

I've got a couple of questions that hopefully someone can help me out with:

1) I am trying to make a new font to use with my app, but when I use it on gui elements I get nothing, literally, no text shows up. If I replace a line in the .xml file and use the tahoma font I get my text as expected. Here is what I've done to setup the new font:

created a .xml file (dragonmaster-18.xml) based on the Tahoma-14.xml file:

Code: Select all

<?xml version="1.0" ?>
<Font Name="DragonMaster-18" Filename="DragonMaster.ttf" Type="Dynamic" Size="18" AutoScaled="true"/>


Created a new scheme .xml file (battlesscheme.xml) based on the demoscheme file but with the new font added:

Code: Select all

<?xml version="1.0" ?>
<GUIScheme Name="BattlesScheme">
   <Imageset Name="TaharezImagery" Filename="TaharezImageset.xml" />
   <Imageset Name="OgreGuiImagery" Filename="ogregui.xml" />
   <Font Name="Tahoma-14" Filename="tahoma-14.xml" />
   <Font Name="Tahoma-8" Filename="tahoma-8.xml" />
   <Font Name="DragonMaster-18" Filename="dragonmaster-18.xml" />
   <WindowSet Filename="Taharez Look.dll">
      <WindowFactory Name="Taharez Frame Window" />
      <WindowFactory Name="Taharez Titlebar" />

.... etc.


I have created a static text object in an .xml file using this font:

Code: Select all

<?xml version="1.0" ?>
<GUILayout>
   <Window Type="DefaultGUISheet" Name="Progress">
      <Property Name="Position" Value="x:0.35 y:0" />

      <Property Name="RelativeMaxSize" Value="w:.3 h:1" />

      <Property Name="Size" Value="w:1 h:1" />

      <Property Name="Visible" Value="false" />

      <Window Type="Taharez StaticText" Name="Progress/Text">
         <Property Name="Position" Value="x:0 y:0.65" />

         <Property Name="FrameEnabled" Value="False" />

         <Property Name="BackgroundEnabled" Value="False" />

         <Property Name="Font" Value="DragonMaster-18" />

         <Property Name="Size" Value="w:1 h:0.25" />

         <Property Name="TextColours" Value="tl:FF7CFC00 tr:FF7CFC00 bl:FF48D1CC br:FF48D1CC" />

         <Property Name="HorzFormatting" Value="HorzCentred" />

         <Property Name="Text" Value="Loading..." />
      </Window>

      <Window Type="Taharez AltProgressBar" Name="Progress/Bar">
         <Property Name="Position" Value="x:0 y:0.8" />

         <Property Name="RelativeMaxSize" Value="w:1 h:0.07" />

         <Property Name="Size" Value="w:1 h:1" />

         <Property Name="StepSize" Value="0.1" />

      </Window>
   </Window>
</GUILayout>


I don't seem to understand why this won't work. However I know I may not be setting all the properties correctly for the font. How can I tell the native resolution of a font? I didn't create it and I don't see an obvious way to find out. Am I missing something else?

2) Boost question: I am trying to setup events for my gui and I have created a function called handleNew which takes a const CEGUI::EventArgs& e as its only argument. When I try to bind an event subscription to the event with boost::bind, I get a linking error. I thought I followed the demo, but I'm not having any luck. Of course I can take out the _1 argument and remove the arg from the function and it works (except I don't get the event information). I know this isn't a boost forum, but the boost forum has been less than helpful.

Code: Select all

WindowManager::getSingleton().getWindow((utf8*)"MainMenu/New")->
        subscribeEvent(PushButton::Clicked, boost::bind(&MenuMode::handleNew, this, _1));


Sorry for the long winded post, and thanks in advance.
There are 10 types of people in the world: those that understand binary and those that don't.

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

A couple questions:fonts & boost

Postby CrazyEddie » Wed Aug 11, 2004 13:55

Hi saetrum,

just a quick note to ask whether you can post the contents of CEGUI.log, thanks :)

I'll reply fully, and explain the "Native Resolution" stuff, when I get back a little later on. I have to go out right now...

User avatar
saetrum
Quite a regular
Quite a regular
Posts: 55
Joined: Wed Jan 12, 2005 12:06
Location: Albuquerque, NM USA

A couple questions:fonts & boost

Postby saetrum » Wed Aug 11, 2004 15:48

I assume you want the whole thing...

I checked the log first and didn't notice any problems or errors, that's what made me think I was doing something wrong.

Code: Select all

10/07/2004 20:08:08 (InfL1)   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
10/07/2004 20:08:08 (InfL1)   +                     Crazy Eddie's GUI System - Event log                    +
10/07/2004 20:08:08 (InfL1)   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

10/07/2004 20:08:08 (InfL1)   CEGUI::Logger singleton created.
10/07/2004 20:08:08 (InfL1)   ---- Begining CEGUI System initialisation ----
10/07/2004 20:08:08 (InfL1)   CEGUI::ImagesetManager singleton created
10/07/2004 20:08:08 (InfL1)   CEGUI::FontManager singleton created.
10/07/2004 20:08:08 (InfL1)   CEGUI::WindowFactoryManager singleton created
10/07/2004 20:08:08 (InfL1)   CEGUI::WindowManager singleton created
10/07/2004 20:08:08 (InfL1)   CEGUI::SchemeManager singleton created.
10/07/2004 20:08:08 (InfL1)   CEGUI::MouseCursor singleton created.
10/07/2004 20:08:08 (InfL1)   CEGUI::System singleton created.
10/07/2004 20:08:08 (InfL1)   ---- CEGUI System initialisation completed ----
10/07/2004 20:08:08 (InfL2)   Loaded GUI scheme 'BattlesScheme' from data in file 'battlesscheme.xml'.
10/07/2004 20:08:08 (InfL2)   ---- Begining resource loading for GUI scheme 'BattlesScheme' ----
10/07/2004 20:08:08 (InfL2)   Imageset 'TaharezImagery' has been created from the information specified in file 'TaharezImageset.xml'.
10/07/2004 20:08:08 (InfL2)   Imageset 'OgreGuiImagery' has been created from the information specified in file 'ogregui.xml'.
10/07/2004 20:08:08 (InfL2)   Imageset 'Tahoma-14 auto_glyph_images' has been created with texture only.
10/07/2004 20:08:08 (InfL2)   Font 'Tahoma-14' has been created from the information specified in file 'tahoma-14.xml'.
10/07/2004 20:08:08 (InfL2)   Imageset 'Tahoma-8 auto_glyph_images' has been created with texture only.
10/07/2004 20:08:08 (InfL2)   Font 'Tahoma-8' has been created from the information specified in file 'tahoma-8.xml'.
10/07/2004 20:08:08 (InfL2)   Imageset 'DragonMaster-18 auto_glyph_images' has been created with texture only.
10/07/2004 20:08:08 (InfL2)   Font 'DragonMaster-18' has been created from the information specified in file 'dragonmaster-18.xml'.
10/07/2004 20:08:08 (InfL2)   WindowFactory for 'Taharez Frame Window' windows added.
10/07/2004 20:08:08 (InfL2)   WindowFactory for 'Taharez Titlebar' windows added.
10/07/2004 20:08:08 (InfL2)   WindowFactory for 'Taharez Button' windows added.
10/07/2004 20:08:08 (InfL2)   WindowFactory for 'Taharez Close Button' windows added.
10/07/2004 20:08:08 (InfL2)   WindowFactory for 'Taharez Checkbox' windows added.
10/07/2004 20:08:08 (InfL2)   WindowFactory for 'Taharez RadioButton' windows added.
10/07/2004 20:08:08 (InfL2)   WindowFactory for 'Taharez Slider' windows added.
10/07/2004 20:08:08 (InfL2)   WindowFactory for 'Taharez Slider Thumb' windows added.
10/07/2004 20:08:08 (InfL2)   WindowFactory for 'Taharez ProgressBar' windows added.
10/07/2004 20:08:08 (InfL2)   WindowFactory for 'Taharez AltProgressBar' windows added.
10/07/2004 20:08:08 (InfL2)   WindowFactory for 'Taharez Editbox' windows added.
10/07/2004 20:08:08 (InfL2)   WindowFactory for 'Taharez VertScrollbar' windows added.
10/07/2004 20:08:08 (InfL2)   WindowFactory for 'Taharez VertScrollbarThumb' windows added.
10/07/2004 20:08:08 (InfL2)   WindowFactory for 'Taharez MiniVertScrollbar' windows added.
10/07/2004 20:08:08 (InfL2)   WindowFactory for 'Taharez MiniVertScrollbarThumb' windows added.
10/07/2004 20:08:08 (InfL2)   WindowFactory for 'Taharez MiniHorzScrollbar' windows added.
10/07/2004 20:08:08 (InfL2)   WindowFactory for 'Taharez MiniHorzScrollbarThumb' windows added.
10/07/2004 20:08:08 (InfL2)   WindowFactory for 'Taharez StaticImage' windows added.
10/07/2004 20:08:08 (InfL2)   WindowFactory for 'Taharez StaticText' windows added.
10/07/2004 20:08:08 (InfL2)   WindowFactory for 'Taharez Listbox' windows added.
10/07/2004 20:08:08 (InfL2)   WindowFactory for 'Taharez Combobox' windows added.
10/07/2004 20:08:08 (InfL2)   WindowFactory for 'Taharez ComboEditbox' windows added.
10/07/2004 20:08:08 (InfL2)   WindowFactory for 'Taharez ComboDropList' windows added.
10/07/2004 20:08:08 (InfL2)   WindowFactory for 'Taharez ListHeaderSegment' windows added.
10/07/2004 20:08:08 (InfL2)   WindowFactory for 'Taharez ListHeader' windows added.
10/07/2004 20:08:08 (InfL2)   WindowFactory for 'Taharez MultiColumnList' windows added.
10/07/2004 20:08:08 (InfL2)   WindowFactory for 'Taharez MultiLineEditbox' windows added.
10/07/2004 20:08:08 (InfL2)   ---- Resource loading for GUI scheme 'BattlesScheme' completed ----
10/07/2004 20:08:08 (InfL2)   Window 'root_wnd' of type 'DefaultGUISheet' has been created.
10/07/2004 20:08:08 (InfL2)   ---- Beginning loading of GUI layout from 'dbgoverlay.xml' ----
10/07/2004 20:08:08 (InfL2)   Window 'debug_overlay' of type 'DefaultGUISheet' has been created.
10/07/2004 20:08:08 (InfL2)   Window 'Panel 1' of type 'Taharez StaticText' has been created.
10/07/2004 20:08:08 (InfL2)   Window 'OPCurrentFPS' of type 'Taharez StaticText' has been created.
10/07/2004 20:08:08 (InfL2)   Window 'OPBar1' of type 'Taharez StaticImage' has been created.
10/07/2004 20:08:08 (InfL2)   Window 'OPAverageFPS' of type 'Taharez StaticText' has been created.
10/07/2004 20:08:08 (InfL2)   Window 'OPWorstFPS' of type 'Taharez StaticText' has been created.
10/07/2004 20:08:08 (InfL2)   Window 'OPBestFPS' of type 'Taharez StaticText' has been created.
10/07/2004 20:08:08 (InfL2)   Window 'OPTriCount' of type 'Taharez StaticText' has been created.
10/07/2004 20:08:08 (InfL2)   Window 'OPDebugMsg' of type 'Taharez StaticText' has been created.
10/07/2004 20:08:08 (InfL2)   Window 'OgreLogo' of type 'Taharez StaticImage' has been created.
10/07/2004 20:08:08 (InfL2)   Window 'CeguiLogo' of type 'Taharez StaticImage' has been created.
10/07/2004 20:08:08 (InfL1)   ---- Successfully completed loading of GUI layout from 'dbgoverlay.xml' ----
10/07/2004 20:08:08 (InfL2)   ---- Beginning loading of GUI layout from 'bm_main_menu_layout.xml' ----
10/07/2004 20:08:08 (InfL2)   Window 'MainMenu' of type 'DefaultGUISheet' has been created.
10/07/2004 20:08:08 (InfL2)   Window 'MainMenu/New' of type 'Taharez Button' has been created.
10/07/2004 20:08:08 (InfL2)   Window 'MainMenu/Load' of type 'Taharez Button' has been created.
10/07/2004 20:08:08 (InfL2)   Window 'MainMenu/Exit' of type 'Taharez Button' has been created.
10/07/2004 20:08:08 (InfL1)   ---- Successfully completed loading of GUI layout from 'bm_main_menu_layout.xml' ----
10/07/2004 20:08:08 (InfL2)   ---- Beginning loading of GUI layout from 'bm_load_menu_layout.xml' ----
10/07/2004 20:08:08 (InfL2)   Window 'LoadMenu' of type 'DefaultGUISheet' has been created.
10/07/2004 20:08:08 (InfL2)   Window 'LoadMenu/Window1__auto_titlebar__' of type 'Taharez Titlebar' has been created.
10/07/2004 20:08:08 (InfL2)   Window 'LoadMenu/Window1__auto_closebutton__' of type 'Taharez Close Button' has been created.
10/07/2004 20:08:08 (InfL2)   Window 'LoadMenu/Window1' of type 'Taharez Frame Window' has been created.
10/07/2004 20:08:08 (InfL2)   Window 'LoadMenu/Window1/Listbox__auto_vscrollbar____auto_thumb__' of type 'Taharez MiniVertScrollbarThumb' has been created.
10/07/2004 20:08:08 (InfL2)   Window 'LoadMenu/Window1/Listbox__auto_vscrollbar____auto_incbtn__' of type 'Taharez Button' has been created.
10/07/2004 20:08:08 (InfL2)   Window 'LoadMenu/Window1/Listbox__auto_vscrollbar____auto_decbtn__' of type 'Taharez Button' has been created.
10/07/2004 20:08:08 (InfL2)   Window 'LoadMenu/Window1/Listbox__auto_vscrollbar__' of type 'Taharez MiniVertScrollbar' has been created.
10/07/2004 20:08:08 (InfL2)   Window 'LoadMenu/Window1/Listbox__auto_hscrollbar____auto_thumb__' of type 'Taharez MiniHorzScrollbarThumb' has been created.
10/07/2004 20:08:08 (InfL2)   Window 'LoadMenu/Window1/Listbox__auto_hscrollbar____auto_incbtn__' of type 'Taharez Button' has been created.
10/07/2004 20:08:08 (InfL2)   Window 'LoadMenu/Window1/Listbox__auto_hscrollbar____auto_decbtn__' of type 'Taharez Button' has been created.
10/07/2004 20:08:08 (InfL2)   Window 'LoadMenu/Window1/Listbox__auto_hscrollbar__' of type 'Taharez MiniHorzScrollbar' has been created.
10/07/2004 20:08:08 (InfL2)   Window 'LoadMenu/Window1/Listbox' of type 'Taharez Listbox' has been created.
10/07/2004 20:08:08 (InfL2)   Window 'LoadMenu/Load' of type 'Taharez Button' has been created.
10/07/2004 20:08:08 (InfL2)   Window 'LoadMenu/Cancel' of type 'Taharez Button' has been created.
10/07/2004 20:08:08 (InfL1)   ---- Successfully completed loading of GUI layout from 'bm_load_menu_layout.xml' ----
10/07/2004 20:08:08 (InfL2)   ---- Beginning loading of GUI layout from 'bm_progress_layout.xml' ----
10/07/2004 20:08:08 (InfL2)   Window 'Progress' of type 'DefaultGUISheet' has been created.
10/07/2004 20:08:08 (InfL2)   Window 'Progress/Text' of type 'Taharez StaticText' has been created.
10/07/2004 20:08:08 (InfL2)   Window 'Progress/Bar' of type 'Taharez AltProgressBar' has been created.
10/07/2004 20:08:08 (InfL1)   ---- Successfully completed loading of GUI layout from 'bm_progress_layout.xml' ----
10/07/2004 20:08:23 (InfL1)   ---- Begining CEGUI System destruction ----
10/07/2004 20:08:23 (InfL2)   Window 'CeguiLogo' has been destroyed.
10/07/2004 20:08:23 (InfL2)   Window 'LoadMenu/Window1__auto_titlebar__' has been destroyed.
10/07/2004 20:08:23 (InfL2)   Window 'LoadMenu/Window1/Listbox__auto_vscrollbar____auto_thumb__' has been destroyed.
10/07/2004 20:08:23 (InfL2)   Window 'LoadMenu/Window1/Listbox__auto_vscrollbar____auto_incbtn__' has been destroyed.
10/07/2004 20:08:23 (InfL2)   Window 'LoadMenu/Window1/Listbox__auto_vscrollbar____auto_decbtn__' has been destroyed.
10/07/2004 20:08:23 (InfL2)   Window 'LoadMenu/Window1/Listbox__auto_vscrollbar__' has been destroyed.
10/07/2004 20:08:23 (InfL2)   Window 'LoadMenu/Window1/Listbox__auto_hscrollbar____auto_thumb__' has been destroyed.
10/07/2004 20:08:23 (InfL2)   Window 'LoadMenu/Window1/Listbox__auto_hscrollbar____auto_incbtn__' has been destroyed.
10/07/2004 20:08:23 (InfL2)   Window 'LoadMenu/Window1/Listbox__auto_hscrollbar____auto_decbtn__' has been destroyed.
10/07/2004 20:08:23 (InfL2)   Window 'LoadMenu/Window1/Listbox__auto_hscrollbar__' has been destroyed.
10/07/2004 20:08:23 (InfL2)   Window 'LoadMenu/Window1/Listbox' has been destroyed.
10/07/2004 20:08:23 (InfL2)   Window 'LoadMenu/Cancel' has been destroyed.
10/07/2004 20:08:23 (InfL2)   Window 'LoadMenu/Load' has been destroyed.
10/07/2004 20:08:23 (InfL2)   Window 'LoadMenu/Window1__auto_closebutton__' has been destroyed.
10/07/2004 20:08:23 (InfL2)   Window 'LoadMenu/Window1' has been destroyed.
10/07/2004 20:08:23 (InfL2)   Window 'LoadMenu' has been destroyed.
10/07/2004 20:08:23 (InfL2)   Window 'MainMenu/New' has been destroyed.
10/07/2004 20:08:23 (InfL2)   Window 'MainMenu/Exit' has been destroyed.
10/07/2004 20:08:23 (InfL2)   Window 'MainMenu/Load' has been destroyed.
10/07/2004 20:08:23 (InfL2)   Window 'MainMenu' has been destroyed.
10/07/2004 20:08:23 (InfL2)   Window 'OPAverageFPS' has been destroyed.
10/07/2004 20:08:23 (InfL2)   Window 'OPBar1' has been destroyed.
10/07/2004 20:08:23 (InfL2)   Window 'OPBestFPS' has been destroyed.
10/07/2004 20:08:23 (InfL2)   Window 'OPCurrentFPS' has been destroyed.
10/07/2004 20:08:23 (InfL2)   Window 'OPDebugMsg' has been destroyed.
10/07/2004 20:08:23 (InfL2)   Window 'OPTriCount' has been destroyed.
10/07/2004 20:08:23 (InfL2)   Window 'OPWorstFPS' has been destroyed.
10/07/2004 20:08:23 (InfL2)   Window 'OgreLogo' has been destroyed.
10/07/2004 20:08:23 (InfL2)   Window 'Panel 1' has been destroyed.
10/07/2004 20:08:23 (InfL2)   Window 'Progress/Text' has been destroyed.
10/07/2004 20:08:23 (InfL2)   Window 'Progress/Bar' has been destroyed.
10/07/2004 20:08:23 (InfL2)   Window 'Progress' has been destroyed.
10/07/2004 20:08:23 (InfL2)   Window 'debug_overlay' has been destroyed.
10/07/2004 20:08:23 (InfL2)   Window 'root_wnd' has been destroyed.
10/07/2004 20:08:23 (InfL1)   ---- Begining cleanup of GUI Scheme system ----
10/07/2004 20:08:23 (InfL2)   ---- Begining resource cleanup for GUI scheme 'BattlesScheme' ----
10/07/2004 20:08:23 (InfL2)   Font 'Tahoma-14' has been destroyed.
10/07/2004 20:08:23 (InfL2)   Imageset 'Tahoma-14 auto_glyph_images' has been destroyed.
10/07/2004 20:08:23 (InfL2)   Font 'Tahoma-8' has been destroyed.
10/07/2004 20:08:23 (InfL2)   Imageset 'Tahoma-8 auto_glyph_images' has been destroyed.
10/07/2004 20:08:23 (InfL2)   Font 'DragonMaster-18' has been destroyed.
10/07/2004 20:08:23 (InfL2)   Imageset 'DragonMaster-18 auto_glyph_images' has been destroyed.
10/07/2004 20:08:23 (InfL2)   Imageset 'TaharezImagery' has been destroyed.
10/07/2004 20:08:23 (InfL2)   Imageset 'OgreGuiImagery' has been destroyed.
10/07/2004 20:08:23 (InfL2)   WindowFactory for 'Taharez Frame Window' windows removed.
10/07/2004 20:08:23 (InfL2)   WindowFactory for 'Taharez Titlebar' windows removed.
10/07/2004 20:08:23 (InfL2)   WindowFactory for 'Taharez Button' windows removed.
10/07/2004 20:08:23 (InfL2)   WindowFactory for 'Taharez Close Button' windows removed.
10/07/2004 20:08:23 (InfL2)   WindowFactory for 'Taharez Checkbox' windows removed.
10/07/2004 20:08:23 (InfL2)   WindowFactory for 'Taharez RadioButton' windows removed.
10/07/2004 20:08:23 (InfL2)   WindowFactory for 'Taharez Slider' windows removed.
10/07/2004 20:08:23 (InfL2)   WindowFactory for 'Taharez Slider Thumb' windows removed.
10/07/2004 20:08:23 (InfL2)   WindowFactory for 'Taharez ProgressBar' windows removed.
10/07/2004 20:08:23 (InfL2)   WindowFactory for 'Taharez AltProgressBar' windows removed.
10/07/2004 20:08:23 (InfL2)   WindowFactory for 'Taharez Editbox' windows removed.
10/07/2004 20:08:23 (InfL2)   WindowFactory for 'Taharez VertScrollbar' windows removed.
10/07/2004 20:08:23 (InfL2)   WindowFactory for 'Taharez VertScrollbarThumb' windows removed.
10/07/2004 20:08:23 (InfL2)   WindowFactory for 'Taharez MiniVertScrollbar' windows removed.
10/07/2004 20:08:23 (InfL2)   WindowFactory for 'Taharez MiniVertScrollbarThumb' windows removed.
10/07/2004 20:08:23 (InfL2)   WindowFactory for 'Taharez MiniHorzScrollbar' windows removed.
10/07/2004 20:08:23 (InfL2)   WindowFactory for 'Taharez MiniHorzScrollbarThumb' windows removed.
10/07/2004 20:08:23 (InfL2)   WindowFactory for 'Taharez StaticImage' windows removed.
10/07/2004 20:08:23 (InfL2)   WindowFactory for 'Taharez StaticText' windows removed.
10/07/2004 20:08:23 (InfL2)   WindowFactory for 'Taharez Listbox' windows removed.
10/07/2004 20:08:23 (InfL2)   WindowFactory for 'Taharez Combobox' windows removed.
10/07/2004 20:08:23 (InfL2)   WindowFactory for 'Taharez ComboEditbox' windows removed.
10/07/2004 20:08:23 (InfL2)   WindowFactory for 'Taharez ComboDropList' windows removed.
10/07/2004 20:08:23 (InfL2)   WindowFactory for 'Taharez ListHeaderSegment' windows removed.
10/07/2004 20:08:23 (InfL2)   WindowFactory for 'Taharez ListHeader' windows removed.
10/07/2004 20:08:23 (InfL2)   WindowFactory for 'Taharez MultiColumnList' windows removed.
10/07/2004 20:08:23 (InfL2)   WindowFactory for 'Taharez MultiLineEditbox' windows removed.
10/07/2004 20:08:23 (InfL2)   ---- Resource cleanup for GUI scheme 'BattlesScheme' completed ----
10/07/2004 20:08:23 (InfL2)   GUI scheme 'BattlesScheme' has been unloaded.
10/07/2004 20:08:23 (InfL1)   CEGUI::SchemeManager singleton destroyed.
10/07/2004 20:08:23 (InfL1)   CEGUI::WindowManager singleton destroyed
10/07/2004 20:08:23 (InfL1)   CEGUI::WindowFactoryManager singleton destroyed
10/07/2004 20:08:23 (InfL1)   ---- Begining cleanup of Font system ----
10/07/2004 20:08:23 (InfL1)   CEGUI::FontManager singleton destroyed.
10/07/2004 20:08:23 (InfL1)   CEGUI::MouseCursor singleton destroyed.
10/07/2004 20:08:23 (InfL1)   ---- Begining cleanup of Imageset system ----
10/07/2004 20:08:23 (InfL1)   CEGUI::ImagesetManager singleton destroyed
10/07/2004 20:08:23 (InfL1)   CEGUI::System singleton destroyed.
10/07/2004 20:08:23 (InfL1)   ---- CEGUI System destruction completed ----
10/07/2004 20:08:23 (InfL1)   CEGUI::Logger singleton destroyed.
There are 10 types of people in the world: those that understand binary and those that don't.

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

A couple questions:fonts & boost

Postby CrazyEddie » Wed Aug 11, 2004 18:18

Thanks for the log, as you rightly said - no problems there.

The font problem is an add one. Now this question is going to sound ridiculous, but you’re sure the font contains the glyphs you’re trying to render? If you’re happy with the copyright situation, could you email me the font as it could be a bug in the Font code, though it has worked with all the fonts I have tried to date.

The “Native Resolution” setting is part of the image auto-scaling system provided within CEGUI. What it basically says is that whatever the true resolution of the display, you want the images scaled so that they appear the same physical size as they would at the native resolution. The reason for this facility is that an image displayed at a lower resolution appears bigger on the screen than the exact same image displayed at a higher resolution (so an image 30 pixels by 30 pixels, displayed at 640x480 looks twice as big as the same image displayed at 1280x960). The auto-scaling system allows you to set a “native resolution” and the imagery will be scaled up or down accordingly and shown at the same size regardless of the actual screen resolution. This works really well (especially for fonts) with higher resolutions, though if you set the display resolution to lower than the native setting for an imageset/font, things do start to lose definition.

The boost issue is also odd as your binding code looks fine. Can you post the full declaration of the handler method, and also the linking error you’re getting. I know it’s a pain, but the more information I have the better ;)

So, unfortunately I have no definite answers for you yet. But hopefully with a bit more information I’ll be able to help you sort it out :)

CE.

User avatar
saetrum
Quite a regular
Quite a regular
Posts: 55
Joined: Wed Jan 12, 2005 12:06
Location: Albuquerque, NM USA

A couple questions:fonts & boost

Postby saetrum » Wed Aug 11, 2004 18:31

The font I'm trying to use is just one I picked up off the internet. It is free to use for non-commercial projects. I'll send you the font. I don't know how to check for the glyphs other than looking at the .ttf file, is there a better way?

Thanks for the explanation on the native resolution thing. I think I understand now.

Here is the code that calls the boost::bind method (I only mentioned 1 before, but I actually have 5 events I subscribe to)

Code: Select all

  WindowManager::getSingleton().getWindow((utf8*)"MainMenu/New")->
        subscribeEvent(PushButton::Clicked, boost::bind(&MenuMode::handleNew, this, _1));
     
      WindowManager::getSingleton().getWindow((utf8*)"MainMenu/Load")->
        subscribeEvent(PushButton::Clicked, boost::bind(&MenuMode::handleLoad, this, _1));
     
      WindowManager::getSingleton().getWindow((utf8*)"MainMenu/Exit")->
        subscribeEvent(PushButton::Clicked, boost::bind(&MenuMode::handleExit, this, _1));
     
      WindowManager::getSingleton().getWindow((utf8*)"LoadMenu/Load")->
        subscribeEvent(PushButton::Clicked, boost::bind(&MenuMode::handleLoading, this, _1));
     
      WindowManager::getSingleton().getWindow((utf8*)"LoadMenu/Cancel")->
        subscribeEvent(PushButton::Clicked, boost::bind(&MenuMode::handleCancel, this, _1));




Here are the handler methods (I have 5 - they are part of the MenuMode class):

Code: Select all

void handleNew(const CEGUI::EventArgs& e);
  void handleLoad(const CEGUI::EventArgs& e);
  void handleExit(const CEGUI::EventArgs& e);
  void handleLoading(const CEGUI::EventArgs& e);
  void handleCancel(const CEGUI::EventArgs& e);


Here is the error:

Code: Select all

:\cegui_mk2\dependencies\include\boost\bind\arg.hpp(26) : fatal error C1001: INTERNAL COMPILER ERROR
        (compiler file 'msc1.cpp', line 1794)
         Please choose the Technical Support command on the Visual C++
         Help menu, or open the Technical Support help file for more information


The odd part is that it seems to be a visual studio error, but I can't figure out why.
There are 10 types of people in the world: those that understand binary and those that don't.

User avatar
saetrum
Quite a regular
Quite a regular
Posts: 55
Joined: Wed Jan 12, 2005 12:06
Location: Albuquerque, NM USA

A couple questions:fonts & boost

Postby saetrum » Wed Aug 11, 2004 18:47

Does it matter if those handler functions are private or protected in the class?
There are 10 types of people in the world: those that understand binary and those that don't.

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

A couple questions:fonts & boost

Postby CrazyEddie » Wed Aug 11, 2004 19:45

Ugh! The dreaded internal compiler error :(

The handler functions can be protected or private, the rule is just that they must be visible at the point of binding. CEGUI internally uses the events system, and all the handlers are protected or private. Also due to the fact the system uses the events internally, shows that VC6 can properly compile the event bindings. This error is another one that will need to be investigated further (for which I'll have to switch to my VC6 copies of everything, so I can't do this until the morning).

I think the font issue appears to be some kind of bug, so thanks for finding that :) I have done some tracing through the font code, but again a fix will have to wait until tomorrow (I will definately fix it tomorrow, unless a fix is technically impossible - which is doubtful). Btw, for checking glyphs I just use the Windows Character Map tool :)

So again I'm unfortunately unable to sort you out a fix immediately :( Hopefully I'll have better news by lunch tomorrow :D

CE.

User avatar
saetrum
Quite a regular
Quite a regular
Posts: 55
Joined: Wed Jan 12, 2005 12:06
Location: Albuquerque, NM USA

A couple questions:fonts & boost

Postby saetrum » Wed Aug 11, 2004 19:59

CE,

No rush. I'm not under any sort of deadline. I really appreciate your help. I'll see if I can get any more information.

BTW, it seems as if I can build my project (no compiller error) if I only use the _1 argument with one function call, but leave the others without the _1 argument (of course I have to adjust the function declarations and remove the EventArgs argument as well). Don't know if this helps or not.
There are 10 types of people in the world: those that understand binary and those that don't.

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

A couple questions:fonts & boost

Postby CrazyEddie » Thu Aug 12, 2004 13:05

Hi,

I have fixed the font bug, this is in CVS and also the current snapshot downloads :)

I have not looked into the binding issue yet, but I'm hoping to get the time when I get back this evening.

BTW, it seems as if I can build my project (no compiller error) if I only use the _1 argument with one function call, but leave the others without the _1 argument (of course I have to adjust the function declarations and remove the EventArgs argument as well). Don't know if this helps or not.


This is very odd behavior, but the information is certainly useful, I'll try to recreate the problem later, then I'll be able to advise on how to fix it :)

CE.

User avatar
saetrum
Quite a regular
Quite a regular
Posts: 55
Joined: Wed Jan 12, 2005 12:06
Location: Albuquerque, NM USA

A couple questions:fonts & boost

Postby saetrum » Thu Aug 12, 2004 13:25

Thanks. I'll grab the latest snapshot.

I'll keep trying to get more information about the boost issue.
There are 10 types of people in the world: those that understand binary and those that don't.

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

A couple questions:fonts & boost

Postby CrazyEddie » Thu Aug 12, 2004 19:05

Okay, this one's gonna make you weep :D

Make sure that boost/bind.hpp is the first include that get's included in the code file where the binding happens (if you're not including bosst/bind.hpp directly in your .cpp, but via another header, ensure it's the first include in that header, and include that header first). End of problem.

One other important thing is to make sure that 'this' passed to bind is an instance of the object containing the method you are binding, obvious I know, but it didn't stop me from missing it ;)

HTH

CE.

User avatar
saetrum
Quite a regular
Quite a regular
Posts: 55
Joined: Wed Jan 12, 2005 12:06
Location: Albuquerque, NM USA

A couple questions:fonts & boost

Postby saetrum » Thu Aug 12, 2004 19:46

CE,

I should have thought of that! :lol: Okay, I'll give it a shot.

And I'll make sure 'this' really is this :)

Thanks!

edit: BTW, the font fix worked great!
There are 10 types of people in the world: those that understand binary and those that don't.

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

A couple questions:fonts & boost

Postby CrazyEddie » Tue Aug 31, 2004 08:25

Whoops, that was me. I really got to make an account here, but it keeps blocking my user name. I guess because I've Guest posted under it, or something.

This is caused by a cookie issue, if you delete the sourceforge.net cookie named 'username' the registration and login will work okay :) This is really quite strange since the site does not use a cookie with the same name :?

CE.


Return to “Modifications / Integrations / Customisations”

Who is online

Users browsing this forum: No registered users and 6 guests