Jump to content

[HELP]DxDrawImage


spoty

Recommended Posts

Posted

hi

i wanted to edit this line from my script so it shows a image inplace of text

but i dont know how to edit this because this shows a dxDrawText from x1 to x5

but i wanne replace it with images that shows x1 to x5 can someone help me?

or explain me how to do it

local temp2 = string.format("Factor: X%d\n%s",mult,mult~=5 and string.format("Gain X%d with %d",mult+1,tablamult[mult]) or "MAX") 
    dxDrawText(temp2, 20,195,screenWidth,screenHeight, Yellow, 1.2, "sans","left","top", false,true,false) 

n-560x95_FFFFFF_FFFFFF_000000_000000.png
Posted

yeah because right now it says in game

X1 gain 350 to get X2

and i wanne just change it all to a image that i already have maded

so it shows the X1 image when i gained x1 and when i gain x2 it needs to show to x2 image

n-560x95_FFFFFF_FFFFFF_000000_000000.png
Posted
can you explaine your problem better.

i wanne make this line thats crrently showing dxDrawText x1, x2, x3, x4, x5,

but i wanne make it showing image's inplace of dxDrawText

i have 5 images so how can i make it exact like the line from topic ?

n-560x95_FFFFFF_FFFFFF_000000_000000.png
Posted
can you explaine your problem better.

i wanne make this line thats crrently showing dxDrawText x1, x2, x3, x4, x5,

but i wanne make it showing image's inplace of dxDrawText

i have 5 images so how can i make it exact like the line from topic ?

one by one use

dxDrawImage() 

Do not yield your back to your enemy, might feel something strange in your ass.

Two things are infinite the universe and human stupidity and i'm not sure about the universe.

UF: IsTextInGridList | GetGridListRowIndexFromText | Table.removeValue | removeHex | dxDrawTriangle

Skype: SaSuki102 | About Me | Youtube channel | Lua Tips & Tricks | Lua Strings | Lua Tables | Lua Operators

Posted
can you explaine your problem better.

i wanne make this line thats crrently showing dxDrawText x1, x2, x3, x4, x5,

but i wanne make it showing image's inplace of dxDrawText

i have 5 images so how can i make it exact like the line from topic ?

one by one use

dxDrawImage() 

i have this no error's but it isnt working

local temp2 = string.format(mult,mult~=5 and string.format(mult+1,tablamult[mult])) 
    dxDrawImage (temp2, 20,195,screenWidth,screenHeight, 'x1.png', false,true,false) 

n-560x95_FFFFFF_FFFFFF_000000_000000.png
Posted

dxDrawImage must be like this.

local screenWidth, screenHeight = guiGetScreenSize ( ) 
dxDrawImage (screenWidth*(20/1366),screenHeight*(195/768),screenWidth*(1366/1366),screenHeight*(768/768),  'x1.png',0,0,0, tocolor(255, 255, 255, 255), false) 

Do not yield your back to your enemy, might feel something strange in your ass.

Two things are infinite the universe and human stupidity and i'm not sure about the universe.

UF: IsTextInGridList | GetGridListRowIndexFromText | Table.removeValue | removeHex | dxDrawTriangle

Skype: SaSuki102 | About Me | Youtube channel | Lua Tips & Tricks | Lua Strings | Lua Tables | Lua Operators

  • Moderators
Posted
local screenWidth, screenHeight = guiGetScreenSize ( ) 
----------------------------------------------------------------------------------- 
  
 -- function -- 
  
for i=1,5 do 
    local imageWidth = screenWidth*(1366/1366) 
    dxDrawImage (screenWidth*(20/1366)+((i-1)*imageWidth) ,screenHeight*(195/768),imageWidth,screenHeight*(768/768),  'x' .. i .. '.png',0,0,0, tocolor(255, 255, 255, 255), false) 
end 
  
  

You image width and height is too BIG/LARGE/Or what ever. You have to fill that in correctly!

But this is how you create images next to each other in a line.

Do you want to improve your Lua programming skills and make less mistakes?   Start with Lua Language Server!   🙀

 

  Useful functions  3x 

  Tutorials  4x 

 

Posted
local screenWidth, screenHeight = guiGetScreenSize ( ) 
----------------------------------------------------------------------------------- 
  
 -- function -- 
  
for i=1,5 do 
    local imageWidth = screenWidth*(1366/1366) 
    dxDrawImage (screenWidth*(20/1366)+((i-1)*imageWidth) ,screenHeight*(195/768),imageWidth,screenHeight*(768/768),  'x' .. i .. '.png',0,0,0, tocolor(255, 255, 255, 255), false) 
end 
  
  

You image width and height is too BIG/LARGE/Or what ever. You have to fill that in correctly!

But this is how you create images next to each other in a line.

ok thnx this is what i needed thnx alot :D

n-560x95_FFFFFF_FFFFFF_000000_000000.png

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...