Thank you GVovkiv, thank you pgimeno, both of your solution works!
At the end I will go for GVovkiv's solution, because using the printf solution, when the text scale, the number of words change during the movement.
Thanks again!
Search found 12 matches
- Sun Mar 07, 2021 5:44 pm
- Forum: Support and Development
- Topic: Scaling text in printf
- Replies: 6
- Views: 3659
- Sat Mar 06, 2021 11:00 pm
- Forum: Support and Development
- Topic: Scaling text in printf
- Replies: 6
- Views: 3659
Re: Scaling text in printf
string = "Hello, World!" ww, wh = 0, 0 msgFont = love.graphics.newFont(24) msgFontHeight = msgFont:getHeight() msgTextOpacity = 300 msgTextSize = 1 function love.update(dt) msgTextOpacity = msgTextOpacity - 300*dt msgTextSize = msgTextSize + dt ww, wh = love.graphics.getWidth() / msgTextS...
- Sat Mar 06, 2021 5:57 pm
- Forum: Support and Development
- Topic: Scaling text in printf
- Replies: 6
- Views: 3659
Scaling text in printf
Hello, i'm triyng to write a text centered in the screen that fade out and increase in size. I wrote the following code, but the text, when increase, move from the center of the screen to the right (i wold like to mantain it centerd). ww, wh = love.graphics.getDimensions() msgFont = love.graphics.ne...
- Fri Feb 26, 2021 5:10 pm
- Forum: Support and Development
- Topic: Actual resolution
- Replies: 3
- Views: 3261
Re: Actual resolution
Windows global GUI scale is 125-150%. https://love2d.org/forums/viewtopic.php?f=4&t=90052 If you want to make Windows not apply its own DPI scaling to love, there are some DPI scaling options provided by Microsoft in the Compatibility section of the exe Properties menu available if you right cl...
- Fri Feb 26, 2021 3:15 pm
- Forum: Support and Development
- Topic: Actual resolution
- Replies: 3
- Views: 3261
Re: Actual resolution
Nevermind my stupid question: i noticed I had an option in window to scale up the appllication's dimensions.
:-)
:-)
- Fri Feb 26, 2021 2:15 pm
- Forum: Support and Development
- Topic: Actual resolution
- Replies: 3
- Views: 3261
Actual resolution
Hello, today I noticed something strange on resolution. I'm doing a game with the following parameter set in conf.lua t.window.width = 360 -- The window width (number): 360 t.window.height = 640 -- The window height (number): 640 t.window.borderless = true -- Remove all border visuals from the windo...
- Thu Dec 31, 2020 1:16 pm
- Forum: Support and Development
- Topic: Function that switch values in a table
- Replies: 2
- Views: 4206
Re: Function that switch values in a table
Thank you for the tip, I've modified the code according it and now it works as i had in mind. Thanks! function switchTableParameter(param, selectedparameter) selectedparameter = selectedparameter + 1 if selectedparameter > #param then selectedparameter = 1 end return selectedparameter end
- Wed Dec 30, 2020 10:42 pm
- Forum: Support and Development
- Topic: Function that switch values in a table
- Replies: 2
- Views: 4206
Function that switch values in a table
Hello again, I'm continuing my beginner attemps. I'm trying to write a function that switch values in a table. I wrote the following funcition: it works if I enter in it directly the variables, but it doesn't if i try to pass the variables as parameters. Can somebody help me where i'm wrong? Thank y...
- Mon Dec 28, 2020 2:21 pm
- Forum: Support and Development
- Topic: Function that switch a boolean value
- Replies: 6
- Views: 5583
Re: Function that switch a boolean value
Another way: return the new value and set it to the test value test = true function love.draw() if test then love.graphics.print("Test true") else love.graphics.print("Test false") end end function love.mousepressed( x, y, button, istouch, presses ) if button==1 then test = swit...
- Mon Dec 28, 2020 10:22 am
- Forum: Support and Development
- Topic: Function that switch a boolean value
- Replies: 6
- Views: 5583
Function that switch a boolean value
Hi, another newbie question. I'm trying to make a function that switch a boolean value. In particular I would like to pass a parameter to this function (the parameter is the boolean variable) and the function change it to true or false. I wrote this, but nothing happen, could somebody help me? test ...