02-01-2023, 03:54 AM
Hi,
I am currently working on accessing the UIElements for PlayerIcons on the minimap and showing/hiding them.
What I have already found is the parent's UIElement (minimap)
I have two possibilities in mind, how to
1) find UIELements for playerIcons
2) find out the respective pid for the icon
(I) Finding an adress where the playerIcons are initialized and grabbing the pid
(II) Starting from the minimap elements and iterating through all children elements and grabbing the pid
This is what I got from documentation
Source: https://github.com/mkwcat/mkw-tournament...trol.h#L98
and
Source: https://github.com/mkwcat/mkw-tournament...trol.h#L32
So as the m_children and m_children2 are 2 bytes each I guess this value is some sort of index of the collection and not the item itself?
1) How do I iterate through all child objects
2) How do I get the pid of the player the icon represents?
I am currently working on accessing the UIElements for PlayerIcons on the minimap and showing/hiding them.
What I have already found is the parent's UIElement (minimap)
I have two possibilities in mind, how to
1) find UIELements for playerIcons
2) find out the respective pid for the icon
(I) Finding an adress where the playerIcons are initialized and grabbing the pid
(II) Starting from the minimap elements and iterating through all children elements and grabbing the pid
This is what I got from documentation
Code:
/* 0x68 */ UIControlCollection m_children;
Source: https://github.com/mkwcat/mkw-tournament...trol.h#L98
and
Code:
struct UIControlCollection {
UIControlCollection();
~UIControlCollection();
void init(UIControl* parent, int count);
void set(int index, UIControl* control);
/* 0x00 */ UIControl** m_children;
/* 0x04 */ UIControl** m_children2;
/* 0x08 */ UIControl* m_parent;
/* 0x0C */ UIControl* m_root;
/* 0x10 */ int m_count;
};
Source: https://github.com/mkwcat/mkw-tournament...trol.h#L32
So as the m_children and m_children2 are 2 bytes each I guess this value is some sort of index of the collection and not the item itself?
1) How do I iterate through all child objects
2) How do I get the pid of the player the icon represents?