Creation/Dev/Script/Client/GuiShowImgCtrl: Difference between revisions

From Graal Bible
mNo edit summary
 
No edit summary
 
(10 intermediate revisions by 4 users not shown)
Line 1: Line 1:
[[Category:Scripting Reference]]
Inherits [[Creation/Dev/Script/Client/GuiControl|GuiControl]].
=Description=
[[Image:Guicontrol_showimg.png]]
This is basicly a wrapper around [[Creation/Dev/Script/Client/TShowImg|TShowImg]] for displaying all kind of Graal content inside the GUI, including animations (ganis) and particle effects.
''Note'': like with normal GUI controls the content of this control might be clipped at the control border, so use width and height to resize the control, and offsetx and offsety to shift the content so that animations or particles are not drawn half.
=Variables=
All variables from [[Creation/Dev/Script/Client/TShowImg|TShowImg]] are available for this control as well.
Additional variables:
{| border="1" cellpadding="2" width="100%"
| '''Name'''
| '''Type'''
| '''Description'''
|-
| offsetx
| integer
| display offset for 'showimg' inside the control
|-
| offsety
| integer
| display offset for 'showimg' inside the control
|-
| showimg
| object
| the actual [[Creation/Dev/Script/Client/TShowImg|TShowImg]] object which contains all the logic
|}
=Example=
<pre>
<pre>
    GuiShowImgCtrl (GuiControl):
new GuiShowImgCtrl("Test_ShowImg") {
      alpha - float
  x = 10;
      ani - string
  y = 10;
      ani - string
  width = 60;
      attachoffset - string
  height = 60;
      attachtoowner - boolean
  ani = "walk";
      blue - float
}
      code - string - the old representation as 'font@style@text'
      dimension - integer
      dir - integer
      dir - integer
      emitter - object (read only)
      eulerrotation - string
      font - string
      green - float
      image - string
      imageindex - integer (read only)
      layer - integer
      layer - integer
      mode - integer - the image drawing mode (0 - add, 1 - transparent, 2 - subtract)
      offsetx - integer
      offsety - integer
      playerlook - boolean - if the animation should take it's head, body, sword, shield and attr[] from the owner (playerlook), set this to false if you want to set the images yourself by changing showimg.actor.head etc.
      polygon - object
      red - float
      rotation - float
      shape - string
      stretchx - float
      stretchy - float
      style - string
      text - string
      x - float
      y - float
      zoom - float
</pre>
</pre>

Latest revision as of 23:55, 15 February 2010

Inherits GuiControl.

Description

Guicontrol showimg.png

This is basicly a wrapper around TShowImg for displaying all kind of Graal content inside the GUI, including animations (ganis) and particle effects.

Note: like with normal GUI controls the content of this control might be clipped at the control border, so use width and height to resize the control, and offsetx and offsety to shift the content so that animations or particles are not drawn half.

Variables

All variables from TShowImg are available for this control as well. Additional variables:

Name Type Description
offsetx integer display offset for 'showimg' inside the control
offsety integer display offset for 'showimg' inside the control
showimg object the actual TShowImg object which contains all the logic


Example

new GuiShowImgCtrl("Test_ShowImg") {
  x = 10;
  y = 10;
  width = 60;
  height = 60;
  ani = "walk";
}