60 Commits

Author SHA1 Message Date
Charles Dang
2470984af3 Prepend 'SDL2/' to all SDL includes
This was needed to get the build working with vcpkg's version of SDL, where all the SDL files are
in their own SDL folder. However, our cmake config also has a note saying it was a deliberate choice
to move our SDL files *out* of their SDL2 folder due to certain distros (FreeBSD is mentioned) not
putting the files in said folder in the first place.
2019-07-22 15:35:55 +11:00
Victor Sergienko
941844f14a iOS: Long-touch context menu. Work around event queue delays. 2018-10-28 18:21:54 +02:00
Victor Sergienko
b4ef4c9b34 iOS: Touch-hex action added. 2018-10-28 18:21:54 +02:00
Victor Sergienko
aedc081b2e iOS: Touch interface implemented, and a RMB emulation of such on PC. 2018-10-28 18:21:53 +02:00
Martin Hrubý (hrubymar10)
674fda85b7 Migrate links to https if available - Fwd c18537edc0678f40a209797d72dfaba3e5e88545
(cherry-picked from commit bc4d22dc72e79c3d6a3364ac896e473afd298246)
2018-10-07 03:23:36 +00:00
Gregory A Lundberg
b5f76eff79
Bump copyright to 2018 2018-01-19 00:02:20 -06:00
Charles Dang
d419caf24c Mouse Handler Base: fix right-click behavior regression from c5dc04c900 (fixes #1967)
The above commit moved context menu handling from right_click to right_mouse_up. However, that removed
the early-exit if right_click_show_menu returned false. It seems some areas of the code (in this case,
the editor in editor_controller::right_click - don't ask me exactly how this leads to editor_controller::mouse_motion
where the codepath that caused the exception in the above bug is actually called, I didn't bother to trace it)
relied on that early exit to control behavior.

Making right_click return the value of right_click_show_menu by default fixes things.
2017-09-13 12:40:53 +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
2101353d36 Convert include guards to the shorter #pragma once
Turns out I mistook @celticminstrel's opinion that we should use include guards over pragma (737916e).
Since all major compilers support `#pragma once`, there's no reason not to use it.

For future mergability reasons, this excludes src/spirit_po and src/xBRZ. It also excludes src/boost-patched.
2017-05-09 19:41:37 +11:00
Rikard Falkeborn
94e73a7ccc Add const to some more functions 2017-04-17 16:51:30 +11:00
Celtic Minstrel
b4dc11ce36 Belated 2017 copyright update 2017-03-19 10:05:38 -04:00
Charles Dang
b739bdde2a Cleaned up SDL_Version.h includes
These are no longer needed after the SDL2 transition.
2016-11-07 21:30:46 +11:00
gfgtdf
553ac0fd05 add wml_x/y() getter & setter in map_location 2016-09-16 22:35:41 +02:00
Celtic Minstrel
bc711f5f43 Consolidate related files into subdirectories 2016-03-20 16:20:09 -04:00
Charles Dang
37d9b102b7 Include SDL files as system headers
This excludes inclusions in SDL_GPU files.
2016-03-20 15:07:16 +11: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
Ignacio R. Morelle
57ae45387a New Year copyright update 2015-01-01 19:07:35 -03:00
Chris Beck
98922ff0af fixup unnecessary include 2014-06-19 11:19:15 -04:00
Mark de Wever
e35f4bb501 Strip trailing whitespace. 2014-06-09 15:26:19 +02:00
Chris Beck
c5838b9513 inline the definition map_location::null_location
If we decided it was worth it to inline map_location ==, then
surely this is also worth it to inline null_location, as the
compiler may be able to reduce tests for == null location to
"x == ... && y == ...", without having to move to a different
compilation unit.
2014-05-20 10:42:13 -04:00
David Mikos
c53b204abd Fix bug #21491: fix drag+drop for unit movements 2014-05-02 07:56:56 +09:30
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
Mark de Wever
a2b8589143 Adds -Wextra-semi to pedantic compilation.
Also fixes all warning messages.
2014-01-26 14:24:12 +01:00
Ignacio R. Morelle
a4f47a63c7 New Year copyright update 2014-01-01 02:08:52 -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
fendrin
e579bca3ef Fix spelling in comments. 2013-10-19 15:13:25 +02:00
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
Ignacio R. Morelle
d6a3de1938 Apply patch #2213 by stikonas, using file #11274 2010-11-21 01:56:29 +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
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
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
Ali El Gariani
c92e735dc9 Quick fix for restoring a 15px threshold for drag&drop (instead of 0)
This fixes unwanted double-click (causing double select event and reset goto)
ilor: the editor continue to use 0, but I don't know where test it.
2009-03-01 17:58:38 +00:00
Ali El Gariani
fe7bd3032a Fix bug #12712: false "click" sometimes triggered at end of unit move...
...and a not reported bug about sometimes firing multiple "select" events.

ilor: seems to not modify the editor behavior but maybe check.
2009-02-26 04:37:06 +00:00
Patrick Parker
c81ae6895b new advanced preference to choose whether middle-click scrolls...
...or warps (default=scrolls)
2009-01-05 04:47:48 +00:00
Mark de Wever
973a0a7d5c Remove trailing whitespace. 2009-01-01 10:28:26 +00:00
Mark de Wever
a5d1d2e969 New year copyright update. 2009-01-01 10:27:41 +00:00
Tomasz Śniatowski
1589d8713c editor2 MDI feature - have more than one map open in the editor...
...with fast switching between them. Can be disabled in the editor
settings. Also changed:

* the display class now holds a pointer to the map instead of a
  reference, a pointer can be changed which permits the entire MDI
  behavior. Related bits were also changed in terrain_builder.

* mouse_handler_base no longer holds a reference to the map

* the map labels class does not hold a gamemap reference, as it can
  use the display object to access the map. Also clearing all labels
  was exposed as a public member function.

* used scoped_ptrs and forward declarations to avoid having to include
  map_label.hpp and terrain_builder.hpp in display.hpp, this reduces
  build dependencies quite a bit.

* made get_action_state use the menu index to allow a dynamic menu to
  have checkboxes. This entire chunk of code needs a rewrite.
2008-11-21 15:42:34 +01:00
Tomasz Śniatowski
01e504ede6 remove some map.hpp dependencies,
...also separated viewpoint and map_exception classes from map.hpp
into separate headers (no cpp files)
2008-10-17 17:53:08 +01:00
Tomasz Śniatowski
c54a538139 Refactor gamemap::location -- rename to map_location,
...move into separate cpp/hpp pair. The code under src/ was modified
mainly using a global search-and-replace. This change allows reducing
code dependencies and gets rid of inner-class confusion (parts of the
code had to use "location" when referring to gamemap::location, it is
now consistent across the codebase.)
2008-10-15 17:38:51 +01:00