User Tools

Site Tools


hpl3:game:gui

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
hpl3:game:gui [2013/11/04 09:53]
thomas [Assets]
hpl3:game:gui [2013/11/04 09:57]
thomas [Assets]
Line 137: Line 137:
 cImGuiGfx flowerGfx("​flower.tga",​ eGuiMaterial_Additive,​ eImGuiGfx_ImageAnimated);​ cImGuiGfx flowerGfx("​flower.tga",​ eGuiMaterial_Additive,​ eImGuiGfx_ImageAnimated);​
 </​code>​ </​code>​
-When loading an animation, an extension is required and the engine will load all the files named like "​flower00.tga",​ "​flower01.tga",​ etc for as long as it can find file names. These images will then be looped around in an animation loop. In order to control ​the animation speed by setting the member variable ''​mfAnimationTime''​ like this:+When loading an animation, an extension is required and the engine will load all the files named like "​flower00.tga",​ "​flower01.tga",​ etc for as long as it can find file names. These images will then be looped around in an animation loop. Control ​the animation speed by setting the member variable ''​mfAnimationTime''​ like this:
 <code c++> <code c++>
 cImGuiGfx flowerGfx("​flower.tga",​ eImGuiGfx_ImageAnimated);​ cImGuiGfx flowerGfx("​flower.tga",​ eImGuiGfx_ImageAnimated);​
Line 143: Line 143:
 </​code>​ </​code>​
 This will make each frame play for 0.1 seconds. (default setting is 1). This will make each frame play for 0.1 seconds. (default setting is 1).
-==== Note on Graphics ==== 
  
 +**Note on Graphics**
   * The size limit is 510x510. (1 pixel borders need for images).   * The size limit is 510x510. (1 pixel borders need for images).
-  * You should NOT use the normal graphics for larger images though as it is in effective. It is meant to be for smaller images so that you can batch the graphics (eg draw must of the gui in 2-3 draw calls). ​Instead ​use textures. ​And with textures, the sky is the limit!+  * You should NOT use the normal graphics for larger images though as it is in effective. It is meant to be for smaller images so that you can batch the graphics (making it possible to draw most of the gui in 2-3 draw calls). ​If you need large images, ​use textures! Here you can easily go up to 1024x1024 (and beyond, should it be needed).
 ===== Custom Widgets ===== ===== Custom Widgets =====
  
hpl3/game/gui.txt ยท Last modified: 2015/09/17 10:14 by ian.thomas