#1591 closed enhancement (fixed)
[PATCH] Show combined costs in gate conversion tooltip.
Reported by: | wraitii | Owned by: | leper |
---|---|---|---|
Priority: | Nice to Have | Milestone: | Alpha 14 |
Component: | UI & Simulation | Keywords: | simple patch |
Cc: | Patch: |
Description
The gate conversion tooltip only takes a single gate into account, even when the user has selected multiple long walls segment. It should take every wall segment into account and update the tooltip. It should also make sure the red overlay (showing a lack of resources) is correctly updated for multiple gates, see #1571.
Attachments (1)
Change History (14)
comment:1 by , 11 years ago
Keywords: | simple added; gate conversion UI tooltip removed |
---|
comment:2 by , 11 years ago
Keywords: | review patch added |
---|---|
Milestone: | Backlog → Alpha 14 |
Summary: | Show combined costs in gate conversion tooltip. → [PATCH] Show combined costs in gate conversion tooltip. |
follow-up: 4 comment:3 by , 11 years ago
comment:5 by , 11 years ago
The code looks alright on first sight. But I haven't got around testing it. The code looks clean though.
Also, note the indentation. That's done with tabs in 0 A.D. (http://trac.wildfiregames.com/wiki/Coding_Conventions)
comment:6 by , 11 years ago
Yes, I read that. The non-tab indentation was just a couple typos. Re-uploading the cleaned patch now.
comment:9 by , 11 years ago
Wouldn't the patch get a lot shorter by using JavaScripts Array.reduce()?
comment:10 by , 11 years ago
Leper: I'll look into it. I honestly wasn't expecting to be using javascript a whole lot when I first found the project, and I am certainly not a JS expert, so I didn't know that that function existed.
comment:12 by , 11 years ago
Keywords: | review removed |
---|
Thanks for the patch. I replaced the counting code with Array.reduce and fixed a small bug related to the time display.
Two things I only leared myself recently: