Quote:
Originally Posted by MattKan
How does he make it so that the hearts appear in the top right corner of the screen for all screen sizes?
|
Relative positioning using screenwidth and screenheight. I.e:
PHP Code:
//#CLIENTSIDE
function onCreated() {
// Centered Block
with (findimg(200)) {
x = screenwidth / 2;
y = screenheight / 2;
image = "block.png";
layer = 4;
}
// Top Right Block
with (findimg(201)) {
x = screenwidth - 64;
y = 64;
image = "block.png";
layer = 4;
}
// Bottom Right
with (findimg(202)) {
x = screenwidth - 64;
y = screenheight - 64;
image = "block.png";
layer = 4;
}
}