RHS Feedback - AFRF
View Issue Details
0001546AFRF[All Projects] Generalpublic2015-12-20 10:392015-12-20 18:37
ruPaladin 
reyhard 
nonemajoralways
closedno change required 
 
 
No
1.54
No
0001546: All artillery has wrong UI positions
Check "rhs_optics" and "rhsusf_optics". You will find that code:
class CA_IGUI_elements_group: RscControlsGroup
        {
            class controls
            {
                class CA_Heading: RscText
                {
                    x="-2 * (0.01875 * SafezoneH)";
                    y="-2.4 * (0.025 * SafezoneH)";
                    w="13 * (0.01875 * SafezoneH)";
                    h="13 * (0.025 * SafezoneH)";
                };
                class CA_Elev: RscText
                {
                    x="-2 * (0.01875 * SafezoneH)";
                    y="-0.4 * (0.025 * SafezoneH)";
                    w="13 * (0.01875 * SafezoneH)";
                    h="13 * (0.025 * SafezoneH)";
                };
            };
        };
in
class rhs_gui_optic_mortar
and
class rhsusf_gui_optic_mortar.

They didn't use standard BI calculations for UI positions, so all UI elemnts moves on different monitor resolutions.
http://i.imgur.com/fMQrOJX.png [^]
No tags attached.
Issue History
2015-12-20 10:39ruPaladinNew Issue
2015-12-20 10:39ruPaladinDescription Updatedbug_revision_view_page.php?rev_id=1665#r1665
2015-12-20 14:11reyhardNote Added: 0003155
2015-12-20 17:04ruPaladinNote Added: 0003161
2015-12-20 17:05ruPaladinNote Edited: 0003161bug_revision_view_page.php?bugnote_id=3161#r1676
2015-12-20 17:16reyhardNote Added: 0003162
2015-12-20 17:22ruPaladinNote Added: 0003163
2015-12-20 17:24ruPaladinNote Edited: 0003163bug_revision_view_page.php?bugnote_id=3163#r1678
2015-12-20 17:26reyhardNote Added: 0003164
2015-12-20 17:26reyhardNote Edited: 0003164bug_revision_view_page.php?bugnote_id=3164#r1680
2015-12-20 18:22ruPaladinNote Added: 0003167
2015-12-20 18:23reyhardNote Added: 0003168
2015-12-20 18:25ruPaladinNote Added: 0003169
2015-12-20 18:28ruPaladinNote Edited: 0003169bug_revision_view_page.php?bugnote_id=3169#r1686
2015-12-20 18:29reyhardNote Added: 0003171
2015-12-20 18:32ruPaladinNote Added: 0003172
2015-12-20 18:37reyhardNote Added: 0003174
2015-12-20 18:37reyhardStatusnew => closed
2015-12-20 18:37reyhardAssigned To => reyhard
2015-12-20 18:37reyhardResolutionopen => no change required

Notes
(0003155)
reyhard   
2015-12-20 14:11   
"They didn't use standard BI calculations for UI positions, so all UI elemnts moves on different monitor resolutions."

what do you mean?
(0003161)
ruPaladin   
2015-12-20 17:04   
(edited on: 2015-12-20 17:05)
BI made calculations for UI to be at the same position on any monitor, here they are:
x = number *(((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX);
y = number *((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2));
w = number * ( ((safezoneW / safezoneH) min 1.2) / 40);
h = number *((((safezoneW / safezoneH) min 1.2) / 1.2) / 25);

Where is "number" - any coefficient. Just check any BI config with UI elements, all of them uses the same calculations and only "number" changes.

(0003162)
reyhard   
2015-12-20 17:16   
above formule is only valid if you want to have rescalable & movable ui
check i.e. RscOptics_sos

it's fine. if you found specific resolution where it doesn't work then report it. otherwise I will close ticket soon.

ps. I removed ")" sign since it was leftover from debug dir thing (removed CA_Heading)
(0003163)
ruPaladin   
2015-12-20 17:22   
(edited on: 2015-12-20 17:24)
There is a screenshot in Additional Information. Resolution: 1280x1024, 5:4. Thank for your time.

(0003164)
reyhard   
2015-12-20 17:26   
and what is the problem? current elevation indicator is in correct place

(0003167)
ruPaladin   
2015-12-20 18:22   
The ")" is actually 000 but you can see only half of the last zero. It is a heading display.
(0003168)
reyhard   
2015-12-20 18:23   
http://feedback.rhsmods.org/view.php?id=1546#c3162 [^]
(0003169)
ruPaladin   
2015-12-20 18:25   
(edited on: 2015-12-20 18:28)
Oh, you mean that it is a feature and any artillery will not have heading display but only elevation. But then how will it be possible to shot artillery without artillery computer? Heading display is a must have feature :)

(0003171)
reyhard   
2015-12-20 18:29   
compass on map or in hand?
(0003172)
ruPaladin   
2015-12-20 18:32   
If it shouldn't be there then it is ok. Just wanted to let you know about that. Thought that was bug. Please close.
(0003174)
reyhard   
2015-12-20 18:37   
ok :)