Commit graph

58 commits

Author SHA1 Message Date
josteph
673c1fa4d9 help: Handle traits with empty names or descriptions.
Fixes #2108.
2017-11-03 18:11:08 +11:00
Charles Dang
311223f32e Use container::empty() for container-is-empty checks 2017-09-05 06:25:29 +11:00
Charles Dang
e41a415588 Deployed yet even more further additional emplace_back 2017-05-10 14:15:15 +11:00
Charles Dang
e4f03fe459 Moved all preferences source files into a single folder 2017-05-04 11:04:19 +11:00
Charles Dang
2a6ca6cd9e Deployed more emplace_back (how do I keep missing these...)
Covers more cases of:

* push_back(std::pair
* push_back(std::make_pair
* push_back(std::make_tuple
* push_back(T) where T is an empty object of type T

Small thing I noticed: this does mean the numbers in font::subset_descriptor are no longer 'cast' to size_t before being
added to the vector, but that shouldn't matter (hopefully).
2017-04-28 17:15:13 +11:00
Celtic Minstrel
b4dc11ce36 Belated 2017 copyright update 2017-03-19 10:05:38 -04:00
ln-zookeeper
bc89306090 Made the fake map border behave the same as off-map in the interface 2017-03-16 10:51:56 +02:00
Charles Dang
a976d05c9b Help: reduced threshold for 2x XBRZ scaling of sprites in help pages
[ci_skip]

It doesn't make any sense to disable this if the window size is bigger than the help window size.
2017-03-09 17:00:33 +11:00
gfgtdf
9f014825a1 skip musthave nameless traits in unit help pages trait count 2016-11-23 15:53:11 +01:00
gfgtdf
dc2b40fd2f skip nameless traits in unit help pages 2016-11-23 04:45:28 +01:00
Celtic Minstrel
3b46cd30a8 Merge pull request #863 from GregoryLundberg/GL_cleanup
A lot of little stuff
2016-11-11 13:16:57 -05:00
Gregory A Lundberg
d31555f8cf Pedantic includes
Change all includes to start at the base instead of assuming the directory where included from.

This makes it more apparent exactly which header has been included, since many have the same name.

This also allows moving all header files out of the src directory.
2016-11-11 11:00:22 -06:00
Gregory A Lundberg
f23127e65a Remove LOW_MEM compile-time option
Per @Vultraz
2016-11-11 09:20:56 -06:00
Celtic Minstrel
08852f6131 Rename most remaining non-GUI2 types to avoid t- prefix 2016-11-09 01:17:14 -05:00
Celtic Minstrel
68774b4285 Rename most of the remaining non-GUI classes with t_ prefix 2016-11-09 01:15:15 -05:00
Celtic Minstrel
b74afeff73 Rename terrain classes to avoid t_ prefix 2016-11-09 01:13:17 -05:00
Charles Dang
ebc8ddfb78 Move certain text constants into the constants file 2016-10-16 22:07:37 +11:00
Chris Beck
f82f996347 move font constants to their own compilation unit
avoids including SDL_TTF unnecessarily
2016-10-15 12:38:52 -04:00
Celtic Minstrel
b143ea4397 Use intrusive pointers for unit attacks
This is primarily for the purpose of the Lua API, to enable attack data to persist
even if a unit no longer owns the attack.
2016-08-28 00:24:23 -04:00
Charles Dang
88d0619d58 Cleaned up another use of snprintf
This removes the leading space before the first digit, but I think it looks better.
2016-08-24 17:45:22 +11:00
gfgtdf
4d84d42c47 iterator_range instead of pair for config::child_itors
with this wwe can use .size(), .empty(), .front(), operator bool, etc.
on config::child_itors objects.
2016-08-13 16:59:34 +02:00
Bär Halberkamp
7dbf17f3fe Fix traits in help 2016-07-31 15:46:55 -04:00
Charles Dang
24577e117d Merge pull request #716 from wesnoth/boost_trimming
Boost-related cleanups
2016-07-30 15:51:30 +11:00
Bär Halberkamp
f31578a545 Improve the unit help topics, especially on smaller monitors 2016-07-26 22:16:20 -04:00
Charles Dang
05092ba2f6 Refactor most boost pointer related stuff to use their stdlib counterparts
This constitutes drop-in replacements for:

* boost::shared_ptr
* boost::scoped_ptr
* boost::weak_ptr
* boost::enable_shared_from_this
* boost::static_pointer_cast
* boost::dynamic_pointer_cast

This excludes boost::intrusive_ptr, except for stray includes. Refactoring that is more complicated.
2016-07-25 09:28:42 +11:00
Charles Dang
dd88d4906e Appropriately handle std::stoi exceptions 2016-07-19 01:38:24 +11:00
Charles Dang
1d0e4fff41 Convert most usecases of atoi to std::stoi
Uses in theme.cpp were left alone since changing them causes a crash.
Other cases I'll leave for other people who know the respective code
better to change.
2016-06-07 01:53:53 +11:00
Celtic Minstrel
1649930113 Lua API for the name generators 2016-04-15 15:51:23 -04:00
Celtic Minstrel
ca382018b7 BOOST_FOREACH -> range for 2016-04-02 09:38:29 -04:00
Celtic Minstrel
2449dcf65b Scale portraits to uniform size in help
The size varies from 200x200 to 400x400 depending on window width.
2016-03-21 12:50:05 -04:00
Celtic Minstrel
c55d7cb50a Reformat unit_topic_generator 2016-03-21 12:50:05 -04:00
Charles Dang
c82807aea3 Allow use of small_profile in help browser if specified 2016-03-21 13:00:40 +11:00
Celtic Minstrel
bc711f5f43 Consolidate related files into subdirectories 2016-03-20 16:20:09 -04:00
gfgtdf
969157d79e fix color in help unit resitances
https://gna.org/bugs/?24381
2016-02-08 21:10:28 +01:00
Charles Dang
eb80320adf Flip unit portraits so crop is facing window border 2016-02-04 18:37:11 +11: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
Elvish_Hunter
9b7b1751fd Removed trailing tabs and whitespaces from C++ source
I used this command line: find <source directory> -name \*.\[ch\]pp -print0 | xargs -0 sed -i 's/[[:blank:]]*$//'
2015-12-21 20:39:46 +01:00
Charles Dang
75d125d070 Use full-size portraits in unit help pages (experimental) 2015-12-17 06:59:49 +11:00
Charles Dang
2eaa391a7f Replace synonymous build level with functional equivalent 2015-12-05 11:56:10 +11:00
Charles Dang
cd50036363 Restore a check to prevent portrait-less units from using a scaled sprite instead 2015-08-09 14:42:28 +11:00
Ignacio R. Morelle
c2c1dac618 Fix code typos resulting in compilation errors 2015-07-18 16:39:59 -03:00
Charles Dang
af17045bd1 Fixup 662a1d639a
The third check against "unit_image" is probably the wrong way to do this, but for now it works
2015-07-19 00:23:32 +11:00
Charles Dang
662a1d639a help: don't show any portrait for profile=unit_image 2015-07-18 23:42:23 +11:00
Charles Dang
57ad85a17b help: automatically scale unit_type.profile in the absence of unit_type.small_profile
Prior to this, profile= was used in the absence of small_profile, but not scaled, requiring
the manual specification of a 'small_profile=profile~SCALE()' line in unit type files if no
unique small profile image was provided. Since it appears the help browser is the only place
that used small_profile, we move the scaling here.

The standard value of 205x205 is used.
2015-07-18 22:03:34 +11:00
Ignacio R. Morelle
ef0eb55f24 Use prefix instead of postfix increment/decrement
Found by cppcheck.
2015-07-06 23:40:30 -03:00
Ignacio R. Morelle
3d2be54498 help: Rename Defense Capped column to Defense Cap column
This appears to have been originally implemented as a list of yes/no
values, and later reworked to show the actual cap percentages, so the
column header isn't entirely correct anymore.
2015-04-16 18:35:26 -03:00
Charles Dang
925ee2152d Don't draw boxes around unit sprites in help 2015-03-16 04:57:21 +11:00
Charles Dang
b121264050 Don't use numeric reference for TC palette 2015-03-16 04:11:02 +11:00
Ignacio R. Morelle
57ae45387a New Year copyright update 2015-01-01 19:07:35 -03:00
Charles Dang
08352806cc Display unit level under name, as opposed to next to image 2014-12-25 22:20:48 +11:00