summaryrefslogtreecommitdiff
path: root/misc_gui.c
diff options
context:
space:
mode:
authorDarkvater <darkvater@openttd.org>2006-12-07 00:51:20 +0000
committerDarkvater <darkvater@openttd.org>2006-12-07 00:51:20 +0000
commita518ecbabb65c86b43b7aa4adf968ea3ee68e8a2 (patch)
tree6e7008b954ce4626822fcb96dad9f6467e534b51 /misc_gui.c
parentcf385cccf3585299391aa73fad4f49a79bc88f55 (diff)
downloadopenttd-a518ecbabb65c86b43b7aa4adf968ea3ee68e8a2.tar.xz
(svn r7410) -Codechange/Fix: Remove useless and unfollowable programmatic-resize, and implement it
in a sane way. Correctly specify resize flags for windows and only manually change the widgets that the resize system cannot handle (eg centering). This changes r6562, and probably some other commits
Diffstat (limited to 'misc_gui.c')
-rw-r--r--misc_gui.c20
1 files changed, 0 insertions, 20 deletions
diff --git a/misc_gui.c b/misc_gui.c
index 1e06a95d8..82a6bf944 100644
--- a/misc_gui.c
+++ b/misc_gui.c
@@ -30,7 +30,6 @@
#include "tgp.h"
#include "settings.h"
#include "date.h"
-#include "resize_window_widgets.h"
#include "fios.h"
/* Variables to display file lists */
@@ -1858,22 +1857,3 @@ void ShowCheatWindow(void)
DeleteWindowById(WC_CHEATS, 0);
AllocateWindowDesc(&_cheats_desc);
}
-
-/** Resize the widgets in a window
- * @param *w Window to resize in
- * @param *resizearray Bytearray of the same length as the window contains widgets. Each byte tells how to move the widget of the same index using the flags in resize_window_widgets.h
- * @param length Length of the bytearray
- * @param horizontal Tells how far to the right the widgets should be moved (note: negative moves left)
- * @param vertical Tells how far down the widgets should be moved (note: negative moves up)
-*/
-void ResizeWindowWidgets(Window *w, const byte *resizearray, int16 length, byte horizontal, int16 vertical)
-{
- byte i;
-
- for (i = 0; i < length; i++) {
- if (resizearray[i] & WIDGET_DEFINE_MOVE_LEFT) w->widget[i].left += horizontal;
- if (resizearray[i] & WIDGET_DEFINE_MOVE_RIGHT) w->widget[i].right += horizontal;
- if (resizearray[i] & WIDGET_DEFINE_MOVE_TOP) w->widget[i].top += vertical;
- if (resizearray[i] & WIDGET_DEFINE_MOVE_BOTTOM) w->widget[i].bottom += vertical;
- }
-}