static void Draw(void *p) { AG_Textbox *tb = p; STYLE(tb)->TextboxBackground(tb, tb->r, (tb->flags & AG_TEXTBOX_COMBO)); if (tb->lbl != NULL) AG_WidgetDraw(tb->lbl); AG_PushClipRect(tb, tb->r); if (tb->flags & AG_TEXTBOX_MULTILINE) { int d; if (tb->vBar != NULL && AG_ScrollbarVisible(tb->vBar)) { d = WIDTH(tb->vBar); AG_DrawBox(tb, AG_RECT(WIDTH(tb)-d, HEIGHT(tb)-d, d, d), -1, agColors[TEXTBOX_COLOR]); } else if (tb->hBar != NULL && AG_ScrollbarVisible(tb->hBar)) { d = HEIGHT(tb->hBar); AG_DrawBox(tb, AG_RECT(WIDTH(tb)-d, HEIGHT(tb)-d, d, d), -1, agColors[TEXTBOX_COLOR]); } AG_WidgetUpdate(tb); } /* Render the Editable widget, inheriting our Font. */ tb->ed->font = tb->font; AG_WidgetDraw(tb->ed); if (tb->hBar != NULL) AG_WidgetDraw(tb->hBar); if (tb->vBar != NULL) AG_WidgetDraw(tb->vBar); AG_PopClipRect(tb); }
void ResizeStatus(AG_Widget *parent, int w, int h, int h2) { int i; int pos = 0; float ww = (float)w; int hh; if(parent == NULL) return; hh = (int)((float)h / 400.0f * (float)STAT_HEIGHT); if(h < 400) hh += 5.0f; // WORKAROUNDS nFontSize = (int)((float)STAT_PT * ww / 800.0f); w = w - 5; AG_WidgetSetSize(parent, w, hh); ResizeStatOSD(parent, w, hh); ResizeVFD(parent, w, hh); ResizeTapeOSD(parent, w, hh); ResizeLeds(parent, w, hh); DrawStatusForce(); AG_WidgetUpdate(parent); }