[Orxonox-commit 6833] r11454 - in code/branches/ogre1.9: cmake/tools src/libraries/core
landauf at orxonox.net
landauf at orxonox.net
Sun Oct 15 16:29:18 CEST 2017
Author: landauf
Date: 2017-10-15 16:29:18 +0200 (Sun, 15 Oct 2017)
New Revision: 11454
Modified:
code/branches/ogre1.9/cmake/tools/FindCEGUI.cmake
code/branches/ogre1.9/src/libraries/core/GUIManager.cc
Log:
reverted some changes in cmake script; also inject time pulse to CeguiContext (this is recommended by the cegui documentation)
Modified: code/branches/ogre1.9/cmake/tools/FindCEGUI.cmake
===================================================================
--- code/branches/ogre1.9/cmake/tools/FindCEGUI.cmake 2017-10-15 11:12:20 UTC (rev 11453)
+++ code/branches/ogre1.9/cmake/tools/FindCEGUI.cmake 2017-10-15 14:29:18 UTC (rev 11454)
@@ -31,24 +31,20 @@
INCLUDE(HandleLibraryTypes)
# Determine CEGUI's version
-#FIND_FILE(CEGUI_VERSION_FILE Version.h
-# PATHS $ENV{CEGUIDIR}
-# PATH_SUFFIXES include include/CEGUI include/cegui-0.8.4/CEGUI
-#)
-file(GLOB CEGUI_VERSION_FILE "/usr/include/cegui-*/CEGUI/Version.h")
-message("Found File: " ${CEGUI_VERSION_FILE})
+FIND_FILE(CEGUI_VERSION_FILE CEGUIVersion.h Version.h
+ PATHS $ENV{CEGUIDIR}
+ PATH_SUFFIXES include include/CEGUI
+)
DETERMINE_VERSION(CEGUI ${CEGUI_VERSION_FILE})
-message("Found Version: ${CEGUI_VERSION}")
# Find CEGUI headers
COMPARE_VERSION_STRINGS("${CEGUI_VERSION}" "0.8" _version_0_8_compare)
-message("CEGUI Version: ${_version_0_8_compare}")
# Version 0.8 introduced a new directory and file naming convention
IF(_version_0_8_compare GREATER -1)
# 0.8 and newer
FIND_PATH(CEGUI_INCLUDE_DIR CEGUI/CEGUI.h
PATHS $ENV{CEGUIDIR}
- PATH_SUFFIXES include/cegui-${CEGUI_VERSION}/
+ PATH_SUFFIXES include
)
ELSE()
# 0.7 and older
@@ -105,7 +101,7 @@
${DEP_INCLUDE_DIR}/tolua++/include
# For Mac OS X, tolua++ is a separate framework in the dependency package
${DEP_FRAMEWORK_DIR}
- #NO_DEFAULT_PATH # Don't attempt to find tolua++ installed on the system
+ NO_DEFAULT_PATH # Don't attempt to find tolua++ installed on the system
)
# Find CEGUI Tolua++ libraries
FIND_LIBRARY(CEGUI_TOLUA_LIBRARY_OPTIMIZED
@@ -121,7 +117,6 @@
# Newer versions of CEGUI have the renderer for OGRE shipped with them
COMPARE_VERSION_STRINGS("${CEGUI_VERSION}" "0.7" _version_0_7_compare TRUE)
-message("another version: ${CEGUI_INCLUDE_DIR}/RendererModules/Ogre")
IF(_version_0_7_compare GREATER -1)
# Find CEGUI OGRE Renderer headers
FIND_PATH(CEGUI_OGRE_RENDERER_INCLUDE_DIR CEGUIOgreRenderer.h Renderer.h
@@ -128,7 +123,7 @@
PATHS
$ENV{CEGUIDIR}
$ENV{CEGUIOGRERENDERERDIR}
- ${CEGUI_INCLUDE_DIR}/CEGUI/RendererModules/Ogre
+ ${CEGUI_INCLUDE_DIR}/RendererModules/Ogre
PATH_SUFFIXES include include/CEGUI
)
# Find CEGUI OGRE Renderer libraries
Modified: code/branches/ogre1.9/src/libraries/core/GUIManager.cc
===================================================================
--- code/branches/ogre1.9/src/libraries/core/GUIManager.cc 2017-10-15 11:12:20 UTC (rev 11453)
+++ code/branches/ogre1.9/src/libraries/core/GUIManager.cc 2017-10-15 14:29:18 UTC (rev 11454)
@@ -481,6 +481,9 @@
{
assert(guiSystem_);
this->protectedCeguiSystemCall(std::bind(&CEGUI::System::injectTimePulse, arg::_1, time.getDeltaTime()));
+#if CEGUI_VERSION >= 0x000800
+ this->protectedCeguiContextCall(std::bind(&CEGUI::GUIContext::injectTimePulse, arg::_1, time.getDeltaTime()));
+#endif
}
/**
@@ -906,7 +909,7 @@
{
#if CEGUI_VERSION >= 0x000800
this->guiRenderer_->setDisplaySize(CEGUI::Sizef((float)newWidth, (float)newHeight));
- this->rootWindow_->setSize(CEGUI::Size<CEGUI::UDim>(CEGUI::UDim(1, (float)newWidth), CEGUI::UDim(1, (float)newHeight)));
+ this->rootWindow_->setSize(CEGUI::USize(CEGUI::UDim(1, (float)newWidth), CEGUI::UDim(1, (float)newHeight)));
#else
this->guiRenderer_->setDisplaySize(CEGUI::Size((float)newWidth, (float)newHeight));
this->rootWindow_->setSize(CEGUI::UVector2(CEGUI::UDim(1, (float)newWidth), CEGUI::UDim(1, (float)newHeight)));
More information about the Orxonox-commit
mailing list