summaryrefslogtreecommitdiff
path: root/src/gui/gui.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/gui.cpp')
-rw-r--r--src/gui/gui.cpp140
1 files changed, 0 insertions, 140 deletions
diff --git a/src/gui/gui.cpp b/src/gui/gui.cpp
index 714f114f..0c052fec 100644
--- a/src/gui/gui.cpp
+++ b/src/gui/gui.cpp
@@ -727,146 +727,6 @@ int tmw_radio_proc(int msg, DIALOG *d, int c) {
return D_O_K;
}
-int tmw_edit_proc(int msg, DIALOG *d, int c) {
- int x;
- int tx, ty, l;
- int rtm = 0;
- int col = 0;
- char* start;
- char* text;
- char hack;
- int cl, cr, cb, ct;
- int lb, rb;
-
-
- if (msg == MSG_DRAW) {
- rectfill(gui_bitmap, d->x, d->y, d->x + d->w, d->y+d->h, d->bg);
- draw_skinned_rect(gui_bitmap, &gui_skin.textbox.bg, d->x, d->y, d->w, d->h);
-
- if (d->flags & D_DISABLED) {
- col = gui_skin.textbox.textcolor[1];
- } else {
- col = gui_skin.textbox.textcolor[0];
- }
-
- lb = gui_skin.textbox.bg.grid[0]->w;
- rb = gui_skin.textbox.bg.grid[2]->w;
- tx = d->x + lb;
- ty = d->y + (d->h - text_height(font))/2;
-
-
- text = (char *)d->dp;
- start = text;
-
- if (gui_bitmap->clip) {
- cl = gui_bitmap->cl;
- ct = gui_bitmap->ct;
- cr = gui_bitmap->cr;
- cb = gui_bitmap->cb;
- } else {
- cl=ct=0;
- cr=gui_bitmap->w;
- cb=gui_bitmap->h;
- }
- set_clip_rect(gui_bitmap, tx, ty, d->x+d->w-rb, ty + text_height(font));
- hack = text[d->d2];
- text[d->d2] = '\0';
- l = text_length(font, text);
- text[d->d2] = hack;
-
- if (l > d->w-lb-rb) {
- tx += ((d->w-lb-rb) - l);
- }
- gui_text(gui_bitmap, start, tx, ty, col, 0);
-
-
- if (d->flags & D_GOTFOCUS) {
- hack = text[d->d2];
- text[d->d2] = '\0';
- x = tx + text_length(font, text);
- vline(gui_bitmap, x, ty, ty + text_height(font), col);
- text[d->d2] = hack;
- }
- set_clip_rect(gui_bitmap, cl, ct, cr, cb);
- } else {
- return d_edit_proc(msg, d, c);
- }
- return D_O_K;
-}
-
-int tmw_password_proc(int msg, DIALOG *d, int c) {
-// BITMAP *box = NULL;
- int x;
- int tx, ty, l;
- int rtm = 0;
- int col = 0;
- char* start;
- char* text;
- char hack;
- int cl, cr, cb, ct;
- int lb, rb;
-
-
- if (msg == MSG_DRAW) {
- rectfill(gui_bitmap, d->x, d->y, d->x + d->w, d->y+d->h, d->bg);
- draw_skinned_rect(gui_bitmap, &gui_skin.textbox.bg, d->x, d->y, d->w, d->h);
-
- if (d->flags & D_DISABLED) {
- col = gui_skin.textbox.textcolor[1];
- } else {
- col = gui_skin.textbox.textcolor[0];
- }
-
- lb = gui_skin.textbox.bg.grid[0]->w;
- rb = gui_skin.textbox.bg.grid[2]->w;
- tx = d->x + lb;
- ty = d->y + (d->h - text_height(font))/2;
-
-
- text = (char *)malloc(strlen((char *)d->dp)+1);
- // Sull: new ansi standard
- unsigned int i;
- for(i=0;i<strlen((char *)d->dp);i++)text[i] = '*';
- text[i] = '\0';
- start = text;
-
- if (gui_bitmap->clip) {
- cl = gui_bitmap->cl;
- ct = gui_bitmap->ct;
- cr = gui_bitmap->cr;
- cb = gui_bitmap->cb;
- } else {
- cl=ct=0;
- cr=gui_bitmap->w;
- cb=gui_bitmap->h;
- }
- set_clip_rect(gui_bitmap, tx, ty, d->x+d->w-rb, ty + text_height(font));
-
- hack = text[d->d2];
- text[d->d2] = '\0';
- l = text_length(font, text);
- text[d->d2] = hack;
-
- if (l > d->w-lb-rb) {
- tx += ((d->w-lb-rb) - l);
- }
- gui_text(gui_bitmap, start, tx, ty, col, 0);
-
-
- if (d->flags & D_GOTFOCUS) {
- hack = text[d->d2];
- text[d->d2] = '\0';
- x = tx + text_length(font, text);
- vline(gui_bitmap, x, ty, ty + text_height(font), col);
- text[d->d2] = hack;
- }
-
- set_clip_rect(gui_bitmap, cl, ct, cr, cb);
- } else {
- return d_edit_proc(msg, d, c);
- }
- return D_O_K;
-}
int tmw_list_proc(int msg, DIALOG *d, int c) {
static int ignoreRedraw = FALSE;