getId
getId: (WidgetItem) -> numberThe item id.
WidgetItem.new(…)| Method | Returns | Description |
|---|---|---|
getId() | number | The item id. |
getQuantity() | number | The quantity. |
getWidget() | Widget? | The widget drawing it. |
getCanvasBounds() | Rectangle | (WidgetItem) -> Rectangle: Where it is drawn, the drag included. The same Rectangle while the item is drawn there (and a new one once a… |
getCanvasBounds(boolean) | Rectangle? | |
getDraggingCanvasBounds() | Rectangle? | Where it is drawn while dragged, nil when it is not: the same Rectangle getCanvasBounds() hands out while it is dragged. |
getCanvasLocation() | Point | The top-left corner of getCanvasBounds(). |
new(number, number, Rectangle, Widget?, Rectangle?) | WidgetItem | A widget item: the item, its quantity, where it is drawn, the widget drawing it, and where it is drawn while dragged (nil when it is not). |
| Method | Returns | Description |
|---|---|---|
WidgetItemClass.new | WidgetItem | A widget item: the item, its quantity, where it is drawn, the widget drawing it, and where it is drawn while dragged (nil when it is not). |
getIdgetId: (WidgetItem) -> numberThe item id.
getQuantitygetQuantity: (WidgetItem) -> numberThe quantity.
getWidgetgetWidget: (WidgetItem) -> Widget?The widget drawing it.
getCanvasBoundsgetCanvasBounds: ((WidgetItem) -> Rectangle) & ((WidgetItem, boolean) -> Rectangle?)(WidgetItem) -> Rectangle: Where it is drawn, the drag included. The same Rectangle while the item is drawn there (and a new one once a plugin changed the one it had).
(WidgetItem, boolean) -> Rectangle?: Where it is drawn: while dragged (nil when it is not) or not. The same Rectangle getCanvasBounds() hands out for those bounds.
getDraggingCanvasBoundsgetDraggingCanvasBounds: (WidgetItem) -> Rectangle?Where it is drawn while dragged, nil when it is not: the same Rectangle getCanvasBounds() hands out while it is dragged.
getCanvasLocationgetCanvasLocation: (WidgetItem) -> PointThe top-left corner of getCanvasBounds().
newnew: (number, number, Rectangle, Widget?, Rectangle?) -> WidgetItemA widget item: the item, its quantity, where it is drawn, the widget drawing it, and where it is drawn while dragged (nil when it is not).