Prototype/ItemWithLabel: Difference between revisions

From Official Factorio Wiki
Jump to navigation Jump to search
m (→‎Basics: fixed link)
(0.16)
Line 1: Line 1:
==Basics==
==Basics==
Inherits from [[prototype/Item]]. Like a normal item but with the ability to have a colored label.
Like a normal item but with the ability to have a colored label. Extends [[Prototype/Item]].
  type = "item-with-label"


== Optional properties ==
== Optional properties ==
This prototype inherits all the properties from [[Prototype/Item]].


=== default_label_color ===
=== default_label_color ===
The default label color the item will use or if not provided it uses the game default item text color.
'''Type''': [[Types/Color]]
  default_label_color = {r=1, g=1, b=0, a=1}
 
'''Default''': Default item text color
 
The default label color the item will use.


=== draw_label_for_cursor_render ===
=== draw_label_for_cursor_render ===
If true, the item will draw its label when held in the cursor in place of the item count. Defaults to false if not defined.
'''Type''': [[Types/bool]]
  draw_label_for_cursor_render = true
 
'''Default''': false
 
If the item will draw its label when held in the cursor in place of the item count.

Revision as of 09:27, 22 May 2018

Basics

Like a normal item but with the ability to have a colored label. Extends Prototype/Item.

Optional properties

This prototype inherits all the properties from Prototype/Item.

default_label_color

Type: Types/Color

Default: Default item text color

The default label color the item will use.

draw_label_for_cursor_render

Type: Types/bool

Default: false

If the item will draw its label when held in the cursor in place of the item count.