Changeset - r9411:abefa92c5c58
[Not reviewed]
master
0 4 0
rubidium - 16 years ago 2008-05-29 11:13:11
rubidium@openttd.org
(svn r13322) -Codechange: _no_scroll belongs more with the window code.
4 files changed with 16 insertions and 12 deletions:
0 comments (0 inline, 0 general)
src/openttd.cpp
Show inline comments
 
@@ -344,13 +344,12 @@ static void LoadIntroGame()
 
	CheckForMissingGlyphsInLoadedLanguagePack();
 

	
 
	/* Play main theme */
 
	if (_music_driver->IsSongPlaying()) ResetMusic();
 
}
 

	
 
byte _no_scroll;
 
byte _savegame_sort_order;
 
#if defined(UNIX) && !defined(__MORPHOS__)
 
extern void DedicatedFork();
 
#endif
 

	
 
int ttd_main(int argc, char *argv[])
src/openttd.h
Show inline comments
 
@@ -36,22 +36,11 @@ enum {
 
	DO_SHOW_SIGNS         = 2,
 
	DO_FULL_ANIMATION     = 3,
 
	DO_FULL_DETAIL        = 5,
 
	DO_WAYPOINTS          = 6,
 
};
 

	
 
/* In certain windows you navigate with the arrow keys. Do not scroll the
 
 * gameview when here. Bitencoded variable that only allows scrolling if all
 
 * elements are zero */
 
enum {
 
	SCROLL_CON  = 0,
 
	SCROLL_EDIT = 1,
 
	SCROLL_SAVE = 2,
 
	SCROLL_CHAT = 4,
 
};
 
extern byte _no_scroll;
 

	
 
extern byte _game_mode;
 
extern bool _exit_game;
 
extern int8 _pause_game;
 

	
 
#endif /* OPENTTD_H */
src/window.cpp
Show inline comments
 
@@ -34,12 +34,13 @@ static Window *_mouseover_last_w = NULL;
 
 * Uppermost window is at  _z_windows[_last_z_window - 1],
 
 * bottom window is at _z_windows[0]
 
 */
 
Window *_z_windows[MAX_NUMBER_OF_WINDOWS];
 
Window **_last_z_window; ///< always points to the next free space in the z-array
 

	
 
byte _no_scroll;
 
Point _cursorpos_drag_start;
 

	
 
int _scrollbar_start_pos;
 
int _scrollbar_size;
 
byte _scroller_click_timeout;
 

	
src/window_gui.h
Show inline comments
 
@@ -533,12 +533,27 @@ int GetWidgetFromPos(const Window *w, in
 

	
 
/* window.cpp */
 
extern Window *_z_windows[];
 
extern Window **_last_z_window;
 
#define FOR_ALL_WINDOWS(wz) for (wz = _z_windows; wz != _last_z_window; wz++)
 

	
 
/**
 
 * In certain windows you navigate with the arrow keys. Do not scroll the
 
 * gameview when here. Bitencoded variable that only allows scrolling if all
 
 * elements are zero
 
 */
 
enum {
 
	SCROLL_CON  = 0,
 
	SCROLL_EDIT = 1,
 
	SCROLL_SAVE = 2,
 
	SCROLL_CHAT = 4,
 
};
 

	
 
/** Disable scrolling of the main viewport when an input-window is active. */
 
extern byte _no_scroll;
 

	
 
extern Point _cursorpos_drag_start;
 

	
 
extern int _scrollbar_start_pos;
 
extern int _scrollbar_size;
 
extern byte _scroller_click_timeout;
 

	
0 comments (0 inline, 0 general)