[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); 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,6 +673,9 @@ 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;
if(img->dat.img.image == NULL) return;
x = bx + img->x; x = bx + img->x;
y = by + img->y; y = by + img->y;

View File

@ -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);