videopkr.cpp: Clean up layouts and make layouts clickable for poker and slots games.

This commit is contained in:
Vas Crabb 2020-09-18 19:30:27 +10:00
parent 81955da03e
commit 23a24fbc2c
4 changed files with 98 additions and 69 deletions

View File

@ -1104,7 +1104,7 @@ static INPUT_PORTS_START( babypkr )
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_GAMBLE_BOOK ) PORT_NAME("Books") PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_GAMBLE_BOOK ) PORT_NAME("Books")
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_IMPULSE(2) PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_IMPULSE(2)
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_START1 ) PORT_NAME("Start") PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_START1 ) PORT_NAME("Start")
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_GAMBLE_D_UP ) PORT_NAME("Double / Discard") PORT_CODE(KEYCODE_3) PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_GAMBLE_DEAL ) PORT_NAME("Double / Discard")
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_POKER_CANCEL ) PORT_NAME("Cancel / Take") PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_POKER_CANCEL ) PORT_NAME("Cancel / Take")
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_POKER_HOLD1 ) PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_POKER_HOLD1 )
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_POKER_HOLD2 ) PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_POKER_HOLD2 )

View File

@ -3,91 +3,118 @@
license:CC0 license:CC0
--> -->
<mamelayout version="2"> <mamelayout version="2">
<element name="L0" defstate="1"> <element name="L0">
<rect> <rect state="0">
<color red="0.70" green="0.70" blue="0.0" /> <color red="0.25" green="0.25" blue="0.0" />
</rect> </rect>
<text string="DRAW/TAKE" state="1"> <rect state="1">
<color red="1.00" green="1.00" blue="0.0" />
</rect>
<text string="DRAW/TAKE">
<color red="0.0" green="0.0" blue="0.0" /> <color red="0.0" green="0.0" blue="0.0" />
<bounds x="0" y="0.25" width="1" height="0.5" /> <bounds x="0" y="0.25" width="1" height="0.5" />
</text> </text>
</element> </element>
<element name="L1" defstate="1"> <element name="L1">
<rect> <rect state="0">
<color red="0.70" green="0.70" blue="0.0" /> <color red="0.25" green="0.25" blue="0.0" />
</rect> </rect>
<text string="CANCEL/DOUBLE" state="1"> <rect state="1">
<color red="1.00" green="1.00" blue="0.0" />
</rect>
<text string="CANCEL/DOUBLE">
<color red="0.0" green="0.0" blue="0.0" /> <color red="0.0" green="0.0" blue="0.0" />
<bounds x="0" y="0.25" width="1" height="0.5" /> <bounds x="0" y="0.25" width="1" height="0.5" />
</text> </text>
</element> </element>
<element name="L2" defstate="1"> <element name="L2">
<rect> <rect state="0">
<color red="0.70" green="0.0" blue=".0" /> <color red="0.25" green="0.0" blue="0.0" />
</rect> </rect>
<text string=" HOLD 1 " state="1"> <rect state="1">
<color red="1.00" green="0.0" blue="0.0" />
</rect>
<text string=" HOLD 1 ">
<color red="0.0" green="0.0" blue="0.0" /> <color red="0.0" green="0.0" blue="0.0" />
<bounds x="0" y="0.25" width="1" height="0.5" /> <bounds x="0" y="0.25" width="1" height="0.5" />
</text> </text>
</element> </element>
<element name="L3" defstate="1"> <element name="L3">
<rect> <rect state="0">
<color red="0.70" green="0.0" blue="0.0" /> <color red="0.25" green="0.0" blue="0.0" />
</rect> </rect>
<text string=" HOLD 2 " state="1"> <rect state="1">
<color red="1.00" green="0.0" blue="0.0" />
</rect>
<text string=" HOLD 2 ">
<color red="0.0" green="0.0" blue="0.0" /> <color red="0.0" green="0.0" blue="0.0" />
<bounds x="0" y="0.25" width="1" height="0.5" /> <bounds x="0" y="0.25" width="1" height="0.5" />
</text> </text>
</element> </element>
<element name="L4" defstate="1"> <element name="L4">
<rect> <rect state="0">
<color red="0.70" green="0.0" blue="0.0" /> <color red="0.25" green="0.0" blue="0.0" />
</rect> </rect>
<text string=" HOLD 3 " state="1"> <rect state="1">
<color red="1.00" green="0.0" blue="0.0" />
</rect>
<text string=" HOLD 3 ">
<color red="0.0" green="0.0" blue="0.0" /> <color red="0.0" green="0.0" blue="0.0" />
<bounds x="0" y="0.25" width="1" height="0.5" /> <bounds x="0" y="0.25" width="1" height="0.5" />
</text> </text>
</element> </element>
<element name="L5" defstate="1"> <element name="L5">
<rect> <rect state="0">
<color red="0.70" green="0.0" blue="0.0" /> <color red="0.25" green="0.0" blue="0.0" />
</rect> </rect>
<text string=" HOLD 4 " state="1"> <rect state="1">
<color red="1.00" green="0.0" blue="0.0" />
</rect>
<text string=" HOLD 4 ">
<color red="0.0" green="0.0" blue="0.0" /> <color red="0.0" green="0.0" blue="0.0" />
<bounds x="0" y="0.25" width="1" height="0.5" /> <bounds x="0" y="0.25" width="1" height="0.5" />
</text> </text>
</element> </element>
<element name="L6" defstate="1"> <element name="L6">
<rect> <rect state="0">
<color red="0.70" green="0.0" blue="0.0" /> <color red="0.25" green="0.0" blue="0.0" />
</rect> </rect>
<text string=" HOLD 5 " state="1"> <rect state="1">
<color red="1.00" green="0.0" blue="0.0" />
</rect>
<text string=" HOLD 5 ">
<color red="0.0" green="0.0" blue="0.0" /> <color red="0.0" green="0.0" blue="0.0" />
<bounds x="0" y="0.25" width="1" height="0.5" /> <bounds x="0" y="0.25" width="1" height="0.5" />
</text> </text>
</element> </element>
<element name="L7" defstate="1"> <element name="L7">
<rect> <rect state="0">
<color red="0.70" green="0.70" blue="0.0" /> <color red="0.25" green="0.25" blue="0.0" />
</rect> </rect>
<text string=" DEAL " state="1"> <rect state="1">
<color red="1.00" green="1.00" blue="0.0" />
</rect>
<text string=" DEAL ">
<color red="0.0" green="0.0" blue="0.0" /> <color red="0.0" green="0.0" blue="0.0" />
<bounds x="0" y="0.25" width="1" height="0.5" /> <bounds x="0" y="0.25" width="1" height="0.5" />
</text> </text>
</element> </element>
<element name="L8" defstate="1"> <element name="L8">
<disk> <rect state="0">
<color red="0.70" green="0.0" blue="0.0" /> <color red="0.25" green="0.0" blue="0.0" />
</disk> </rect>
<text string="BET" state="1"> <rect state="1">
<color red="1.00" green="0.0" blue="0.0" />
</rect>
<text string="BET">
<color red="0.0" green="0.0" blue="0.0" /> <color red="0.0" green="0.0" blue="0.0" />
<bounds x="0" y="0.25" width="1" height="0.5" /> <bounds x="0" y="0.25" width="1" height="0.5" />
</text> </text>
@ -111,13 +138,13 @@ license:CC0
</rect> </rect>
</element> </element>
<element name="LX" defstate="1"> <element name="LX">
<rect> <rect>
<color red="0.00" green="0.0" blue="0.0" /> <color red="0.00" green="0.0" blue="0.0" />
</rect> </rect>
</element> </element>
<element name="Dig1" defstate="1"> <element name="Dig1">
<led7seg> <led7seg>
<color red="1" green="1" blue="1" /> <color red="1" green="1" blue="1" />
</led7seg> </led7seg>
@ -128,34 +155,34 @@ license:CC0
<bounds left="0" top="0" right="4" bottom="3" /> <bounds left="0" top="0" right="4" bottom="3" />
</screen> </screen>
<element name="" ref="LX"> <element ref="LX">
<bounds x="0.0" y="3.00" width="0.01" height="0.50" /> <bounds x="0.0" y="3.00" width="0.01" height="0.50" />
</element> </element>
<element name="lamp3" ref="L8"> <element name="lamp3" ref="L8" inputtag="IN1" inputmask="0x08">
<bounds x="0.022" y="3.16" width="0.315" height="0.315" /> <bounds x="0.022" y="3.16" width="0.315" height="0.315" />
</element> </element>
<element name="lamp2" ref="L0"> <element name="lamp2" ref="L0" inputtag="IN0" inputmask="0x10" >
<bounds x="0.382" y="3.16" width="0.449" height="0.315" /> <bounds x="0.382" y="3.16" width="0.449" height="0.315" />
</element> </element>
<element name="lamp0" ref="L1"> <element name="lamp0" ref="L1" inputtag="IN0" inputmask="0x20">
<bounds x="0.876" y="3.16" width="0.449" height="0.315" /> <bounds x="0.876" y="3.16" width="0.449" height="0.315" />
</element> </element>
<element name="lamp1" ref="L2"> <element name="lamp1" ref="L2" inputtag="IN0" inputmask="0x40">
<bounds x="1.371" y="3.16" width="0.315" height="0.315" /> <bounds x="1.371" y="3.16" width="0.315" height="0.315" />
</element> </element>
<element name="lamp1" ref="L3"> <element name="lamp1" ref="L3" inputtag="IN0" inputmask="0x80">
<bounds x="1.730" y="3.16" width="0.315" height="0.315" /> <bounds x="1.730" y="3.16" width="0.315" height="0.315" />
</element> </element>
<element name="lamp1" ref="L4"> <element name="lamp1" ref="L4" inputtag="IN1" inputmask="0x01">
<bounds x="2.090" y="3.16" width="0.315" height="0.315" /> <bounds x="2.090" y="3.16" width="0.315" height="0.315" />
</element> </element>
<element name="lamp1" ref="L5"> <element name="lamp1" ref="L5" inputtag="IN1" inputmask="0x02">
<bounds x="2.449" y="3.16" width="0.315" height="0.315" /> <bounds x="2.449" y="3.16" width="0.315" height="0.315" />
</element> </element>
<element name="lamp1" ref="L6"> <element name="lamp1" ref="L6" inputtag="IN1" inputmask="0x04">
<bounds x="2.809" y="3.16" width="0.315" height="0.315" /> <bounds x="2.809" y="3.16" width="0.315" height="0.315" />
</element> </element>
<element name="lamp3" ref="L7"> <element name="lamp3" ref="L7" inputtag="IN0" inputmask="0x08">
<bounds x="3.169" y="3.16" width="0.449" height="0.315" /> <bounds x="3.169" y="3.16" width="0.449" height="0.315" />
</element> </element>
@ -180,6 +207,5 @@ license:CC0
</element> </element>
</repeat> </repeat>
</repeat> </repeat>
</view> </view>
</mamelayout> </mamelayout>

View File

@ -3,33 +3,36 @@
license:CC0 license:CC0
--> -->
<mamelayout version="2"> <mamelayout version="2">
<element name="L7" defstate="1"> <element name="L7">
<rect> <rect>
<color red="0.70" green="0.70" blue="0.0" /> <color red="0.25" green="0.25" blue="0.0" />
</rect> </rect>
<text string="START" state="1"> <rect>
<color red="1.00" green="1.00" blue="0.0" />
</rect>
<text string="START">
<color red="0.0" green="0.0" blue="0.0" /> <color red="0.0" green="0.0" blue="0.0" />
<bounds x="0" y="0.25" width="1" height="0.5" /> <bounds x="0" y="0.25" width="1" height="0.5" />
</text> </text>
</element> </element>
<element name="BX" defstate="1"> <element name="BX">
<rect> <rect>
<color red="0.00" green="0.00" blue="0.0" /> <color red="0.00" green="0.00" blue="0.0" />
</rect> </rect>
</element> </element>
<element name="Dig1" defstate="1"> <element name="Dig1">
<led7seg> <led7seg>
<color red=".75" green="0.0" blue="0.0" /> <color red="0.75" green="0.0" blue="0.0" />
</led7seg> </led7seg>
</element> </element>
<view name="Button Lamps"> <view name="Button Lamps">
<screen index="0"> <screen index="0">
<bounds left="0" top="0" right="4" bottom="3" /> <bounds left="0" top="0" right="4" bottom="3" />
</screen> </screen>
<element name="lamp3" ref="L7"> <element name="lamp3" ref="L7" inputtag="IN0" inputmask="0x08" >
<bounds x="3.093" y="3.12" width="0.5" height="0.30" /> <bounds x="3.093" y="3.12" width="0.5" height="0.30" />
</element> </element>
<element name="" ref="BX"> <element ref="BX">
<bounds x="3.99" y="3.00" width="0.01" height="0.45" /> <bounds x="3.99" y="3.00" width="0.01" height="0.45" />
</element> </element>
<repeat count="3"> <repeat count="3">

View File

@ -3,7 +3,7 @@
license:CC0 license:CC0
--> -->
<mamelayout version="2"> <mamelayout version="2">
<element name="L0" defstate="1"> <element name="L0">
<rect state="0"> <rect state="0">
<color red="0.25" green="0.25" blue="0.0" /> <color red="0.25" green="0.25" blue="0.0" />
</rect> </rect>
@ -16,7 +16,7 @@ license:CC0
</text> </text>
</element> </element>
<element name="L1" defstate="1"> <element name="L1">
<rect state="0"> <rect state="0">
<color red="0.25" green="0.25" blue="0.0" /> <color red="0.25" green="0.25" blue="0.0" />
</rect> </rect>
@ -29,7 +29,7 @@ license:CC0
</text> </text>
</element> </element>
<element name="L2" defstate="1"> <element name="L2">
<rect state="0"> <rect state="0">
<color red="0.25" green="0.0" blue="0.0" /> <color red="0.25" green="0.0" blue="0.0" />
</rect> </rect>
@ -42,7 +42,7 @@ license:CC0
</text> </text>
</element> </element>
<element name="L3" defstate="1"> <element name="L3">
<rect state="0"> <rect state="0">
<color red="0.25" green="0.0" blue="0.0" /> <color red="0.25" green="0.0" blue="0.0" />
</rect> </rect>
@ -55,7 +55,7 @@ license:CC0
</text> </text>
</element> </element>
<element name="L4" defstate="1"> <element name="L4">
<rect state="0"> <rect state="0">
<color red="0.25" green="0.0" blue="0.0" /> <color red="0.25" green="0.0" blue="0.0" />
</rect> </rect>
@ -68,7 +68,7 @@ license:CC0
</text> </text>
</element> </element>
<element name="L5" defstate="1"> <element name="L5">
<rect state="0"> <rect state="0">
<color red="0.25" green="0.0" blue="0.0" /> <color red="0.25" green="0.0" blue="0.0" />
</rect> </rect>
@ -81,7 +81,7 @@ license:CC0
</text> </text>
</element> </element>
<element name="L6" defstate="1"> <element name="L6">
<rect state="0"> <rect state="0">
<color red="0.25" green="0.0" blue="0.0" /> <color red="0.25" green="0.0" blue="0.0" />
</rect> </rect>
@ -94,7 +94,7 @@ license:CC0
</text> </text>
</element> </element>
<element name="L7" defstate="1"> <element name="L7">
<rect state="0"> <rect state="0">
<color red="0.25" green="0.25" blue="0.0" /> <color red="0.25" green="0.25" blue="0.0" />
</rect> </rect>
@ -138,9 +138,9 @@ license:CC0
</rect> </rect>
</element> </element>
<element name="Dig1" defstate="1"> <element name="Dig1">
<led7seg> <led7seg>
<color red=".75" green="0.0" blue="0.0" /> <color red="0.75" green="0.0" blue="0.0" />
</led7seg> </led7seg>
</element> </element>