Building window background "jumping" when previewing upgrade build cost
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
widelands |
Fix Released
|
Medium
|
Gabriel Margiani |
Bug Description
The required build cost is now previewed when hovering the cursor over a building to be built or enhanced (bug 740401). First, off all; awesome, thanks a lot! I've been waiting for this a long time.
Then to the issue:
1. Start a new game as barbarians.
2. Build a metalworks.
3. When it has finished, open the building window.
4. Hover the cursor over the "enhance building" button.
As expected, the build costs for the enhancement is shown at the bottom of the window. However, adding this row of items increase the height of the window, thus the background image of the building is shifted down to remain centered which makes it seem like it is jumping.
I guess this was ok when the window remained static, but now that the window size can change, we might want to reconsider this option. The background window should not be moving around for random reasons when the user is interacting with the window. Perhaps we could position it when the window is opened based on the original window size and then lock it so that it is unaffected by any changes in window size? (I don't know how well that would work for buildings with larger images, such as castles and battle arenas.)
Related, but less annyoing; it is also possible to see the changes in how the window pattern on the sides match up when the build costs are shown/hidden.
Related branches
- SirVer: Needs Information
- Gabriel Margiani: Needs Resubmitting
-
Diff: 1046 lines (+155/-309)8 files modifiedsrc/logic/item_ware_descr.h (+1/-0)
src/ui_basic/icongrid.cc (+17/-26)
src/ui_basic/icongrid.h (+1/-2)
src/wui/buildingwindow.cc (+25/-73)
src/wui/buildingwindow.h (+0/-5)
src/wui/fieldaction.cc (+63/-75)
src/wui/waresdisplay.cc (+27/-85)
src/wui/waresdisplay.h (+21/-43)
I was expecting this bug report :P. I personally also dislike the changing of the window size. I would prefer if the UI already reserved some space for the information that could be displayed. The same space could also be used to display a short help text when hovering the other buttons (instead of the tooltip we currently have).
What do others think? Does anybody else find the changing of window sizes straining?