Jump to content

Best way of doing this?


megaman54

Recommended Posts

For GUI I use this

sx,sy = guiGetScreenSize() 
loginWindow = guiCreateWindow(0.020*sx,0.290*sy,0.300*sx,0.550*sy,"",false) 

Also

local screenWidth, screenHeight = guiGetScreenSize() 
dxDrawText ( "You have level up!", 05, screenHeight - 100, screenWidth, screenHeight, tocolor ( 0, 0, 0, 255 ), 4, "pricedown" ) 

Edited by Guest
Link to comment

You can use this functions for dx drawing

function dxDrawRelativeRectangle( posX, posY, width, height,color,postGUI ) 
    local resolutionX = 1280  
    local resolutionY = 1024 
    local sWidth,sHeight = guiGetScreenSize( ) 
    return dxDrawRectangle(  
        ( posX/resolutionX )*sWidth, 
        ( posY/resolutionY )*sHeight, 
        ( width/resolutionX )*sWidth, 
        ( height/resolutionY )*sHeight, 
        color, 
        postGUI 
    ) 
end 
  
function dxDrawRelativeText( text,posX,posY,right,bottom,color,scale,mixed_font,alignX,alignY,clip,wordBreak,postGUI ) 
    local resolutionX = 1280  
    local resolutionY = 1024  
    local sWidth,sHeight = guiGetScreenSize( ) 
    return dxDrawText(  
        tostring(text), 
        ( posX/resolutionX )*sWidth, 
        ( posY/resolutionY )*sHeight, 
        ( right/resolutionX )*sWidth, 
        ( bottom/resolutionY)*sHeight, 
        color,( sWidth/resolutionX )*scale, 
        mixed_font, 
        alignX, 
        alignY, 
        clip, 
        wordBreak, 
        postGUI 
    ) 
end 
  
function dxDrawRelativeImage( posX, posY, width, height, mixed,rotation,rotationCenterOffsetX,rotationCenterOffsetY,color,postGUI ) 
    local resolutionX = 1280  
    local resolutionY = 1024  
    local sWidth,sHeight = guiGetScreenSize( ) 
    return dxDrawImage (  
        ( posX/resolutionX )*sWidth, 
        ( posY/resolutionY )*sHeight, 
        ( width/resolutionX )*sWidth, 
        ( height/resolutionY )*sHeight, 
        mixed, 
        rotation, 
        rotationCenterOffsetX, 
        rotationCenterOffsetY, 
        color, 
        postGUI 
    ) 
end 

Link to comment

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...