Mefisto_PL Posted October 24, 2013 Share Posted October 24, 2013 Hi everyone, I have a question.. How to get dxtext length? I need to create dxDrawRectangle under mapname in Race gamemode, but this text is created by library, so how to make it? mapdisplay = dxText:create('Map: none', 2, screenHeight - dxGetFontHeight(0.7, 'bankgothic')/2, false, 'bankgothic', 0.7, 'left') Link to comment
.:HyPeX:. Posted October 24, 2013 Share Posted October 24, 2013 ehm, normally you are creating the text so you should know it yourself EDIT: local lala= string.find(mapdisplay, %a) local saca = #lala outputchatBox("total leters: '".. saca .."' !", source) PD: check under patterns section to modify the %a: http://www.gammon.com.au/scripts/doc.ph ... tring.find Link to comment
Mefisto_PL Posted October 24, 2013 Author Share Posted October 24, 2013 Don't working. dxDrawRectangle ( 2, screenHeight - dxGetFontHeight(0.7, 'bankgothic')/2, dxGetTextWidth(mapdisplay), y/2, tocolor ( 0, 0, 0, 150 ) ) g_dxGUI = { ranknum = dxText:create('1', screenWidth - 60, screenHeight - 95, false, 'bankgothic', 2, 'right'), ranksuffix = dxText:create('st', screenWidth - 40, screenHeight - 86, false, 'bankgothic', 1), checkpoint = dxText:create('0/0', screenWidth - 15, screenHeight - 54, false, 'bankgothic', 0.8, 'right'), timepassed = dxText:create('0:00:00', screenWidth - 10, screenHeight - 25, false, 'bankgothic', 0.7, 'right'), mapdisplay = dxText:create('Map: none', 2, screenHeight - dxGetFontHeight(0.7, 'bankgothic')/2, false, 'bankgothic', 0.7, 'left') } Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now