Difference between revisions of "AGIWiki/block"

Jump to navigation Jump to search
308 bytes added ,  15:13, 25 October 2018
m
Text replacement - "<source lang=" to "<syntaxhighlight lang="
m (Created page with "__NOTOC__ {{AGIWiki}} The '''block''' command programmatically creates an invisible rectangular block to restrict screen object movement. block([[...")
 
m (Text replacement - "<source lang=" to "<syntaxhighlight lang=")
 
(4 intermediate revisions by 2 users not shown)
Line 1: Line 1:
__NOTOC__
__NOTOC__
{{AGIWiki}}
{{AGIWiki/Object and View commands}}
The '''block''' command programmatically creates an invisible rectangular block to restrict [[AGIWiki/Animated object|screen object]] movement.


{{AGIWiki}}
== Syntax ==


The '''block''' command programmatically creates an invisible rectangular block to restrict [[AGIWiki/Animated object|screen object]] movement.
block([[AGIWiki/Number|byt]] left, [[AGIWiki/Number|byt]] top, [[AGIWiki/Number|byt]] right, [[AGIWiki/Number|byt]] bottom);


block([[AGIWiki/Number|number]] left, [[AGIWiki/Number|number]] top, [[AGIWiki/Number|number]] right, [[AGIWiki/Number|number]] bottom);
== Remarks ==


AGI expects the coordinates to be in upper-left to lower-right format. <code>left</code> must be less than or equal to <code>right</code> and <code>top</code> must be less than or equal to <code>bottom</code>, or the test will always fail.
Objects on the screen are not allowed to cross the borders of the block (regardless of whether they are inside the block or outside), unless an [[AGIWiki/Ignore.blocks|ignore.blocks]] command has been issued for that object.
Objects on the screen are not allowed to cross the borders of the block (regardless of whether they are inside the block or outside), unless an [[AGIWiki/Ignore.blocks|ignore.blocks]] command has been issued for that object.


Line 27: Line 31:


The following code creates a block rectangle whose top-left corner is at (10, 25) and whose bottom-right corner is at (100, 120):
The following code creates a block rectangle whose top-left corner is at (10, 25) and whose bottom-right corner is at (100, 120):
<syntax type = "C++">
<syntaxhighlight lang="cpp">
  block(10, 25, 100, 120);
  block(10, 25, 100, 120);
</syntax>
</syntaxhighlight>


== Technical Information ==
== Technical Information ==
TrustedUser
2,147

edits

Navigation menu