Computer GPU T1
Parent |
Functions
fill (x : Int, y : Int, dx : Int, dy : Int, str : String)
Draws the given character at all given positions in the given rectangle on-to the hidden screen buffer.
Details
Flags |
RuntimeSync RuntimeParallel RuntimeAsync MemberFunc |
Display Name |
Fill |
| Name | Type | Description |
|---|---|---|
X |
Int |
The x coordinate at which the rectangle should get drawn. (upper-left corner) |
Y |
Int |
The y coordinate at which the rectangle should get drawn. (upper-left corner) |
DX |
Int |
The width of the rectangle. |
DY |
Int |
The height of the rectangle. |
String |
String |
The character you want to use for the rectangle. (first char in the given string) |
flush ()
Flushes the hidden screen buffer to the visible screen buffer and so makes the draw calls visible.
Details
Flags |
RuntimeSync RuntimeParallel MemberFunc |
Display Name |
Flush |
getBuffer () → buffer : Struct<GPUT1Buffer>
Returns the back buffer as struct to be able to use advanced buffer handling functions. (struct is a copy)
Details
Flags |
RuntimeSync RuntimeParallel RuntimeAsync MemberFunc |
Display Name |
Get Buffer |
| Name | Type | Description |
|---|---|---|
Buffer |
Struct<GPUT1Buffer> |
The Buffer that is currently the back buffer. |
getScreen () → screen : Object<Object>
Returns the currently bound screen.
Details
Flags |
RuntimeSync RuntimeParallel MemberFunc |
Display Name |
Get Screen |
| Name | Type | Description |
|---|---|---|
Screen |
Object<Object> |
The currently bound screen. |
getSize () → (w : Int, h : Int)
Returns the size of the text-grid (and buffer).
Details
Flags |
RuntimeSync RuntimeParallel MemberFunc |
Display Name |
Get Size |
| Name | Type | Description |
|---|---|---|
Width |
Int |
The width of the text-gird. |
Height |
Int |
The height of the text-grid. |
setBackground (r : Float, g : Float, b : Float, a : Float)
Changes the background color that is used for the next draw calls.
Details
Flags |
RuntimeSync RuntimeParallel RuntimeAsync MemberFunc |
Display Name |
Set Background Color |
| Name | Type | Description |
|---|---|---|
Red |
Float |
The red portion of the background color. (0.0 - 1.0) |
Green |
Float |
The green portion of the background color. (0.0 - 1.0) |
Blue |
Float |
The blue portion of the background color. (0.0 - 1.0) |
Alpha |
Float |
The opacity of the background color. (0.0 - 1.0) |
setBuffer (buffer : Struct<GPUT1Buffer>)
Allows to change the back buffer of the GPU to the given buffer.
Details
Flags |
RuntimeSync RuntimeParallel RuntimeAsync MemberFunc |
Display Name |
Set Buffer |
| Name | Type | Description |
|---|---|---|
Buffer |
Struct<GPUT1Buffer> |
The Buffer you want to now use as back buffer. |
setForeground (r : Float, g : Float, b : Float, a : Float)
Changes the foreground color that is used for the next draw calls.
Details
Flags |
RuntimeSync RuntimeParallel RuntimeAsync MemberFunc |
Display Name |
Set Foreground Color |
| Name | Type | Description |
|---|---|---|
Red |
Float |
The red portion of the foreground color. (0.0 - 1.0) |
Green |
Float |
The green portion of the foreground color. (0.0 - 1.0) |
Blue |
Float |
The blue portion of the foreground color. (0.0 - 1.0) |
Alpha |
Float |
The opacity of the foreground color. (0.0 - 1.0) |
setSize (w : Int, h : Int)
Changes the size of the text-grid (and buffer).
Details
Flags |
RuntimeSync RuntimeParallel MemberFunc |
Display Name |
Set Size |
| Name | Type | Description |
|---|---|---|
Width |
Int |
The width of the text-gird. |
Height |
Int |
The height of the text-grid. |
setText (x : Int, y : Int, str : String)
Draws the given text at the given position to the hidden screen buffer.
Details
Flags |
RuntimeSync RuntimeParallel RuntimeAsync MemberFunc |
Display Name |
Set Text |
| Name | Type | Description |
|---|---|---|
X |
Int |
The x coordinate at which the text should get drawn. |
Y |
Int |
The y coordinate at which the text should get drawn. |
String |
String |
The text you want to draw on-to the buffer. |
Signals
OnKeyChar (String Character c, Int Button btn)
Triggers when a character key got 'clicked' and essentially a character got typed in, usful for text input.
Details
| Name | Type | Description |
|---|---|---|
Character |
String |
The character that got typed in as string. |
Button |
Int |
The Button-Bit-Field providing information about the key release event. Bits: 1th left mouse pressed 2th right mouse button pressed 3th ctrl key pressed 4th shift key pressed 5th alt key pressed 6th cmd key pressed |
OnKeyDown (Int C c, Int Code code, Int Button btn)
Triggers when a key got pressed.
Details
| Name | Type | Description |
|---|---|---|
C |
Int |
The ASCII number of the character typed in. |
Code |
Int |
The number code of the pressed key. |
Button |
Int |
The Button-Bit-Field providing information about the key press event. Bits: 1th left mouse pressed 2th right mouse button pressed 3th ctrl key pressed 4th shift key pressed 5th alt key pressed 6th cmd key pressed |
OnKeyUp (Int C c, Int Code code, Int Button btn)
Triggers when a key got released.
Details
| Name | Type | Description |
|---|---|---|
C |
Int |
The ASCII number of the character typed in. |
Code |
Int |
The number code of the pressed key. |
Button |
Int |
The Button-Bit-Field providing information about the key release event. Bits: 1th left mouse pressed 2th right mouse button pressed 3th ctrl key pressed 4th shift key pressed 5th alt key pressed 6th cmd key pressed |
OnMouseDown (Int X x, Int Y y, Int Button btn)
Triggers when a mouse button got pressed.
Details
| Name | Type | Description |
|---|---|---|
X |
Int |
The x position of the cursor. |
Y |
Int |
The y position of the cursor. |
Button |
Int |
The Button-Bit-Field providing information about the pressed button event. Bits: 1th left mouse pressed 2th right mouse button pressed 3th ctrl key pressed 4th shift key pressed 5th alt key pressed 6th cmd key pressed |
OnMouseMove (Int X x, Int Y y, Int Button btn)
Triggers when the mouse cursor moves on the screen.
Details
| Name | Type | Description |
|---|---|---|
X |
Int |
The x position of the cursor. |
Y |
Int |
The y position of the cursor. |
Button |
Int |
The Button-Bit-Field providing information about the move event. Bits: 1th left mouse pressed 2th right mouse button pressed 3th ctrl key pressed 4th shift key pressed 5th alt key pressed 6th cmd key pressed |
OnMouseUp (Int X x, Int Y y, Int Button btn)
Triggers when a mouse button got released.
Details
| Name | Type | Description |
|---|---|---|
X |
Int |
The x position of the cursor. |
Y |
Int |
The y position of the cursor. |
Button |
Int |
The Button-Bit-Field providing information about the released button event. Bits: 1th left mouse pressed 2th right mouse button pressed 3th ctrl key pressed 4th shift key pressed 5th alt key pressed 6th cmd key pressed |