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
 
@@ -338,25 +338,24 @@ static void LoadIntroGame()
 

	
 
	_pause_game = 0;
 
	SetLocalPlayer(PLAYER_FIRST);
 
	_cursor.fix_at = false;
 
	MarkWholeScreenDirty();
 

	
 
	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[])
 
{
 
	int i;
 
	const char *optformat;
 
	char musicdriver[32], sounddriver[32], videodriver[32], blitter[32];
 
	int resolution[2] = {0, 0};
 
	Year startyear = INVALID_YEAR;
src/openttd.h
Show inline comments
 
@@ -30,28 +30,17 @@ enum SwitchModes {
 
};
 

	
 
/* Display Options */
 
enum {
 
	DO_SHOW_TOWN_NAMES    = 0,
 
	DO_SHOW_STATION_NAMES = 1,
 
	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
 
@@ -28,24 +28,25 @@
 

	
 
static Point _drag_delta; ///< delta between mouse cursor and upper left corner of dragged window
 
static Window *_mouseover_last_w = NULL; ///< Window of the last MOUSEOVER event
 

	
 
/**
 
 * List of windows opened at the screen.
 
 * 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;
 

	
 
bool _scrolling_scrollbar;
 
bool _scrolling_viewport;
 

	
 
byte _special_mouse_mode;
 

	
 

	
src/window_gui.h
Show inline comments
 
@@ -527,24 +527,39 @@ static inline void GuiShowTooltips(Strin
 
{
 
	GuiShowTooltipsWithArgs(str, 0, NULL);
 
}
 

	
 
/* widget.cpp */
 
int GetWidgetFromPos(const Window *w, int x, int y);
 

	
 
/* 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;
 

	
 
extern bool _scrolling_scrollbar;
 
extern bool _scrolling_viewport;
 

	
 
extern byte _special_mouse_mode;
 
enum SpecialMouseMode {
 
	WSM_NONE     = 0,
0 comments (0 inline, 0 general)