[Add] window_modifyImage call.
This commit is contained in:
		
							parent
							
								
									9d966458d7
								
							
						
					
					
						commit
						26507a8ebe
					
				| @ -218,6 +218,11 @@ void window_modifyText(const unsigned int wid, char* name, char* newstring) { | |||||||
| 	wgt->dat.txt.text = strdup(newstring); | 	wgt->dat.txt.text = strdup(newstring); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  | void window_modifyImage(const unsigned int wid, char* name, glTexture* image) { | ||||||
|  | 	Widget* wgt = window_getwgt(wid, name); | ||||||
|  | 	wgt->dat.img.image = image; | ||||||
|  | } | ||||||
|  | 
 | ||||||
| // Check if a window exists.
 | // Check if a window exists.
 | ||||||
| int window_exists(const char* wdwname) { | int window_exists(const char* wdwname) { | ||||||
| 	int i; | 	int i; | ||||||
| @ -668,7 +673,10 @@ static void toolkit_renderText(Widget* txt, double bx, double by) { | |||||||
| static void toolkit_renderImage(Widget* img, double bx, double by) { | static void toolkit_renderImage(Widget* img, double bx, double by) { | ||||||
|   glColour* lc, *c, *oc; |   glColour* lc, *c, *oc; | ||||||
|   double x, y; |   double x, y; | ||||||
|   x = bx + img->x; |    | ||||||
|  | 	if(img->dat.img.image == NULL) return; | ||||||
|  | 
 | ||||||
|  | 	x = bx + img->x; | ||||||
|   y = by + img->y; |   y = by + img->y; | ||||||
| 
 | 
 | ||||||
|   lc  = &cGrey90; |   lc  = &cGrey90; | ||||||
|  | |||||||
| @ -21,6 +21,7 @@ void window_addImage(const unsigned int wid, const int x, const int y, | |||||||
| 
 | 
 | ||||||
| // Modification
 | // Modification
 | ||||||
| void window_modifyText(const unsigned int wid, char* name, char* newstring); | void window_modifyText(const unsigned int wid, char* name, char* newstring); | ||||||
|  | void window_modifyImage(const unsigned int wid, char* name, glTexture* image); | ||||||
| 
 | 
 | ||||||
| // Get the window by name.
 | // Get the window by name.
 | ||||||
| int window_exists(const char* wdwname); | int window_exists(const char* wdwname); | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 Allanis
						Allanis