Blockland Files > Add-Ons

Image2Brick

Pages: << < (2/4) > >>

Mega-Bear:

that's a good looking GUI right there, nice work

infomaniac1207:

This looks pretty neat

Mr.Noßody:

Is this client sided?

Dilbert:


--- Quote from: jes00 on June 17, 2019, 01:51:11 PM ---If you make a GuiBitmapCtrl then you can get individual pixel colors from it with .getPixelColor(x, y); but the y coordinate is actually the coordinate relative to the Blockland window instead of the GuiBitmapCtrl(or something like that), so I made this function to fix it. It's also kind of trash because if the pixel is obstructed by anything(if it's something outside of the Blockland application then it's fine) then it'll get the color of the thing obstructing it.

--- Code: ---function guiBitmapCtrl::getRealPixelColor(%obj, %x, %y)
{
%realY = -2 * getWord(%obj.getScreenPosition(), 1);
%realY += getWord(getRes(), 1) - %y;
%realY--;

return %obj.getPixelColor(%x, %realY);
}

--- End code ---

--- End quote ---
can't you just pop all the guis and push just the guibitmapcontrol briefly, cache the pixels and then push all the guis back?

jes00:


--- Quote from: Mr.Noßody on June 17, 2019, 04:40:16 PM ---Is this client sided?

--- End quote ---
Yes.

--- Quote from: Dilbert on June 17, 2019, 05:04:13 PM ---can't you just pop all the guis and push just the guibitmapcontrol briefly, cache the pixels and then push all the guis back?

--- End quote ---
Didn't think about doing something like that. Might work.

Pages: << < (2/4) > >>

Go to full version