I guess that's sort of a topic which is already talking about sometimes. I'm talking about making it possible to place UI Elements in the center of any 2d-axis. What I know so far is, that you cannot receive the clients screen height and width to make it grabbable with C4Script. But...
I thought there must be some way, because the UpperBoarderTitle is also rendered in the center of the x-axis. So why is it not possible to tell the renderer via C4Script, maybe with a constant (POS_CenterX/POS_CenterY/POS_CenterXY), to draw this graphic relatively to the center of any given axis. The position of the graphic could be used to define offset to the given axis. That way you could create an UI Element at the bottom of the screen, right in the middle like this:
obj->SetProperty("UI_Positioning", POS_CenterX);
obj->SetPosition(0, -graphic_height);
Maybe you also extend the principle with the mouse position (POS_Mouse) to make easier for users to create custom mouse graphics (also give Feedback when hovored over UI Elements of the backpack or such?). This might be thinking far in the future but I might find it usefull to get more control over how the mouse is displayed.
I thought there must be some way, because the UpperBoarderTitle is also rendered in the center of the x-axis. So why is it not possible to tell the renderer via C4Script, maybe with a constant (POS_CenterX/POS_CenterY/POS_CenterXY), to draw this graphic relatively to the center of any given axis. The position of the graphic could be used to define offset to the given axis. That way you could create an UI Element at the bottom of the screen, right in the middle like this:
obj->SetProperty("UI_Positioning", POS_CenterX);
obj->SetPosition(0, -graphic_height);
Maybe you also extend the principle with the mouse position (POS_Mouse) to make easier for users to create custom mouse graphics (also give Feedback when hovored over UI Elements of the backpack or such?). This might be thinking far in the future but I might find it usefull to get more control over how the mouse is displayed.
In the Controls branch, this is very possible. See here - not only is the big menu in the middle centered, but also the inventory slots at the bottom.
I hopeā¢ I'll find some time during this semester break to continue work on the Controls branch
I hopeā¢ I'll find some time during this semester break to continue work on the Controls branch
It would also be cool if one would be able to get the screens position relative to the landscape. You could e.g. make raindrops appear on the screen, but only where there's sky on the screen.
Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill