Subversion Repositories freemyipod

Rev

Rev 703 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 703 Rev 820
Line 156... Line 156...
156
        }
156
        }
157
        iparams = (const struct chooser_renderer_iconflow_itemdata*)(item->renderparams);
157
        iparams = (const struct chooser_renderer_iconflow_itemdata*)(item->renderparams);
158
        const struct libui_surface* icon;
158
        const struct libui_surface* icon;
159
        if (item == selected) icon = &iparams->icon_selected;
159
        if (item == selected) icon = &iparams->icon_selected;
160
        else icon = &iparams->icon;
160
        else icon = &iparams->icon;
161
        int ix, iy, io;
161
        int ix, iy, io, tx = 0, ty = 0;
162
        int dist = pos - vpos;
162
        int dist = pos - vpos;
163
        chooser_renderer_iconflow_geticondata(x, y, w, h, spi * iiv, dist, icon, &ix, &iy, &io);
163
        chooser_renderer_iconflow_geticondata(x, y, w, h, spi * iiv, dist, icon, &ix, &iy, &io);
164
        if (item == selected)
164
        if (item == selected)
165
        {
165
        {
166
            io = 255;
166
            io = 255;
167
            if (iparams->text && iparams->text_color)
167
            if (iparams->text && iparams->text_color)
-
 
168
            {
168
                rendertext(buf, params->text_pos.x - strlen(iparams->text) * get_font_width() / 2,
169
                tx = params->text_pos.x - strlen(iparams->text) * get_font_width() / 2;
-
 
170
                ty = params->text_pos.y;
169
                           params->text_pos.y, stride, iparams->text_color, 0, iparams->text);
171
                rendertext(buf, tx, ty, stride, iparams->text_color, 0, iparams->text);
-
 
172
           }
170
        }
173
        }
171
        if (icon->loc.buf.addr && io && ix >= x && iy >= y
174
        if (icon->loc.buf.addr && io && ix >= x && iy >= y
172
         && ix + icon->size.x <= x + w && iy + icon->size.y <= y + h)
175
         && ix + icon->size.x <= x + w && iy + icon->size.y <= y + h)
173
            blenda(icon->size.x, icon->size.y, io, buf, ix, iy, stride, buf, ix, iy, stride,
176
            blenda(icon->size.x, icon->size.y, io, buf, ix, iy, stride, buf, ix, iy, stride,
174
                   icon->loc.buf.addr, icon->loc.pos.x, icon->loc.pos.y, icon->loc.buf.stride);
177
                   icon->loc.buf.addr, icon->loc.pos.x, icon->loc.pos.y, icon->loc.buf.stride);
-
 
178
        if (iparams->render) iparams->render(data, item, item == selected, ix, iy, io, tx, ty);
175
        if (item == selected) break;
179
        if (item == selected) break;
176
        item += dir;
180
        item += dir;
177
        pos += dir * spi;
181
        pos += dir * spi;
178
    }
182
    }
179
    if (params->preblit && params->preblit(data)) return rc;
183
    if (params->preblit && params->preblit(data)) return rc;