[Add] window_modifyImage call.

This commit is contained in:
Allanis 2013-02-28 22:49:53 +00:00
parent 9d966458d7
commit 26507a8ebe
2 changed files with 10 additions and 1 deletions

View File

@ -218,6 +218,11 @@ void window_modifyText(const unsigned int wid, char* name, char* 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.
int window_exists(const char* wdwname) {
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) {
glColour* lc, *c, *oc;
double x, y;
x = bx + img->x;
if(img->dat.img.image == NULL) return;
x = bx + img->x;
y = by + img->y;
lc = &cGrey90;

View File

@ -21,6 +21,7 @@ void window_addImage(const unsigned int wid, const int x, const int y,
// Modification
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.
int window_exists(const char* wdwname);