mirror of
https://github.com/MightyPirates/OpenComputers.git
synced 2025-09-18 19:56:17 -04:00
Added method to query the address of the screen a GPU is currently bound to.
This commit is contained in:
parent
a74157cb3e
commit
1e3b4a2344
@ -71,6 +71,9 @@ abstract class GraphicsCard extends component.ManagedComponent {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Callback(doc = """function():string -- Get the address of the screen the GPU is currently bound to.""")
|
||||||
|
def getScreen(context: Context, args: Arguments): Array[AnyRef] = screen(s => result(s.node.address))
|
||||||
|
|
||||||
@Callback(direct = true, doc = """function():number, boolean -- Get the current background color and whether it's from the palette or not.""")
|
@Callback(direct = true, doc = """function():number, boolean -- Get the current background color and whether it's from the palette or not.""")
|
||||||
def getBackground(context: Context, args: Arguments): Array[AnyRef] =
|
def getBackground(context: Context, args: Arguments): Array[AnyRef] =
|
||||||
screen(s => result(s.getBackgroundColor, s.isBackgroundFromPalette))
|
screen(s => result(s.getBackgroundColor, s.isBackgroundFromPalette))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user