View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0002001 | FSSCP | user interface | public | 2009-10-01 06:01 | 2010-08-27 03:40 |
Reporter | FUBAR-BDHR | Assigned To | Zacam | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Product Version | 3.6.11 | ||||
Fixed in Version | 3.6.12 | ||||
Summary | 0002001: Primary weapon loadouts with text names are displaying the # and characters after | ||||
Description | If you are using the default text names (no models or anitmations) for primary weapons and use the # character (for insatnce #weak) the selection will show the #weak. | ||||
Additional Information | 3.6.11 r5615 | ||||
Tags | No tags attached. | ||||
2009-10-01 06:01
|
|
2010-02-11 09:04
|
M2001_patch_02112010.patch (1,871 bytes)
Index: missionui/missionweaponchoice.cpp =================================================================== --- missionui/missionweaponchoice.cpp (revision 5899) +++ missionui/missionweaponchoice.cpp (working copy) @@ -37,10 +37,10 @@ #include "network/multiui.h" #include "missionui/chatbox.h" #include "network/multi_pmsg.h" +#include "parse/parselo.h" - #define IS_BANK_PRIMARY(x) (x < MAX_SHIP_PRIMARY_BANKS) #define IS_BANK_SECONDARY(x) (x >= MAX_SHIP_PRIMARY_BANKS) @@ -2793,9 +2793,14 @@ //Draw the weapon name, crappy last-ditch effort to not crash. int half_x, half_y; char *print_name = (Weapon_info[Carried_wl_icon.weapon_class].alt_name[0]) ? Weapon_info[Carried_wl_icon.weapon_class].alt_name : Weapon_info[Carried_wl_icon.weapon_class].name; + + // Truncate the # and everything to the right. Zacam + end_string_at_first_hash_symbol(print_name); + + // Center-align and fit the text for display gr_get_string_size(&half_x, &half_y, print_name); half_x = sx +((56 - half_x) / 2); - half_y = sy +((24 - half_y) / 2); + half_y = sy +((28 - half_y) / 2); // Was ((24 - half_y) / 2) Zacam gr_string(half_x, half_y, print_name); } } @@ -3044,9 +3049,14 @@ //Draw the weapon name, crappy last-ditch effort to not crash. int half_x, half_y; char *print_name = (Weapon_info[index].alt_name[0]) ? Weapon_info[index].alt_name : Weapon_info[index].name; + + // Truncate the # and everything to the right. Zacam + end_string_at_first_hash_symbol(print_name); + + // Center-align and fit the text for display gr_get_string_size(&half_x, &half_y, print_name); half_x = x +((56 - half_x) / 2); - half_y = y +((24 - half_y) / 2); + half_y = y +((28 - half_y) / 2); // Was ((24 - half_y) / 2) Zacam gr_string(half_x, half_y, print_name); } } |
|
Proposed working .patch attached. The concept of using: char print_name[NAME_LENGTH]; strncpy_s(print_name, [...], NAME_LENGTH); results in the text not displaying until the icon is clicked on. Instead: end_string_at_first_hash_symbol(print_name); Is added to the code (with concise commentary) and even centered better. Also parses and trims out "#andtotheright" off of $Alt Name: entries as well. |
|
Worked fine for me. |
|
Committed in 5902. Leaving issue open for feedback until 3.6.12 Final and then closing if no issues occur. |
|
Closing as no reported issues or feedback (other than being asked if it can now be closed) |
Date Modified | Username | Field | Change |
---|---|---|---|
2009-10-01 06:01 | FUBAR-BDHR | New Issue | |
2009-10-01 06:01 | FUBAR-BDHR | File Added: screen1129.jpg | |
2009-11-03 17:14 | Zacam | Status | new => assigned |
2009-11-03 17:14 | Zacam | Assigned To | => Zacam |
2010-02-11 06:34 | Zacam | Status | assigned => confirmed |
2010-02-11 09:04 | Zacam | File Added: M2001_patch_02112010.patch | |
2010-02-11 09:07 | Zacam | Note Added: 0011632 | |
2010-02-11 09:07 | Zacam | Status | confirmed => feedback |
2010-02-11 10:46 | FUBAR-BDHR | Note Added: 0011633 | |
2010-02-11 16:45 | Zacam | Note Added: 0011648 | |
2010-08-27 03:40 | Zacam | Note Added: 0012332 | |
2010-08-27 03:40 | Zacam | Status | feedback => resolved |
2010-08-27 03:40 | Zacam | Fixed in Version | => 3.6.12 |
2010-08-27 03:40 | Zacam | Resolution | open => fixed |