*Changed location of called macro cmake file 4.x-dev

Mon, 23 Nov 2020 01:29:42 +0200

author
Luca Tonini
date
Mon, 23 Nov 2020 01:29:42 +0200
branch
4.x-dev
changeset 1496
963cdac12b9f
parent 1495
3a06f30f2749
child 1497
72957a374087

*Changed location of called macro cmake file

Tools/ResourceManagementUI/CMakeLists.txt file | annotate | diff | comparison | revisions
Tools/ResourceManagementUI/Scripts/Macros.cmake file | annotate | diff | comparison | revisions
Tools/ResourceManagementUI/Source/UI/App.cpp file | annotate | diff | comparison | revisions
Tools/ResourceManagementUI/Source/UI/App.h file | annotate | diff | comparison | revisions
--- a/Tools/ResourceManagementUI/CMakeLists.txt	Sun Nov 22 13:00:24 2020 +0200
+++ b/Tools/ResourceManagementUI/CMakeLists.txt	Mon Nov 23 01:29:42 2020 +0200
@@ -14,7 +14,7 @@
 
 add_compile_options(-std=c++14)
 
-include(Scripts/Macros.cmake)
+include(/home/$ENV{USER}/Gorgon/Scripts/Macros.cmake)
 
 set(DebugLibs "")
 set(OptimizedLibs "")
--- a/Tools/ResourceManagementUI/Scripts/Macros.cmake	Sun Nov 22 13:00:24 2020 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,131 +0,0 @@
-CMAKE_MINIMUM_REQUIRED(VERSION 3.0)
-
-MACRO(DoSource)
-	#IF(${wd} MATCHES ".+")
-	#	MESSAGE("> Listing ${wd}")
-	#ELSE()
-	#	MESSAGE("> Listing Root")
-	#ENDIF()
-	
-	STRING(REGEX REPLACE "/" "\\\\" srcgrp "${wd}")
-	STRING(REGEX REPLACE "Source" "" srcgrp "${srcgrp}")
-	STRING(REGEX REPLACE "^\\\\" "" srcgrp "${srcgrp}")
-	
-	IF(${wd} MATCHES ".+")
-		SET(LocalFixed)
-		SET(LocalShaders)
-		FOREACH(L ${Local}) 
-			IF(IS_DIRECTORY "${CMAKE_SOURCE_DIR}/${wd}/${L}")
-			ELSEIF(L MATCHES ".*\\.glsl")
-				LIST(APPEND LocalShaders "${wd}/${L}")
-			ELSE()
-				LIST(APPEND LocalFixed "${wd}/${L}")
-			ENDIF()
-		ENDFOREACH()
-	ELSE()
-		SET(LocalFixed)
-		SET(LocalShaders)
-		FOREACH(L ${Local}) 
-			IF(IS_DIRECTORY "${CMAKE_SOURCE_DIR}/${wd}/${L}")
-			ELSEIF(L MATCHES ".*\\.glsl")
-				LIST(APPEND LocalShaders ${L})
-			ELSE()
-				LIST(APPEND LocalFixed ${L})
-			ENDIF()
-		ENDFOREACH()
-	ENDIF()
-
-	LIST(APPEND All ${LocalFixed} ${LocalShaders})
-	LIST(LENGTH LocalFixed len)
-	IF(len GREATER 7)
-		SET(headergrpfiles)
-		SET(srcgrpfiles)
-		 
-		FOREACH(S ${LocalFixed})
-			IF(S MATCHES ".*\\.h")
-				LIST(APPEND headergrpfiles ${S})
-			ELSE()
-				LIST(APPEND srcgrpfiles ${S})
-			ENDIF()
-		ENDFOREACH()
-		
-		SOURCE_GROUP("${srcgrp}" FILES ${headergrpfiles})
-		SOURCE_GROUP("${srcgrp}\\Source" FILES ${srcgrpfiles})
-	ELSE()
-		SOURCE_GROUP("${srcgrp}" FILES ${LocalFixed})
-	ENDIF()
-	
-	SOURCE_GROUP("${srcgrp}\\Shaders" FILES ${LocalShaders})
-	
-	FOREACH(S ${Local})
-		IF(IS_DIRECTORY "${CMAKE_SOURCE_DIR}/${wd}/${S}")
-			IF(${wd} MATCHES "^[^\\/]+")
-				SET(wd "${wd}/${S}")
-			ELSE()
-				SET(wd "${S}")
-			ENDIF()
-
-			LIST(APPEND pwd "${wd}")
-			
-			INCLUDE("${wd}/dir.cmake")
-			DoSource()
-
-			LIST(REMOVE_AT pwd -1)
-			LIST(GET pwd -1 wd)
-		ENDIF()
-	ENDFOREACH()
-ENDMACRO()
-
-MACRO(StartSource src)
-	SET(wd)
-	SET(pwd "/")
-	SET(testid 0)
-	SET(Local ${src})
-	SET(ExcludeDoc)
-	SET(deps)
-	DoSource()
-ENDMACRO()
-
-list(APPEND deps ShaderEmbedder)
-
-MACRO(EmbedShaders out for) #inputs
-	set(listv)
-	
-	foreach(a ${ARGN})
-		list(APPEND listv ${CMAKE_SOURCE_DIR}/${wd}/${a})
-	endforeach()
-	
-	add_custom_command(
-		OUTPUT ${CMAKE_SOURCE_DIR}/${wd}/${out}
-		COMMAND "${CMAKE_SOURCE_DIR}/Tools/ShaderEmbedder/Bin/ShaderEmbedder" ${out} ${ARGN}
-		DEPENDS ShaderEmbedder ${listv}
-		WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}/${wd}"
-		COMMENT "Embedding shaders into ${out}"
-	)
-	
-	list(APPEND Local ${ARGN})
-	list(APPEND Local ${out})
-	
-	get_property(cur SOURCE ${CMAKE_SOURCE_DIR}/${wd}/${for} PROPERTY OBJECT_DEPENDS)
-	set_property(SOURCE ${CMAKE_SOURCE_DIR}/${wd}/${for} APPEND PROPERTY OBJECT_DEPENDS "${cur};${CMAKE_SOURCE_DIR}/${wd}/${out}")
-ENDMACRO()
-
-list(APPEND deps GscriptGenerator)
-
-MACRO(GenerateGscript out) #inputs
-	set(listv)
-	
-	foreach(a ${ARGN})
-		list(APPEND listv ${CMAKE_SOURCE_DIR}/${wd}/${a})
-	endforeach()
-	
-	add_custom_command(
-		OUTPUT ${CMAKE_SOURCE_DIR}/${wd}/${out}
-		COMMAND "${CMAKE_SOURCE_DIR}/Tools/GscriptGenerator/Bin/GscriptGenerator" ${out} ${ARGN}
-		DEPENDS GscriptGenerator ${listv}
-		WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}/${wd}"
-		COMMENT "Creating Gscript files into ${out}"
-	)
-	
-	list(APPEND Local ${ARGN})
-ENDMACRO()
--- a/Tools/ResourceManagementUI/Source/UI/App.cpp	Sun Nov 22 13:00:24 2020 +0200
+++ b/Tools/ResourceManagementUI/Source/UI/App.cpp	Mon Nov 23 01:29:42 2020 +0200
@@ -15,12 +15,13 @@
         window.SetIcon(icon);
         
         
-        Gorgon::NextFrame();
+        //Creates the background for the application and adds it to the window.
         window.Add(backgroundLayer);
         backgroundLayer.Draw(0xff567f9e);
         applicationBG.SetColor(0.22f);
         applicationBG.DrawIn(backgroundLayer);
         
+        //Allows the program to be terminated of the window is closed.
         window.DestroyedEvent.Register([&]() {
             exit(0);
         });
@@ -30,10 +31,10 @@
     
     //construction of UI font, color of text, hover effect, 
     //background color of texts,ect
-    App::initUIfont::initUIfont ( std::string font, int fh ){
+    App::initUIfont::initUIfont ( std::string font, int fs ){
         Gorgon::Graphics::Initialize();
         
-        uiGen.Init(fh, font);
+        uiGen.Init(fs, font);
         uiGen.Activate();
     }
 
--- a/Tools/ResourceManagementUI/Source/UI/App.h	Sun Nov 22 13:00:24 2020 +0200
+++ b/Tools/ResourceManagementUI/Source/UI/App.h	Mon Nov 23 01:29:42 2020 +0200
@@ -62,7 +62,7 @@
         
         //Structure for font of UI
         struct initUIfont{
-            initUIfont(std::string font, int fh);
+            initUIfont(std::string font, int fs);
             
             Gorgon::Widgets::SimpleGenerator uiGen;
         };

mercurial