summaryrefslogtreecommitdiffstatshomepage
path: root/docs/source/techspecs
diff options
context:
space:
mode:
author Vas Crabb <vas@vastheman.com>2021-11-02 07:53:18 +1100
committer Vas Crabb <vas@vastheman.com>2021-11-02 07:53:18 +1100
commit8ab63e2072f6cfe19b8f8e2acfbd29754d282c79 (patch)
tree5e05b0a71e44d3b5466a28e9232b32252a96d620 /docs/source/techspecs
parent782359169952d8fd7bf737ff45a0c3650ca12c7e (diff)
Fix various usability issues:
frontend: Made it so you can press UI On Screen Display to hide the Analog Controls menu and see the response to your inputs without the risk of changing settings, and see more axes at once and scroll them for systems with very large number of axes. Also ensure the axis being configured is visible when the menu is visible, and made the menu behave a bit more like the system input assignments menu (including previous/next group navigation). frontend: Allow Lua to draw to the UI container - this addresses the main complaint in #7475. Note that drawing to the UI container will draw over any UI elements, including menus. Plugins can check menu_active to avoid drawing over menus. Also removed some unnecessary use of sol::overload. frontend: Improved info/image box navigation on the system/softwre selection menus, and cleaned up some leftover code that came from the copy/pasted event handling functions. frontend: Fixed sliders menu not handling Alt+Shift as intended (thanks Coverity). Fixed a couple of harmless Coverity errors, too. emu/inpttype.ipp: Made the default assignment for Save State recognise right shift. plugins: Added next/previous group navigation to input macro edit menu. docs: Added basic description of the system and software selection menus, and corrected a couple of errors in the Lua reference.
Diffstat (limited to 'docs/source/techspecs')
-rw-r--r--docs/source/techspecs/luareference.rst121
1 files changed, 94 insertions, 27 deletions
diff --git a/docs/source/techspecs/luareference.rst b/docs/source/techspecs/luareference.rst
index 38ae1476b3a..623d4738407 100644
--- a/docs/source/techspecs/luareference.rst
+++ b/docs/source/techspecs/luareference.rst
@@ -804,12 +804,12 @@ screen:pixels()
screen:draw_box(left, top, right, bottom, [line], [fill])
Draws an outlined rectangle with edges at the specified positions.
- Coordinates are floating-point numbers in units of screen pixels, with the
- origin at (0, 0). Note that screen pixels often aren’t square. The
- coordinate system is rotated if the screen is rotated, which is usually the
- case for vertical-format screens. Before rotation, the origin is at the top
- left, and coordinates increase to the right and downwards. Coordinates are
- limited to the screen area.
+ Coordinates are floating-point numbers in units of emulated screen pixels,
+ with the origin at (0, 0). Note that emulated screen pixels often aren’t
+ square. The coordinate system is rotated if the screen is rotated, which is
+ usually the case for vertical-format screens. Before rotation, the origin
+ is at the top left, and coordinates increase to the right and downwards.
+ Coordinates are limited to the screen area.
The fill and line colours are in alpha/red/green/blue (ARGB) format.
Channel values are in the range 0 (transparent or off) to 255 (opaque or
@@ -822,12 +822,12 @@ screen:draw_box(left, top, right, bottom, [line], [fill])
screen:draw_line(x1, y1, x2, y2, bottom, [color])
Draws a line from (x1, y1) to (x2, y2).
- Coordinates are floating-point numbers in units of screen pixels, with the
- origin at (0, 0). Note that screen pixels often aren’t square. The
- coordinate system is rotated if the screen is rotated, which is usually the
- case for vertical-format screens. Before rotation, the origin is at the top
- left, and coordinates increase to the right and downwards. Coordinates are
- limited to the screen area.
+ Coordinates are floating-point numbers in units of emulated screen pixels,
+ with the origin at (0, 0). Note that emulated screen pixels often aren’t
+ square. The coordinate system is rotated if the screen is rotated, which is
+ usually the case for vertical-format screens. Before rotation, the origin
+ is at the top left, and coordinates increase to the right and downwards.
+ Coordinates are limited to the screen area.
The line colour is in alpha/red/green/blue (ARGB) format. Channel values
are in the range 0 (transparent or off) to 255 (opaque or full intensity),
@@ -847,21 +847,21 @@ screen:draw_text(x|justify, y, text, [foreground], [background])
right-aligned at the right edge of the screen, respectively. The second
argument specifies the Y coordinate of the maximum ascent of the text.
- Coordinates are floating-point numbers in units of screen pixels, with the
- origin at (0, 0). Note that screen pixels often aren’t square. The
- coordinate system is rotated if the screen is rotated, which is usually the
- case for vertical-format screens. Before rotation, the origin is at the top
- left, and coordinates increase to the right and downwards. Coordinates are
- limited to the screen area.
-
- The foreground and background colours is in alpha/red/green/blue (ARGB)
- format. Channel values are in the range 0 (transparent or off) to 255 (opaque or full intensity),
- inclusive. Colour channel values are not pre-multiplied by the alpha value.
- The channel values must be packed into the bytes of a 32-bit unsigned
- integer, in the order alpha, red, green, blue from most-significant to
- least-significant byte. If the foreground colour is not provided, the UI
- text colour is used; if the background colour is not provided, the UI
- background colour is used.
+ Coordinates are floating-point numbers in units of emulated screen pixels,
+ with the origin at (0, 0). Note that emulated screen pixels often aren’t
+ square. The coordinate system is rotated if the screen is rotated, which is
+ usually the case for vertical-format screens. Before rotation, the origin
+ is at the top left, and coordinates increase to the right and downwards.
+ Coordinates are limited to the screen area.
+
+ The foreground and background colours are in alpha/red/green/blue (ARGB)
+ format. Channel values are in the range 0 (transparent or off) to 255
+ (opaque or full intensity), inclusive. Colour channel values are not
+ pre-multiplied by the alpha value. The channel values must be packed into
+ the bytes of a 32-bit unsigned integer, in the order alpha, red, green, blue
+ from most-significant to least-significant byte. If the foreground colour
+ is not provided, the UI text colour is used; if the background colour is not
+ provided, it is fully transparent.
Properties
^^^^^^^^^^
@@ -2412,6 +2412,73 @@ manager.machine.render.ui_container
manager.machine.screens[tag].container
Gets the render container used to draw a given screen.
+Methods
+^^^^^^^
+
+container:draw_box(left, top, right, bottom, [line], [fill])
+ Draws an outlined rectangle with edges at the specified positions.
+
+ Coordinates are floating-point numbers in the range of 0 (zero) to 1 (one),
+ with (0, 0) at the top left and (1, 1) at the bottom right of the window or
+ screen that showss the user interface. Note that the aspect ratio is
+ usually not square. Coordinates are limited to the window or screen area.
+
+ The fill and line colours are in alpha/red/green/blue (ARGB) format.
+ Channel values are in the range 0 (transparent or off) to 255 (opaque or
+ full intensity), inclusive. Colour channel values are not pre-multiplied by
+ the alpha value. The channel values must be packed into the bytes of a
+ 32-bit unsigned integer, in the order alpha, red, green, blue from
+ most-significant to least-significant byte. If the line colour is not
+ provided, the UI text colour is used; if the fill colour is not provided,
+ the UI background colour is used.
+container:draw_line(x1, y1, x2, y2, bottom, [color])
+ Draws a line from (x1, y1) to (x2, y2).
+
+ Coordinates are floating-point numbers in the range of 0 (zero) to 1 (one),
+ with (0, 0) at the top left and (1, 1) at the bottom right of the window or
+ screen that showss the user interface. Note that the aspect ratio is
+ usually not square. Coordinates are limited to the window or screen area.
+
+ Coordinates are floating-point numbers in units of screen pixels, with the
+ origin at (0, 0). Note that screen pixels often aren’t square. The
+ coordinate system is rotated if the screen is rotated, which is usually the
+ case for vertical-format screens. Before rotation, the origin is at the top
+ left, and coordinates increase to the right and downwards. Coordinates are
+ limited to the screen area.
+
+ The line colour is in alpha/red/green/blue (ARGB) format. Channel values
+ are in the range 0 (transparent or off) to 255 (opaque or full intensity),
+ inclusive. Colour channel values are not pre-multiplied by the alpha value.
+ The channel values must be packed into the bytes of a 32-bit unsigned
+ integer, in the order alpha, red, green, blue from most-significant to
+ least-significant byte. If the line colour is not provided, the UI text
+ colour is used.
+container:draw_text(x|justify, y, text, [foreground], [background])
+ Draws text at the specified position. If the screen is rotated the text
+ will be rotated.
+
+ If the first argument is a number, the text will be left-aligned at this X
+ coordinate. If the first argument is a string, it must be ``"left"``,
+ ``"center"`` or ``"right"`` to draw the text left-aligned at the
+ left edge of the window or screen, horizontally centred in the window or
+ screen, or right-aligned at the right edge of the window or screen,
+ respectively. The second argument specifies the Y coordinate of the maximum
+ ascent of the text.
+
+ Coordinates are floating-point numbers in the range of 0 (zero) to 1 (one),
+ with (0, 0) at the top left and (1, 1) at the bottom right of the window or
+ screen that showss the user interface. Note that the aspect ratio is
+ usually not square. Coordinates are limited to the window or screen area.
+
+ The foreground and background colours are in alpha/red/green/blue (ARGB)
+ format. Channel values are in the range 0 (transparent or off) to 255
+ (opaque or full intensity), inclusive. Colour channel values are not
+ pre-multiplied by the alpha value. The channel values must be packed into
+ the bytes of a 32-bit unsigned integer, in the order alpha, red, green, blue
+ from most-significant to least-significant byte. If the foreground colour
+ is not provided, the UI text colour is used; if the background colour is not
+ provided, it is fully transparent.
+
Properties
^^^^^^^^^^