-
-
Notifications
You must be signed in to change notification settings - Fork 991
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Color Coding for Terrain Defense In Unit Help & Unit Sidebar Inconsistent (GNA #24382) #1531
Comments
I wonder if this is a deliberate design decision - the colours in Help are saturated while the ones in the side-bar appear to be more muted. If deliberate, then it's an Enhancement; if not, then it's a Bug. |
@sigurdfdragon Were you doing any work related to this? |
@Wedge009 no |
Defence in side-bar: Lines 581 to 582 in a8c96ba
Defence in help: wesnoth/src/help/help_topic_generators.cpp Lines 749 to 761 in a8c96ba
At first I thought I could just copy the |
wesnoth/src/help/help_text_area.cpp Line 143 in f05f811
wesnoth/src/help/help_text_area.cpp Line 295 in f05f811
wesnoth/src/help/help_impl.cpp Lines 1249 to 1271 in f05f811
So, we could use red_to_green in the help; we'll just need to serialize the color_t it returns to a I wonder if there are any such changes we should make. We use percentages for several different things: 1) terrain defense 2) resistance/vulnerability 3) chance to hit 4) time of day bonus 5) stats dialog. They appear in several contexts: in the help, in the sidebar, in the attack dialog / damage calculations dialog, on the hex under the mouse. Does any of these need to be changed, too? (I know I changed one of these: I made the "damage against" sidebar tooltip use red_to_green, rather than the trichromatic behavior of master. But I didn't do a complete audit of all of them, to make sure each of them is internally consistent, and not likely to be confused with any of the others (primarily for the first three).) |
Sorry, I think I wasn't very clear. I'm not saying to hold forward progress or anything. I'm just trying to say that we use percentages in a lot of places and (1) maybe there are other inconsistencies similar to this one, (2) we should be conscious - in general, not specifically in this particular change - of the risk of conflating different kinds of percentages, for example, of accidentally writing a UI that makes the player compare apples to oranges, terrain defense values to chance to hit values. Edit: For resistance/vulnerability specifically, the sidebar, help topic generator, and a few other places all use the |
I tried using Regarding the general consideration of usage of percentages that you pointed out, if we find them then it's worth resolving. But for the purposes of this particular report, I was just focusing on the Help vs side-bar defence percentage colouring. |
I assume the single quotes got you? Having to worry about serialization like that is not best practice, normally one uses a function that adds any needed quoting automatically, but this bit of code hasn't been written this way in the first place. proof of concept
|
...you've basically done what I tried to do. Yes, I didn't realise the quotes were necessary to enable the hex string format. Do you object to this change? Do you want to commit this change or should I do it? |
The quotes were necessary to let the As to the patch, before you commit it, I suggest to also pass Which, personally, I find easier to read. It's already used by the code that draws terrain defense in the hex under the mouse when ordering a unit to move. |
I see only a very subtle difference between the two. This is text... and yet you want to specify the |
|
Thanks! |
Rather, thanks for your advice about the quotes. |
Original submission by sigurdfdragon on 2016-02-03
This has been around since at least 1.10
Not 100% sure if this should be consider a bug or feature request.
The color for terrain defense on the map and the unit sidebar show a progression from red -> orange -> yellow -> green with different shades every 10%. These are different than the Unit Help Listing which uses red for 0-10%, yellow for 20-30%, white for 40-50%, and green for 60%-100%
I think it should be consistent if possible.
(Reproduced on Win 7 x64)
Release: 1.13.2+dev
Priority: 5 - Normal
Severity: 3 - Normal
The text was updated successfully, but these errors were encountered: