Browse Source

Update samples readme and comments

Michael Ragazzon 6 years ago
parent
commit
48cc2cbf58
2 changed files with 44 additions and 47 deletions
  1. 42 46
      Samples/README.TXT
  2. 2 1
      Source/Core/DecoratorTiledInstancer.cpp

+ 42 - 46
Samples/README.TXT

@@ -1,52 +1,48 @@
-=====================================================================
+=================================================================================
  RmlUi Sample Applications
-=====================================================================
+=================================================================================
 
-This directory contains a collection of sample applications
-that demonstrate the use of RmlUi in small, easy
-to understand applications.
+This directory contains a collection of sample applications that demonstrate the 
+use of RmlUi in small, easy to understand applications.
 
-To build the samples, you can either use Microsoft Visual Studio
-(using the project files found within each directory), or use SCons
-(SConstruct files are present in directories except those for
-Windows-specific samples).
-
-If you build with Visual Studio, make sure the actual sample is the
-'startup project' (displayed in bold) rather than the sample shell
-project.
-
-If you build with SCons, be sure to compile the sample shell (found
-in /samples/shell/) before you compile other samples. All the
-SConstructs will build a debug build by default; to build a release
-version, run 'scons release'.
+Follow the documentation in order to build the samples:
+https://mikke89.github.io/RmlUiDoc/pages/cpp_manual/building_with_cmake.html
 
 Directory Overview:
 
- * assets     - This directory contains the assets shared by
-                all the sample applications.
- * basic      - This directory contains basic applications
-                that demonstrate initialisation, shutdown and
-                installing custom interfaces.
-
-                  * customlog    - setting up custom logging
-                  * directx10    - using DirectX 10 as a renderer
-                  * drag         - dragging elements between containers
-                  * loaddocument - loading your first document
-                  * treeview     - using a nested DataSource
-
- * invaders   - A full implementation of the 1970s classic
-                Space Invaders using the RmlUi interface.
-
- * luainvaders- Lua version of the invaders (only installed
-                with the Lua plugin).
-
- * shell      - Common platform specific code used by all the 
-                samples for open windows, processing input and 
-                access files.
-                Supports Windows, MacOSX and Linux
-
- * tutorial   - Tutorial code that should be used in conjunction
-                with the tutorials on the RmlUi website.
-                https://mikke89.github.io/RmlUiDoc/
-
-=====================================================================
+ * assets      - This directory contains the assets shared by
+                 all the sample applications.
+ * basic       - This directory contains basic applications
+                 that demonstrate initialisation, usage, shutdown 
+                 and installation of custom interfaces.
+               
+                 * animation    - animations and transitions
+                 * benchmark    - a benchmark to measure performance
+                 * bitmapfont   - using a custom font engine
+                 * customlog    - setting up custom logging
+                 * demo         - demonstrates a variety of features in RmlUi and
+                                  includes a sandbox for playing with RML/RCSS
+                 * directx10    - using DirectX 10 as a renderer (deprecated)
+                 * drag         - dragging elements between containers
+                 * loaddocument - loading your first document
+                 * sdl2         - integrating with SDL2
+                 * sfml2        - integrating with SFML2
+                 * transform    - demonstration of transforms
+                 * treeview     - using a nested DataSource
+               
+ * invaders    - A full implementation of the 1970s classic
+                 Space Invaders using the RmlUi interface.
+               
+ * luainvaders - Lua version of the invaders sample. Only installed
+                 with the Lua plugin.
+               
+ * shell       - Common platform specific code used by all the 
+                 samples for open windows, processing input and 
+                 access files.
+                 Supports Windows, MacOS and Linux
+               
+ * tutorial    - Tutorial code that should be used in conjunction
+                 with the tutorials on the RmlUi website.
+                 https://mikke89.github.io/RmlUiDoc/
+
+=================================================================================

+ 2 - 1
Source/Core/DecoratorTiledInstancer.cpp

@@ -109,7 +109,7 @@ bool DecoratorTiledInstancer::GetTileProperties(DecoratorTiled::Tile* tiles, Tex
 		DecoratorTiled::Tile& tile = tiles[i];
 		Texture& texture = textures[i];
 
-		// A tile is always either a sprite or a texture with position and dimensions specified.
+		// A tile is always either a sprite or an image.
 		if (const Sprite * sprite = interface.GetSprite(texture_name))
 		{
 			tile.position.x = sprite->rectangle.x;
@@ -121,6 +121,7 @@ bool DecoratorTiledInstancer::GetTileProperties(DecoratorTiled::Tile* tiles, Tex
 		}
 		else
 		{
+			// No sprite found, we assume then that the name is an image source.
 			// Since the common use case is to specify the same texture for all tiles, we
 			// check the previous texture first before fetching from the global database.
 			if (texture_name == previous_texture_name)