|
SANDAL2
A SDL2 Wrapper in C
|
Contains all structures related to Elements. More...
#include "Clickable.h"#include "Font.h"#include "Window.h"#include "DisplayCode.h"#include "Sprite.h"#include "Action.h"

Go to the source code of this file.
Classes | |
| struct | Entry |
| More informations about entry. More... | |
| struct | PtrElement |
| Structure used to store elements' pointers in a list of element. More... | |
| struct | ListPtrElement |
| List of PtrElement. More... | |
| struct | EventElement |
| Behaviors of an element to events. More... | |
| struct | Element |
| All the informations of an element. More... | |
| struct | ListDCElement |
| List (display code) of list (plan) of element. More... | |
| struct | ListElement |
| List of list (display code) of list (plan) of elements. More... | |
Macros | |
| #define | SANDAL2_FLIP_HOR SDL_FLIP_HORIZONTAL |
| #define | SANDAL2_FLIP_VER SDL_FLIP_VERTICAL |
| #define | SANDAL2_FLIP_NONE SDL_FLIP_NONE |
| #define | SANDAL2_FLIP SDL_RendererFlip |
Typedefs | |
| typedef struct PtrElement | PtrElement |
| typedef struct ListPtrElement | ListPtrElement |
| typedef struct Element | Element |
| typedef struct ListDCElement | ListDCElement |
| typedef struct ListElement | ListElement |
Functions | |
| ListElement * | _initListElement (void) |
| Initialise a list of lists (display code) of lists (plan) of elements. More... | |
| void | _freeListElement (ListElement *l) |
| free the memory of a list of lists (display code) of lists (plan) of elements More... | |
| int | addElement (Element *e) |
| add an element to a list of lists (display code) of lists (plan) of elements More... | |
| void | _cleanElement (void) |
| remove all elements that are marked as deletable (do not use it yourself, used in update) | |
| int | delElement (Element *e) |
| mark an element as removable More... | |
| void | _freeElement (Element *e) |
| Free the memory used by an element. More... | |
| Element * | createBlock (double x, double y, double width, double height, int color[4], int displayCode, int plan) |
| Generate a non rotable rectangle like element. More... | |
| Element * | createText (double x, double y, double width, double height, double textSize, const char *font, const char *text, int textColor[4], int quality, int displayCode, int plan) |
| Generate a text like element. More... | |
| Element * | createImage (double x, double y, double width, double height, const char *image, int displayCode, int plan) |
| Generate an image like element. More... | |
| Element * | createImageBlock (double x, double y, double width, double height, int color[4], int displayCode, int plan) |
| Generate a rotable rectangle like element (slower than createBlock()) More... | |
| Element * | createButton (double x, double y, double width, double height, double texteSize, const char *font, const char *text, int textColor[4], int quality, int colorBlock[4], int displayCode, int plan) |
| Generate a button like element. More... | |
| Element * | createButtonImage (double x, double y, double width, double height, double texteSize, const char *font, const char *text, int textColor[4], int quality, const char *image, int displayCode, int plan) |
| Generate a button like element with an image. More... | |
| Element * | createEntry (double x, double y, double width, double height, double texteSize, const char *font, const char *text, int textColor[4], int quality, int colorBlock[4], int displayCode, int plan, int min, int max, int isScripted) |
| Generate a prompt like element. More... | |
| Element * | createEntryImage (double x, double y, double width, double height, double texteSize, const char *font, const char *text, int textColor[4], int quality, const char *image, int displayCode, int plan, int min, int max, int isScripted) |
| Generate a prompt like element with an image. More... | |
| int | isDisplaiedElement (Element *e) |
| tell whether or not the element can be displaied More... | |
| int | clearDisplayCode (int code) |
| clear all elements of a display code in the current window More... | |
| int | getFlipStateElement (Element *e, SANDAL2_FLIP *flip) |
| get the flip state of an element More... | |
| int | getCoordElement (Element *e, double *x, double *y) |
| getter for the Element's coordinates More... | |
| int | getAngleElement (Element *e, double *a) |
| getter for the Element's angle More... | |
| int | getDimensionElement (Element *e, double *w, double *h) |
| getter for the Element's dimensions More... | |
| int | getRotationPointElement (Element *e, double *x, double *y) |
| getter for the Element's rotation point More... | |
| int | getDataElement (Element *e, void **data) |
| getter for the element's data More... | |
| int | isSelectedElement (Element *e, int *select) |
| tells whether or not the element is selected More... | |
| int | getTextStyleElement (Element *e, int *style) |
| int | getTextElement (Element *e, char **s) |
| get the text of an element More... | |
| int | getColorElement (Element *e, int color[4]) |
| get the element's block color More... | |
| int | getWidthElement (Element *e, double *w) |
| get the element's width More... | |
| int | getHeightElement (Element *e, double *h) |
| get the element's height More... | |
| int | getCoordXElement (Element *e, double *x) |
| get the element's x coordinate More... | |
| int | getCoordYElement (Element *e, double *y) |
| get the element's y coordinate More... | |
| int | getAlphaElement (Element *e, int *alpha) |
| get the element's color alpha value (from 0 for transparent to 255 for fully visible) More... | |
| int | setFontElement (Element *e, const char *font) |
| set the element's font More... | |
| int | setTextElement (Element *e, const char *text) |
| set the element's text More... | |
| int | setTextStyleElement (Element *e, int style) |
| set the element's text font style More... | |
| int | setColorElement (Element *e, int color[4]) |
| set the element's block color More... | |
| int | setTextColorElement (Element *e, int color[4]) |
| set the element's text color More... | |
| int | setTextQualityElement (Element *e, int quality) |
| set the element's text color More... | |
| int | setImageElement (Element *e, const char *image) |
| set the element's image More... | |
| int | setImageSurfaceElement (Element *e, SDL_Surface *image) |
| set the element's image with a 's texture More... | |
| int | replaceElement (Element *e, double x, double y) |
| set the element's coordinates More... | |
| int | moveElement (Element *e, double x, double y) |
| move an element More... | |
| int | setDimensionElement (Element *e, double width, double height) |
| resize an element More... | |
| int | setTextSize (Element *e, double textSize) |
| set the text size of the text of an element in this element More... | |
| int | addDisplayCodeElement (Element *e, int displayCode, int plan) |
| add a display code to an element (if it did not already had it) More... | |
| int | delDisplayCodeElement (Element *e, int displayCode) |
| remove a display code to an element (if it has it) More... | |
| int | setDisplayCodeElement (Element *e, int displayCode, int isDisplaied) |
| set the isDisplaied option of a display code (if the element has it) More... | |
| int | setPlanElement (Element *e, int DisplayCode, int plan) |
| set the plan of a display code (if the element has it) More... | |
| int | clearPlanDisplayCode (int code, int plan) |
| clear all elements of a plan in a display code of the current window More... | |
| int | setActionElement (Element *e, void(*action)(Element *)) |
| set the continuous behaviour of an element More... | |
| int | setKeyPressedElement (Element *e, void(*keyPress)(Element *, SDL_Keycode c)) |
| set the behaviour of an element when a key is pressed More... | |
| int | setKeyReleasedElement (Element *e, void(*keyReleased)(Element *, SDL_Keycode c)) |
| set the behaviour of an element when a key is released More... | |
| int | setOnClickElement (Element *e, void(*onCLick)(Element *, int button)) |
| set the behaviour of an element when it is clicked More... | |
| int | setOnMouseMotionElement (Element *e, void(*onMouseMotion)(Element *)) |
| set the behaviour of an element when the mouse move on it More... | |
| int | setUnMouseMotionElement (Element *e, void(*unMouseMotion)(Element *)) |
| set the behaviour of an element when the mouse move out of it More... | |
| int | setUnClickElement (Element *e, void(*unCLick)(Element *, int button)) |
| set the behaviour of an element when it is unclicked More... | |
| int | setUnSelectElement (Element *e, void(*unSelect)(Element *)) |
| set the behaiour of an element when it is unselect More... | |
| int | setEndSpriteElement (Element *e, void(*endSprite)(Element *, int currentCode)) |
| set the behaviour of an element when it ends a sprite More... | |
| int | setEndActionElement (Element *e, void(*endAction)(Element *)) |
| set the behaviour of an element when its action list ends More... | |
| int | addElementToElement (Element *e, Element *add) |
| add an element to another so that this other can modifie the first one More... | |
| int | delElementToElement (Element *e, Element *del) |
| remove an element to another so that this other can not modifie the first one More... | |
| int | clearElementToElement (Element *e) |
| remove all elements binded to an element More... | |
| int | addClickableElement (Element *e, Clickable *hb, int blocking) |
| add a clickable zone to the element (or a blocking one) More... | |
| int | addAngleElement (Element *e, double a) |
| increase the angle of an element More... | |
| int | rotateElement (Element *e, double a, double prX, double prY) |
| directly rotate the element (more time consuming than adding angle) More... | |
| int | setAngleElement (Element *e, double a) |
| set the angle of an element More... | |
| int | setRotationPointElement (Element *e, double x, double y) |
| set the rotation point's coordinates of an element More... | |
| int | setDataElement (Element *e, void *data) |
| set the element's data More... | |
| int | setFreeDataElement (Element *e, void(*freeData)(void *)) |
| set the element's freeing data's function (by default, set to free) More... | |
| int | freeDataElement (Element *e) |
| free the element's data according to the element's freeing data behavior More... | |
| int | addAnimationElement (Element *e, int code) |
| add an empty animation to the element More... | |
| int | delAnimationElement (Element *e, int code) |
| remove an empty animation from the list More... | |
| int | addSpriteAnimationElement (Element *e, int code, int x, int y, int width, int height, int lifespan, int codeS) |
| add a Sprite to the element More... | |
| int | delSpriteAnimationElement (Element *e, int code, int codeS) |
| remove a Sprite in the element More... | |
| int | setLifeSpanSpriteAnimationElement (Element *e, int code, int codeS, unsigned lifespan) |
| set the lifespan of a sprite More... | |
| int | nextSpriteElement (Element *e) |
| go to te next sprite of the current animation of an element More... | |
| int | previousSpriteElement (Element *e) |
| go to the previous sprite of the current animation of an element More... | |
| int | setWaySpriteAnimationElement (Element *e, int code, int side) |
| set the way to go from a sprite to another (forward (1), backward (-1), no move (0)) More... | |
| int | nextAnimationElement (Element *e) |
| go to te next animation of an element More... | |
| int | previousAnimationElement (Element *e) |
| go to the previous animation of an element More... | |
| int | setAnimationElement (Element *e, int code) |
| set the animation of an element More... | |
| int | setSpriteAnimationElement (Element *e, int codeS) |
| set the sprite in the current animation of an element More... | |
| int | clearWindow (void) |
| remove all elements from the current window More... | |
| int | setFlipStateElement (Element *e, SANDAL2_FLIP flip) |
| set the flip state of an element More... | |
| int | setWidthElement (Element *e, double width) |
| set the element's width More... | |
| int | setHeightElement (Element *e, double height) |
| set the element's height More... | |
| int | setCoordXElement (Element *e, double x) |
| set the element's x coordinate More... | |
| int | setCoordYElement (Element *e, double y) |
| set the element's y coordinate More... | |
| int | setActionListElement (Element *e, ListAction *actions) |
| Define a list of actions to apply to an element. More... | |
| int | setAlphaElement (Element *e, int alpha) |
| set alpha of the element (255: completly visible, 0: completly transparent) More... | |
| long long | addActionToElement (Element *e, ListAction *action) |
| add an action at the end of the element action list More... | |
| int | delActionToElement (Element *e, long long index) |
| remove an action of the element action list More... | |
| int | setParentElement (Element *parent, Element *child) |
| set the parent of an element in the scenary graph More... | |
| int | delParentElement (Element *child) |
| Remove the parent of an element in the scenary graph. More... | |
| int | initIteratorElement (Element *e) |
| initialize the element's iterator on all the elements it can modifie More... | |
| Element * | nextIteratorElement (Element *e) |
| gives the current element's iterator's value and go to the next one More... | |
| int | initIterator (int displayCode) |
| initialise the iterator of all elements having a common display code More... | |
| Element * | nextElement () |
| gives the current iterator's value and go to the next one More... | |
| int | setSizeEntry (Element *e, int size_min, int size_max) |
| change the minimum and maximum size of a prompt (if a value is negative, it is not modified) More... | |
| int | setScriptedEntry (Element *e, int isScripted) |
| set an element to crypted or uncrypted More... | |
| int | addCharEntry (Element *e, char c) |
| add a character to a prompt More... | |
| int | delCharEntry (Element *e) |
| remove a character to a prompt More... | |
Variables | |
| ListWindow * | _windows_SANDAL2 |
| List of windows WARNING : Do not touch this list ... trust me. | |
Contains all structures related to Elements.
| void _freeElement | ( | Element * | e | ) |
Free the memory used by an element.
| e | : element to be freed |
| void _freeListElement | ( | ListElement * | l | ) |
free the memory of a list of lists (display code) of lists (plan) of elements
| l | : list to be freed |
| ListElement* _initListElement | ( | void | ) |
Initialise a list of lists (display code) of lists (plan) of elements.
| long long addActionToElement | ( | Element * | e, |
| ListAction * | action | ||
| ) |
add an action at the end of the element action list
| e | : element to add the action to |
| action | : action to be added, it will be freed if the add succeeded |
| int addAngleElement | ( | Element * | e, |
| double | a | ||
| ) |
increase the angle of an element
| e | : element to be modified |
| a | : angle increment |
| int addAnimationElement | ( | Element * | e, |
| int | code | ||
| ) |
add an empty animation to the element
| e | : element |
| code | : code of the new animation |
| int addCharEntry | ( | Element * | e, |
| char | c | ||
| ) |
add a character to a prompt
| e | : element to be modified |
| c | : character to be added |
add a clickable zone to the element (or a blocking one)
| e | : element to be modified |
| hb | : clickable zone to be add |
| blocking | : tells whether or not the clickable zone is a blocking one |
| int addDisplayCodeElement | ( | Element * | e, |
| int | displayCode, | ||
| int | plan | ||
| ) |
add a display code to an element (if it did not already had it)
| e | : element to be modified |
| displayCode | : new display code |
| plan | : plan linked to the new display code |
| int addElement | ( | Element * | e | ) |
add an element to a list of lists (display code) of lists (plan) of elements
| e | : element to be add |
add an element to another so that this other can modifie the first one
| e | : element to be modified |
| add | : element to be add |
| int addSpriteAnimationElement | ( | Element * | e, |
| int | code, | ||
| int | x, | ||
| int | y, | ||
| int | width, | ||
| int | height, | ||
| int | lifespan, | ||
| int | codeS | ||
| ) |
add a Sprite to the element
| e | : element |
| x | : abscissa coordinate of the top left corner of the sprite in its image |
| y | : ordinate coordinate of the top left corner of the sprite in its image |
| width | : width of the sprite in its image |
| height | : height of the sprite in its image |
| lifespan | : number of time the sprite should be displaied before going to the next sprite |
| codeS | : identifier of the sprite to be added |
| int clearDisplayCode | ( | int | code | ) |
clear all elements of a display code in the current window
| code | : display code to be cleared |
| int clearElementToElement | ( | Element * | e | ) |
remove all elements binded to an element
| e | : element to be modified |
| int clearPlanDisplayCode | ( | int | code, |
| int | plan | ||
| ) |
clear all elements of a plan in a display code of the current window
| code | : display code to be modified |
| plan | : plan to be removed |
| int clearWindow | ( | void | ) |
remove all elements from the current window
| Element* createBlock | ( | double | x, |
| double | y, | ||
| double | width, | ||
| double | height, | ||
| int | color[4], | ||
| int | displayCode, | ||
| int | plan | ||
| ) |
Generate a non rotable rectangle like element.
| x | : abscissa coordinate of its top left corner |
| y | : ordinate coordinate of its top left corner |
| width | : width of the element |
| height | : height of the element |
| color | : color of the rectangle (RGBA) |
| displayCode | : display code of the rectangle |
| plan | : plan of the rectangle |
| Element* createButton | ( | double | x, |
| double | y, | ||
| double | width, | ||
| double | height, | ||
| double | texteSize, | ||
| const char * | font, | ||
| const char * | text, | ||
| int | textColor[4], | ||
| int | quality, | ||
| int | colorBlock[4], | ||
| int | displayCode, | ||
| int | plan | ||
| ) |
Generate a button like element.
| x | : abscissa coordinate of its top left corner |
| y | : ordinate coordinate of its top left corner |
| width | : width of the element |
| height | : height of the element |
| texteSize | : proportion of the text in the rectangle (it is centered) |
| font | : path to load the font to be used by the element |
| text | : text of the element |
| textColor | : color of the text (RGBA) |
| quality | : quality of the text's texture (blended, shaded or solid) |
| colorBlock | : color of the rectangle (RGBA) |
| displayCode | : display code of the button |
| plan | : plan of the button |
| Element* createButtonImage | ( | double | x, |
| double | y, | ||
| double | width, | ||
| double | height, | ||
| double | texteSize, | ||
| const char * | font, | ||
| const char * | text, | ||
| int | textColor[4], | ||
| int | quality, | ||
| const char * | image, | ||
| int | displayCode, | ||
| int | plan | ||
| ) |
Generate a button like element with an image.
| x | : abscissa coordinate of its top left corner |
| y | : ordinate coordinate of its top left corner |
| width | : width of the element |
| height | : height of the element |
| texteSize | : proportion of the text in the rectangle (it is centered) |
| font | : path to load the font to be used by the element |
| text | : text of the element |
| textColor | : color of the text (RGBA) |
| quality | : quality of the text's texture (blended, shaded or solid) |
| image | : path to load the image to be used by the element |
| displayCode | : display code of the button |
| plan | : plan of the button |
| Element* createEntry | ( | double | x, |
| double | y, | ||
| double | width, | ||
| double | height, | ||
| double | texteSize, | ||
| const char * | font, | ||
| const char * | text, | ||
| int | textColor[4], | ||
| int | quality, | ||
| int | colorBlock[4], | ||
| int | displayCode, | ||
| int | plan, | ||
| int | min, | ||
| int | max, | ||
| int | isScripted | ||
| ) |
Generate a prompt like element.
| x | : abscissa coordinate of its top left corner |
| y | : ordinate coordinate of its top left corner |
| width | : width of the element |
| height | : height of the element |
| texteSize | : proportion of the text in the rectangle (it is centered) |
| font | : path to load the font to be used by the element |
| text | : text of the element |
| textColor | : color of the text (RGBA) |
| quality | : quality of the text's texture (blended, shaded or solid) |
| colorBlock | : color of the rectangle (RGBA) |
| displayCode | : display code of the button |
| plan | : plan of the button |
| min | : minimum number of character for the prompt to be validate |
| max | : maximum number of character for the prompt to be validate |
| isScripted | : flag which tells whether or not the prompt is cripted |
| Element* createEntryImage | ( | double | x, |
| double | y, | ||
| double | width, | ||
| double | height, | ||
| double | texteSize, | ||
| const char * | font, | ||
| const char * | text, | ||
| int | textColor[4], | ||
| int | quality, | ||
| const char * | image, | ||
| int | displayCode, | ||
| int | plan, | ||
| int | min, | ||
| int | max, | ||
| int | isScripted | ||
| ) |
Generate a prompt like element with an image.
| x | : abscissa coordinate of its top left corner |
| y | : ordinate coordinate of its top left corner |
| width | : width of the element |
| height | : height of the element |
| texteSize | : proportion of the text in the rectangle (it is centered) |
| font | : path to load the font to be used by the element |
| text | : text of the element |
| textColor | : color of the text (RGBA) |
| quality | : quality of the text's texture (blended, shaded or solid) |
| image | : path to load the image to be used by the element |
| displayCode | : display code of the button |
| plan | : plan of the button |
| min | : minimum number of character for the prompt to be validate |
| max | : maximum number of character for the prompt to be validate |
| isScripted | : flag which tells whether or not the prompt is cripted |
| Element* createImage | ( | double | x, |
| double | y, | ||
| double | width, | ||
| double | height, | ||
| const char * | image, | ||
| int | displayCode, | ||
| int | plan | ||
| ) |
Generate an image like element.
| x | : abscissa coordinate of its top left corner |
| y | : ordinate coordinate of its top left corner |
| width | : width of the element |
| height | : height of the element |
| image | : path to load the image to be used by the element |
| displayCode | : display code of the image |
| plan | : plan of the image |
| Element* createImageBlock | ( | double | x, |
| double | y, | ||
| double | width, | ||
| double | height, | ||
| int | color[4], | ||
| int | displayCode, | ||
| int | plan | ||
| ) |
Generate a rotable rectangle like element (slower than createBlock())
| x | : abscissa coordinate of its top left corner |
| y | : ordinate coordinate of its top left corner |
| width | : width of the element |
| height | : height of the element |
| color | : color of the rectangle (RGBA) |
| displayCode | : display code of the rectangle |
| plan | : plan of the rectangle |
| Element* createText | ( | double | x, |
| double | y, | ||
| double | width, | ||
| double | height, | ||
| double | textSize, | ||
| const char * | font, | ||
| const char * | text, | ||
| int | textColor[4], | ||
| int | quality, | ||
| int | displayCode, | ||
| int | plan | ||
| ) |
Generate a text like element.
| x | : abscissa coordinate of its top left corner |
| y | : ordinate coordinate of its top left corner |
| width | : width of the element |
| height | : height of the element |
| font | : path to load the font to be used by the element |
| text | : text of the element |
| textColor | : color of the text (RGBA) |
| quality | : quality of the text's texture (blended, shaded or solid) |
| displayCode | : display code of the text |
| plan | : plan of the text |
| int delActionToElement | ( | Element * | e, |
| long long | index | ||
| ) |
remove an action of the element action list
| e | : element to be modified |
| index | : index of the action to be removed |
| int delAnimationElement | ( | Element * | e, |
| int | code | ||
| ) |
remove an empty animation from the list
| l | : list of animation |
| code | : code of the animation to be removed |
| int delCharEntry | ( | Element * | e | ) |
remove a character to a prompt
| e | : element to be modified |
| int delDisplayCodeElement | ( | Element * | e, |
| int | displayCode | ||
| ) |
remove a display code to an element (if it has it)
| e | : element to be modified |
| displayCode | : display code to be removed |
| int delElement | ( | Element * | e | ) |
mark an element as removable
| e | : element to be removed |
remove an element to another so that this other can not modifie the first one
| e | : element to be modified |
| del | : element to be removed |
| int delParentElement | ( | Element * | child | ) |
Remove the parent of an element in the scenary graph.
| child | element to remove the parent from |
| int delSpriteAnimationElement | ( | Element * | e, |
| int | code, | ||
| int | codeS | ||
| ) |
remove a Sprite in the element
| e | : element |
| codeS | : code of the sprite to be removed |
| int freeDataElement | ( | Element * | e | ) |
free the element's data according to the element's freeing data behavior
| e | : element to be modified |
| int getAlphaElement | ( | Element * | e, |
| int * | alpha | ||
| ) |
get the element's color alpha value (from 0 for transparent to 255 for fully visible)
| e | : element to get the informations from |
| alpha | : where to store the alpha value |
| int getAngleElement | ( | Element * | e, |
| double * | a | ||
| ) |
getter for the Element's angle
| e | : element to get the angle |
| a | : where the angle will be store |
| int getColorElement | ( | Element * | e, |
| int | color[4] | ||
| ) |
get the element's block color
| e | : element to get the informations from |
| color | : where to store the block color |
| int getCoordElement | ( | Element * | e, |
| double * | x, | ||
| double * | y | ||
| ) |
getter for the Element's coordinates
| e | : element to get the coordinates |
| x | : where the abscissa coordinate will be store |
| y | : where the ordinate coordinate will be store |
| int getCoordXElement | ( | Element * | e, |
| double * | x | ||
| ) |
get the element's x coordinate
| e | : element to get the informations from |
| x | : where to store the x coordinate |
| int getCoordYElement | ( | Element * | e, |
| double * | y | ||
| ) |
get the element's y coordinate
| e | : element to get the informations from |
| y | : where to store the y coordinate |
| int getDataElement | ( | Element * | e, |
| void ** | data | ||
| ) |
getter for the element's data
| e | : element to get its data |
| data | : where to store the element's data |
| int getDimensionElement | ( | Element * | e, |
| double * | w, | ||
| double * | h | ||
| ) |
getter for the Element's dimensions
| e | : element to get the dimensions |
| w | : where the width will be store |
| h | : where the height will be store |
| int getFlipStateElement | ( | Element * | e, |
| SANDAL2_FLIP * | flip | ||
| ) |
get the flip state of an element
| e | : element to get the flip state |
| flip | : where to store the flip state |
| int getHeightElement | ( | Element * | e, |
| double * | h | ||
| ) |
get the element's height
| e | : element to get the informations from |
| h | : where to store the height |
| int getRotationPointElement | ( | Element * | e, |
| double * | x, | ||
| double * | y | ||
| ) |
getter for the Element's rotation point
| e | : element to get the rotation point's coordinate |
| x | : where the abscissa coordinate of the rotation point will be store |
| y | : where the ordinate coordinate of the rotation point will be store |
| int getTextElement | ( | Element * | e, |
| char ** | s | ||
| ) |
get the text of an element
| e | : the element to get the text from |
| s | : where to store the text |
| int getTextStyleElement | ( | Element * | e, |
| int * | style | ||
| ) |
get the element's text font style
| e | : the element to get the font style |
| style | : where to store the style |
| int getWidthElement | ( | Element * | e, |
| double * | w | ||
| ) |
get the element's width
| e | : element to get the informations from |
| w | : where to store the width |
| int initIterator | ( | int | displayCode | ) |
initialise the iterator of all elements having a common display code
| displayCode | : common display code of the elements |
| int initIteratorElement | ( | Element * | e | ) |
initialize the element's iterator on all the elements it can modifie
| e | : element from which to initialise the iterator |
| int isDisplaiedElement | ( | Element * | e | ) |
tell whether or not the element can be displaied
| e | : element |
| int isSelectedElement | ( | Element * | e, |
| int * | select | ||
| ) |
tells whether or not the element is selected
| e | : element to get the information from |
| select | : where to store the information |
| int moveElement | ( | Element * | e, |
| double | x, | ||
| double | y | ||
| ) |
move an element
| e | : element to be modified |
| x | : abscissa increment |
| y | : ordinate increment |
| int nextAnimationElement | ( | Element * | e | ) |
go to te next animation of an element
| e | : element |
| Element* nextElement | ( | ) |
gives the current iterator's value and go to the next one
gives the current element's iterator's value and go to the next one
| e | : element to be modified |
| int nextSpriteElement | ( | Element * | e | ) |
go to te next sprite of the current animation of an element
| e | : element |
| int previousAnimationElement | ( | Element * | e | ) |
go to the previous animation of an element
| e | : element |
| int previousSpriteElement | ( | Element * | e | ) |
go to the previous sprite of the current animation of an element
| e | : element |
| int replaceElement | ( | Element * | e, |
| double | x, | ||
| double | y | ||
| ) |
set the element's coordinates
| e | : element to be modified |
| x | : new abscissa coordinate |
| y | : new ordinate coordinate |
| int rotateElement | ( | Element * | e, |
| double | a, | ||
| double | prX, | ||
| double | prY | ||
| ) |
directly rotate the element (more time consuming than adding angle)
| e | : element to rotate around a rotation point |
| a | : angle of the rotation |
| prX | : x coordinate of the rotation point |
| prY | : y coordinate of the rotation point |
set the continuous behaviour of an element
| e | : element to be modified |
| action | : function to be called on each update call |
| int setActionListElement | ( | Element * | e, |
| ListAction * | actions | ||
| ) |
Define a list of actions to apply to an element.
| e | : element to be modified |
| actions | : list of actions to set on the element (do not free it yourself) |
| int setAlphaElement | ( | Element * | e, |
| int | alpha | ||
| ) |
set alpha of the element (255: completly visible, 0: completly transparent)
| e | : element to modify |
| alpha | : new alpha value of the element |
| int setAngleElement | ( | Element * | e, |
| double | a | ||
| ) |
set the angle of an element
| e | : element to be modified |
| a | : new angle of the element |
| int setAnimationElement | ( | Element * | e, |
| int | code | ||
| ) |
set the animation of an element
| e | : element to be modified |
| code | : code of the animation to set |
| int setColorElement | ( | Element * | e, |
| int | color[4] | ||
| ) |
set the element's block color
| e | : element to be modified |
| color | : new block color |
| int setCoordXElement | ( | Element * | e, |
| double | x | ||
| ) |
set the element's x coordinate
| e | : element to be modified |
| x | : new x coordinate |
| int setCoordYElement | ( | Element * | e, |
| double | y | ||
| ) |
set the element's y coordinate
| e | : element to be modified |
| y | : new y coordinate |
| int setDataElement | ( | Element * | e, |
| void * | data | ||
| ) |
set the element's data
| e | : element to be modified |
| data | : new data of the element |
| int setDimensionElement | ( | Element * | e, |
| double | width, | ||
| double | height | ||
| ) |
resize an element
| e | : element to be modified |
| width | : new width |
| height | : new height |
| int setDisplayCodeElement | ( | Element * | e, |
| int | displayCode, | ||
| int | isDisplaied | ||
| ) |
set the isDisplaied option of a display code (if the element has it)
| e | : element to be modified |
| displayCode | : display code to be modified |
| isDisplaied | : new isDisplaied option |
set the behaviour of an element when its action list ends
| e | : element to be modified |
| unSelect | : new behaviour |
set the behaviour of an element when it ends a sprite
| e | : element to be modified |
| endSprite | : new behaviour |
| int setFlipStateElement | ( | Element * | e, |
| SANDAL2_FLIP | flip | ||
| ) |
set the flip state of an element
| e | : element to be modified |
| flip | : new flip state of the element |
| int setFontElement | ( | Element * | e, |
| const char * | font | ||
| ) |
set the element's font
| e | : element to be modified |
| font | : path of the new font |
| int setFreeDataElement | ( | Element * | e, |
| void(*)(void *) | freeData | ||
| ) |
set the element's freeing data's function (by default, set to free)
| e | : element to be modified |
| freeData | : new data freeing behavior |
| int setHeightElement | ( | Element * | e, |
| double | height | ||
| ) |
set the element's height
| e | : element to be modified |
| height | : new height |
| int setImageElement | ( | Element * | e, |
| const char * | image | ||
| ) |
set the element's image
| e | : element to be modified |
| image | : path of the new image |
| int setImageSurfaceElement | ( | Element * | e, |
| SDL_Surface * | image | ||
| ) |
set the element's image with a 's texture
| e | : element to be modified |
| image | : surface of the new image |
set the behaviour of an element when a key is pressed
| e | : element to be modified |
| keyPress | : function to be called when a key is pressed |
set the behaviour of an element when a key is released
| e | : element to be modified |
| keyReleased | : function to be called when a key is released |
| int setLifeSpanSpriteAnimationElement | ( | Element * | e, |
| int | code, | ||
| int | codeS, | ||
| unsigned | lifespan | ||
| ) |
set the lifespan of a sprite
| e | : element |
| codeS | : code of the sprite to be changed |
| lifespan | : new number of time the sprite should be displaied before going to the next sprite |
set the behaviour of an element when it is clicked
| e | : element to be modified |
| onCLick | : function to be called when it is clicked |
set the behaviour of an element when the mouse move on it
| e | : element to be modified |
| onMouseMotion | : function to be called when the mouse move on it |
set the parent of an element in the scenary graph
| parent | parent to add a child to |
| child | child to be added to the parent |
| int setPlanElement | ( | Element * | e, |
| int | DisplayCode, | ||
| int | plan | ||
| ) |
set the plan of a display code (if the element has it)
| e | : element to be modified |
| displayCode | : display code to be modified |
| plan | : new plan linked to the display code |
| int setRotationPointElement | ( | Element * | e, |
| double | x, | ||
| double | y | ||
| ) |
set the rotation point's coordinates of an element
| e | : element to be modified |
| x | : new abscissa coordinate of the rotation point |
| y | : new ordinate coordinate of the rotation point |
| int setScriptedEntry | ( | Element * | e, |
| int | isScripted | ||
| ) |
set an element to crypted or uncrypted
| e | : element to be modified |
| isScripted | : crypted option |
| int setSizeEntry | ( | Element * | e, |
| int | size_min, | ||
| int | size_max | ||
| ) |
change the minimum and maximum size of a prompt (if a value is negative, it is not modified)
| e | : element to be modified |
| size_min | : new minimum size of the prompt |
| size_max | : new maximum size of the prompt |
| int setSpriteAnimationElement | ( | Element * | e, |
| int | codeS | ||
| ) |
set the sprite in the current animation of an element
| e | : element to be modified |
| codeS | : code of the sprite to set |
| int setTextColorElement | ( | Element * | e, |
| int | color[4] | ||
| ) |
set the element's text color
| e | : element to be modified |
| color | : new text color |
| int setTextElement | ( | Element * | e, |
| const char * | text | ||
| ) |
set the element's text
| e | : element to be modified |
| text | : the new text |
| int setTextQualityElement | ( | Element * | e, |
| int | quality | ||
| ) |
set the element's text color
| e | : element to be modified |
| quality | : new text quality |
| int setTextSize | ( | Element * | e, |
| double | textSize | ||
| ) |
set the text size of the text of an element in this element
| e | : element to be modified |
| textSize | : new size of the text (in percent) |
| int setTextStyleElement | ( | Element * | e, |
| int | style | ||
| ) |
set the element's text font style
| e | : the element to be modified |
| style | : the style to apply |
set the behaviour of an element when it is unclicked
| e | : element to be modified |
| unCLick | : function to be called when it is unclicked |
set the behaviour of an element when the mouse move out of it
| e | : element to be modified |
| unMouseMotion | : function to be called when the mouse move out it |
set the behaiour of an element when it is unselect
| e | : element to be modified |
| unSelect | : new behaviour |
| int setWaySpriteAnimationElement | ( | Element * | e, |
| int | code, | ||
| int | side | ||
| ) |
set the way to go from a sprite to another (forward (1), backward (-1), no move (0))
| e | : element |
| side | : new way |
| int setWidthElement | ( | Element * | e, |
| double | width | ||
| ) |
set the element's width
| e | : element to be modified |
| width | : new width |
1.8.13