juleshuxley 9 Posted November 30, 2020 Why is my RSC text not centered? Here's my RSC class: #define CT_STRUCTURED_TEXT 13 #define ST_CENTER 0x02 class MyRscStructuredText { idc = -1; type = CT_STRUCTURED_TEXT; // defined constant style = ST_CENTER; // defined constant x = 0.1; y = 0.1; w = 0.1; h = 0.1; size = 0.018; text = ""; class Attributes { font = "TahomaB"; color = "#000000"; align = "center"; valign = "middle"; shadow = false; shadowColor = "#ff0000"; size = "1"; }; }; Here's the implementation: _item = _display ctrlCreate ["MyRscStructuredText", -1]; _item ctrlSetPosition [0,0,0.0,0.0]; _item ctrlSetText "X"; _item ctrlSetBackgroundColor [1, 0, 0, 1]; _item ctrlSetTextColor [1,1,1,1]; Result: While it appears to be horizontally aligned, why is it not vertically aligned? Why is valign being ignored? I just want that white x to be in the dead center of the red box, I don't mind what type the RSC is. Setting it to Structured Text doesn't appear to be doing anything anyway Share this post Link to post Share on other sites
juleshuxley 9 Posted December 2, 2020 bumpong for glory Share this post Link to post Share on other sites