~zbigniew-chyla/widelands/use-sdl-color-cursor

  • Committer: Zbigniew Chyla
  • Date: 2018-09-06 13:03:36 UTC
  • Revision ID: zbigniew.chyla@gmail.com-20180906130336-5ch3yabz1n6o0nfv
Use color SDL cursor if possible (with fallback to old approach)

Currently Widelands paints mouse cursor manually which is bad for user
experience - at 25 FPS the cursor lags behind the actual mouse position
and the user gets impression that there's "something wrong" with the
mouse.

SDL since v2 supports color cursors (SDL_CreateColorCursor) so we can
paint our custom (color) hand using SDL cursor.

Use SDL cursor in WLApplication by:
 - creating SDL_Cursor for both states (normal/clicked) on startup,
 - switching between cursors on button up/down events.
To avoid regressions on systems/setups that don't support our color
cursors keep the old code as a fallback, i.e. if SDL_CreateColorCursor
fails, disable SDL cursor and paint cursor manually.
Filename Latest Rev Last Changed Committer Comment Size
..
src 2 22 years ago sirver Initial revision git-svn-id: https://widelands.s Diff
po 2189 17 years ago bedouin - patch by Antonio Trueba: improve locale handling Diff
test 6689.1.1 10 years ago Holger Rapp First unfinished version of a regression test suit Diff
cmake 4944 14 years ago qcs Manual merge of cmake-migration branch to trunk g Diff
utils 939 18 years ago sirver - added 2 scripts needed for localisation - added Diff
.tx 7388 9 years ago Holger Rapp Added configuration for transifex client (http://d Diff
data 7293.1.1 9 years ago fios at foramnagaidhlig Moved campaigns to data/campaigns. Diff
doc 1955 17 years ago bedouin - enable in-place compression inside distribution Diff
debian 7719 8 years ago Holger Rapp Add debian directory from the debian branch. This Diff
.bzrignore 8337 7 years ago GunChleoc Added wl_map*_info to .bzrignore. 457 bytes Diff Download File
.clang-format 8054.2.1 7 years ago GunChleoc Prevent clang-format from formatting RST comments. 1.4 KB Diff Download File
.travis.sh 8502.5.3 6 years ago Hans Joachim Desserud Python is already installed. Let's see if the pip2 1.8 KB Diff Download File
CREDITS 8349.3.9 7 years ago Notabilis Removed remaining traces of SDL_net. Problem is, I 1.9 KB Diff Download File
appveyor.yml 8808 5 years ago GunChleoc Temporary fix to get AppVeyor builds running again 2.7 KB Diff Download File
.travis.yml 8672.1.1 6 years ago Hans Joachim Desserud Build with GCC 8 (newly released) instead of 6 3 KB Diff Download File
File regression_test.py 8452.1.2 6 years ago Holger Rapp Add a test that a market can be build and make it 8.8 KB Diff Download File
File compile.sh 8514 6 years ago GunChleoc Fixed a typo in compile.sh. 10.3 KB Diff Download File
CMakeLists.txt 8790.1.2 5 years ago GunChleoc Fix CMake for Linux. 12.8 KB Diff Download File
COPYING 6654.3.5 10 years ago Tino update GPL 2 COPYING file Innosetup: Create menu e 17.6 KB Diff Download File
ChangeLog 8731.1.1 5 years ago Notabilis Better explanations for networking changes in Chan 125 KB Diff Download File