Sidebar for GDI has hardcode positions

Registered by Gluk-v48 on 2014-04-05

[Side]►Sidebar.GDIPositions=(boolean)
GDI hardcode positions buttons on the sidebar. They are located above and have larger dimensions. Achieve a similar result by editing SHP - I could not. I want to have the same positions buttons for others sides.

What would bring some clarity. In the screenshot: [NOD]Sidebar.MixFileIndex=1
As you can see - the buttons are not in their places.
https://www.dropbox.com/s/908iqhdzye9ynr1/Sidebar.GDIPositions.png

Blueprint information

Status:
Started
Approver:
None
Priority:
Undefined
Drafter:
Gluk-v48
Direction:
Needs approval
Assignee:
None
Definition:
Review
Series goal:
None
Implementation:
Good progress
Milestone target:
None
Started by
Gluk-v48 on 2015-03-11

Related branches

Sprints

Whiteboard

DEFINE_HOOK(6A5090, SidebarGDIPositions, 5)
{
    int idxSide = ScenarioClass::Instance->PlayerSideIndex;
    SideClass* pSide = SideClass::Array->GetItem(idxSide);
    if(SideExt::ExtData *pData = SideExt::ExtMap.Find(pSide)) {
        return pData->SidebarGDIPositions
            ? 0x6A509F /* GDI */
            : 0x6A50EC /* NOD */
        ;
    }
    return 0x6A50EC;
}

==================================================
or:

DEFINE_HOOK(6A5090, SidebarGDIPositions, 5)
{
 int idxSide = ScenarioClass::Instance->PlayerSideIndex;

 DWORD &EndRadarZone = *reinterpret_cast<DWORD*>(0x886F94); // always 158?
 DWORD &ActionTop = *reinterpret_cast<DWORD*>(0xB0B4E0);
 DWORD &Action​Left = *reinterpret_cast<DWORD*>(0xB0B4E4);
 DWORD &TabsTop = *reinterpret_cast<DWORD*>(0xB0B4EC); // always 197?
 DWORD &TabsLeft = *reinterpret_cast<DWORD*>(0xB0B4F0);
 DWORD &CameosTop = *reinterpret_cast<DWORD*>(0xB0B4F8); // always 227?
 DWORD &CameosLeft = *reinterpret_cast<DWORD*>(0xB0B4FC);

 if(!idxSide){ // GDI
   EndRadarZone = 158;
   ActionTop = 166; // EndRadarZone + 0x8
   Action​Left = 64;
   TabsTop = 197; // ActionTop + 0x1F
   TabsLeft = 29;
   CameosTop = 227; // TabsTop + 0x1E
   CameosLeft = 63;
 }else{ //NOD
   EndRadarZone = 158;
   ActionTop = 165; // EndRadarZone + 0x7
   Action​Left = 52;
   TabsTop = 197; // ActionTop + 0x20
   TabsLeft = 32;
   CameosTop = 227; // TabsTop + 0x1E
   CameosLeft = 64;
 }
 return 0x6A50DB;
}

==================================================

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.

Subscribers

No subscribers.