Commit graph

75 commits

Author SHA1 Message Date
Martin Hrubý (hrubymar10)
bc4d22dc72 Migrate links to https if available - Fwd c18537edc0 2018-07-16 19:07:08 +11:00
Gregory A Lundberg
b5f76eff79
Bump copyright to 2018 2018-01-19 00:02:20 -06:00
Charles Dang
eba94b3e22 Cleaned up unnecessary drawing calls
After testing, it seems these calls to raise_draw_event and display/game_display::draw()
were unnecessary - or at least, became unnecessary at some point. One or two are definitely
still needed, but removing these doesn't seem to cause anything to to glitch out. Likely
explanation is anything that needs updating just gets updated either immediately or on the
next play_slice loop.
2017-11-28 06:38:19 +11:00
Charles Dang
c5dc04c900 Handle context menus on mouse up instead of mouse down
This is more consistent behavior with apps in general.
2017-07-31 10:27:27 +11:00
Charles Dang
cc3c9be5b0 Mouse Handler Base: formatting cleanup
# Conflicts:
#	src/mouse_handler_base.cpp
2017-07-26 22:13:11 +11:00
Charles Dang
e4f03fe459 Moved all preferences source files into a single folder 2017-05-04 11:04:19 +11:00
qmo2015
c551cfd048 Fixed bug #24644: Units moving after in game help exit (#1002) 2017-05-01 02:37:28 -04:00
Celtic Minstrel
067301ea95 Fix ability to scroll via minimap while view locked 2017-04-24 00:07:43 -04:00
Celtic Minstrel
b4dc11ce36 Belated 2017 copyright update 2017-03-19 10:05:38 -04:00
Charles Dang
c912f7e7e7 Removed zoom slider code
This slider hasn't worked in ages, and we're planning to remove it anyway.

The slider "groove" image remains since it's hard drawn in the background image file.
2017-03-07 21:05:25 +11:00
Charles Dang
48d35a3199 Don't handle mousewheel scrolling if mouse is not in game map area (bug #24501) 2017-02-28 19:12:22 +11:00
Jyrki Vesterinen
af733360a8 Fix a bunch of MSVC2015 compiler warnings about hiding declarations
This commit still doesn't fix all of them. I decided to leave alone
cases where variables with the same name are assigned in multiple
conditions of the same if...else if...else statement, and cases where a
scope logging macro is used multiple times in the same scope. In any
case, this commit greatly reduces the warning count on MSVC2015 and makes
new warnings much easier to spot.
2016-10-06 00:11:56 +03:00
Andreas Löf
64b90042c4 Fix bug #24762: Recreate buttons GUI buttons on a full redraw
This re-creates the main display-gui() buttons on a full redraw to take
into account that the theme expects them to be out of sync. As a
consequence I have also been forced to refactor how said buttons are
managed and introduced a new method to join the same event context
as another component.
2016-07-09 21:54:48 +12:00
loonycyborg
dfe2f331a8 Fixed the direction of horizontal scrolling with mousewheel 2016-06-25 16:53:58 +03:00
Celtic Minstrel
3ac7f8d970 NULL -> nullptr
A few cases of NULL were missed, since changing them led to errors
(Mainly instances where it was passed to a boost::function)
2016-03-31 00:42:38 -04:00
Andreas Löf
358bd1235f Remove SDL1.2 code
This removes all legacy SDL1.2 code. It was done by invoking:
coan source --replace --no-transients -D"SDL_VERSION_ATLEAST(X, Y, Z)"=1 <file>
on each file.
2016-03-13 11:34:34 +13:00
Chris Beck
ba51524f6e update copyright to year 2016
using this shell script:

find src -type f -print0 | xargs -0 sed -i "s|Copyright (C) \([[:digit:]]*\)\([ ]*\)-\([ ]*\)2015|Copyright (C) \1\2-\32016|g"
2016-01-02 23:59:31 -05:00
Martin Proud
70f04dd2b1 Update mouse_handler_base.cpp
For Apple, control is the modifier key that is used for contextual menus.

KMOD_CTRL will check for a control-click. This fixes #15259 (https://gna.org/bugs/?15259). (I’ve built and verified with this patch, it works correctly.)
2015-12-29 07:53:02 -06:00
Ignacio R. Morelle
57ae45387a New Year copyright update 2015-01-01 19:07:35 -03:00
Mark de Wever
e35f4bb501 Strip trailing whitespace. 2014-06-09 15:26:19 +02:00
Boldizsár Lipka
ac96a2b91b Move some functions to sdl/rect. 2014-06-03 10:30:12 +02:00
Chris Beck
03a956d05c Make sure all warning logs are flushed, so travis gets the results.
This is the result of running command, in src/,

find . -type f -exec sed -i 's/\(WRN.*\)\\n\"\;/\1\" << std::endl\;/g' '{}' \;

and inspecting the results.

Also ran this subsequently:

find . -type f -exec sed -i 's/\(WARN.*\)\\n\"\;/\1\" << std::endl\;/g' '{}' \;

which only affected render.cpp
2014-05-20 15:48:36 -04:00
Alexander van Gessel
0e8c135c14 Fix strict compilation 2014-05-02 14:24:37 +02:00
David Mikos
c53b204abd Fix bug #21491: fix drag+drop for unit movements 2014-05-02 07:56:56 +09:30
Boldizsár Lipka
ea3bd56555 Switch vertical scrolling directions. 2014-03-14 22:56:55 +01:00
Boldizsár Lipka
2d54ec7aca Wrap old SDL code in a preproc directive. 2014-03-14 22:00:22 +01:00
Boldizsár Lipka
821b009948 Support SDL2's mouse wheel event in mouse_handler_base.
Allows to scroll the map with the wheel.
2014-03-14 22:00:22 +01:00
Ignacio R. Morelle
a4f47a63c7 New Year copyright update 2014-01-01 02:08:52 -03:00
Alexander van Gessel
6b0acc4c34 Initialize two variables
Found by coverity
2013-12-22 17:10:41 +01:00
Ignacio R. Morelle
25266cd2f6 Fix NULL pointer dereference when scroll-wheeling in the editor
From cd8c83532b:

  gui::slider* s = gui().find_slider("map-zoom-slider");
  if (point_in_rect(event.x, event.y, s->location())) {
      scrollx = 0; scrolly = 0;
  }

s is not guaranteed to not be NULL. display::find_slider() WILL return
NULL if it can't find the requested widget. As it turns out, the editor
currently lacks a slider called "map-zoom-slider".
2013-12-21 14:34:13 -03:00
David Mikos
d04f6af930 add check to see that middle click scrolling variables are fully intialized 2013-12-22 01:53:44 +10:30
David Mikos
cd8c83532b Make it so that sliders can be mouse wheel scrolled. 2013-12-22 00:16:27 +10:30
David Mikos
36b6b60beb Make middle click scrolling based on movement distance not screen centre. 2013-12-21 22:28:59 +10:30
Eric S. Raymond
043c4f9fd3 Remove $Id$ cookies. 2013-03-26 21:41:37 -04:00
Mark de Wever
43b71f2ff0 New year copyright update. 2013-01-01 09:22:03 +00:00
Ignacio R. Morelle
6ca69b2df5 New year copyright update 2012-01-07 02:35:17 +00:00
Fabian Müller
d04fa3be80 Basic Joystick support. 2011-06-20 23:33:10 +00:00
Mark de Wever
ecbabea838 New year copyright update. 2011-01-01 15:57:50 +00:00
Guillaume Melquiond
eeb047de55 Fixed file headers so that they match the content of the COPYING file. 2010-09-01 21:12:38 +00:00
Ali El Gariani
992b6f0e3c Allow to associate a help page to each tooltip (open when clicking). 2010-06-04 18:59:18 +00:00
Ali El Gariani
ef72ecf413 Move tooltips processing to mouse_handler_base 2010-06-04 18:59:14 +00:00
Mark de Wever
b1b61353f3 Make a member function a const member function.
Issue found by cppcheck.
2010-03-30 21:56:38 +00:00
Mark de Wever
92f5f92ce5 New year copyright update. 2010-01-01 13:16:49 +00:00
Ali El Gariani
6e0b12e8c0 clean some includes 2009-12-05 00:19:32 +00:00
Guillaume Melquiond
789736ac91 Removed specialized domains from log.hpp,
...so that adding a new domain no longer forces to recompile the whole
game.
2009-04-24 23:18:31 +00:00
Mark de Wever
4d27743d10 Remove trailing whitespace. 2009-04-04 16:41:28 +00:00
Mark de Wever
581c2d0387 Converted the old style casts to c++ style casts. 2009-04-02 18:22:27 +00:00
Ali El Gariani
b13512e65e Fix bug #13251: Units move on their own when using "next unit" 2009-03-29 00:57:44 +00:00
Ali El Gariani
409d570faa no need of reference for bool 2009-03-10 08:18:48 +00:00
Ali El Gariani
9c027a1933 Fix a problem when trying to attack with a double-click(?),
the following clicks were doubled and so the attack dialog (when canceled)
2009-03-10 07:41:50 +00:00