Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 28, 2011, 5:10:01 PM (14 years ago)
Author:
dafrick
Message:

Merging tutoriallevel3 branch into presentation branch.

Location:
code/branches/presentation
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • code/branches/presentation

  • code/branches/presentation/src/libraries/core/GUIManager.cc

    r8627 r8637  
    3838#include <CEGUIDefaultLogger.h>
    3939#include <CEGUIExceptions.h>
     40#include <CEGUIFontManager.h>
    4041#include <CEGUIInputEvent.h>
    4142#include <CEGUIMouseCursor.h>
     
    4445#include <CEGUIWindow.h>
    4546#include <CEGUIWindowManager.h>
     47#include <CEGUIXMLAttributes.h>
    4648#include <elements/CEGUIListbox.h>
    4749#include <elements/CEGUIListboxItem.h>
     
    729731    }
    730732
     733    /**
     734    @brief
     735        Adds a new freetype font to the CEGUI system.
     736    @param name
     737        The name of the new font.
     738    @param size
     739        The font size of the new font in pixels.
     740        @param fontName
     741        The filename of the font.
     742    */
     743    /*static*/ void GUIManager::addFontHelper(const std::string& name, int size, const std::string& fontName)
     744    {
     745        if(CEGUI::FontManager::getSingleton().isFontPresent(name)) // If a font with that name already exists.
     746            return;
     747
     748        CEGUI::Font* font = NULL;
     749        CEGUI::XMLAttributes xmlAttributes;
     750
     751        // Attributes specified within CEGUIFont
     752        xmlAttributes.add("Name", name);
     753        xmlAttributes.add("Filename", fontName);
     754        xmlAttributes.add("ResourceGroup", "");
     755        xmlAttributes.add("AutoScaled", "true");
     756        xmlAttributes.add("NativeHorzRes", "800");
     757        xmlAttributes.add("NativeVertRes", "600");
     758
     759        // Attributes specified within CEGUIXMLAttributes
     760        xmlAttributes.add("Size", multi_cast<std::string>(size));
     761        xmlAttributes.add("AntiAlias", "true");
     762
     763        font = CEGUI::FontManager::getSingleton().createFont("FreeType", xmlAttributes);
     764        if(font != NULL)
     765            font->load();
     766    }
     767
    731768}
  • code/branches/presentation/src/libraries/core/GUIManager.h

    r8627 r8637  
    128128
    129129        // TODO: Temporary hack because the tolua exported CEGUI method does not seem to work
    130         static void subscribeEventHelper(CEGUI::Window* window, const std::string& event, const std::string& function); //tolua_export
    131         static void setTooltipTextHelper(CEGUI::ListboxItem* item, const std::string& toooltip); //tolua_export
    132         static void setItemTooltipsEnabledHelper(CEGUI::Listbox* listbox, bool enabled); //tolua_export
     130        static void subscribeEventHelper(CEGUI::Window* window, const std::string& event, const std::string& function); // tolua_export
     131        static void setTooltipTextHelper(CEGUI::ListboxItem* item, const std::string& toooltip); // tolua_export
     132        static void setItemTooltipsEnabledHelper(CEGUI::Listbox* listbox, bool enabled); // tolua_export
     133        static void addFontHelper(const std::string& name, int size, const std::string& fontName); // tolua_export
    133134
    134135        static GUIManager& getInstance() { return Singleton<GUIManager>::getInstance(); } // tolua_export
  • code/branches/presentation/src/libraries/network/synchronisable/Synchronisable.cc

    r8329 r8637  
    383383  /**
    384384   * This function determines, wheter the object should be saved to the bytestream (according to its syncmode/direction)
    385    * @param id gamestate id
    386385   * @param mode Synchronisation mode (toclient, toserver or bidirectional)
    387386   * @return true/false
     
    397396  /**
    398397   * This function determines, wheter the object should accept data from the bytestream (according to its syncmode/direction)
    399    * @param id gamestate id
    400398   * @param mode Synchronisation mode (toclient, toserver or bidirectional)
    401399   * @return true/false
Note: See TracChangeset for help on using the changeset viewer.