This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionLast revisionBoth sides next revision | ||
functions:addons:rect [2016/08/17 02:09] – [RectIsGrabbed] monsterovich | functions:addons:rect [2017/07/13 18:42] – monsterovich | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== Rectangle API ====== | ====== Rectangle API ====== | ||
- | This is a simple library that implements basic UI elements in ACS. This library is an **addon** for the [[functions: | + | This is a simple library that implements basic UI elements in ACS. This library is an **addon** for the cursor library. |
- | <note tip> | + | <note tip> |
Define '' | Define '' | ||
+ | |||
+ | ===== Usage ===== | ||
+ | |||
+ | < | ||
+ | ... | ||
+ | |||
+ | #define ACSUTILS_RECTLIB_USERVARS 1 // user defined | ||
+ | #include " | ||
+ | #include " | ||
+ | |||
+ | ... | ||
+ | </ | ||
===== Example ===== | ===== Example ===== | ||
Line 30: | Line 42: | ||
if (RectIsPressed(i, | if (RectIsPressed(i, | ||
log(s:" | log(s:" | ||
+ | |||
+ | for (int j = 0; j <= rects; j++) | ||
+ | { | ||
+ | if (RectIntersects(i, | ||
+ | log(s:" | ||
+ | } | ||
HudSetPoint(RectX1(i), | HudSetPoint(RectX1(i), |