MAMEWorld >> Programming
Previous thread Previous  View all threads Index   Next thread Next   Flat Mode Flat  

Mr. DoAdministrator
MAME Art Editor
Reged: 09/21/03
Posts: 4861
Loc: California
Send PM
Re: Understanding Clickable LAYout elements
03/21/22 06:18 PM


> I'm trying to make a clickable layout for the ensoniq SQ1 (esq5505.cpp and
> esq2by16.lay) using the psr60 as example.
>
> I'm pretty sure i'm missing something but i can't understand what. Whatever i do, my
> buttons are not working, i'm not even sure they get the "Click" event.
>
> This is part of my current LAYout file (edited 'cause the forum code doesn't allow
> the XML tags):
>
>

<element ref="button-sml" inputtag="KEY1" inputmask="0x1000">
<bounds x="85" y="40" width="9" height="3"/>
</element>-!-- PORT_NAME("ENTER") // 172=ENTER -->

>
>
> and this is the relevant part of the esq5505.cpp file:
>
> PORT_START("KEY1")
> ...
> PORT_BIT(0x1000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_ENTER)
> PORT_CHANGED_MEMBER(DEVICE_SELF, esq5505_state, key_stroke, 172) PORT_NAME("ENTER")
> // 172=ENTER
>
>
> The keyboard keys are working, but my clickable buttons don't.
>
> What am i doing wrong?
> What it is that i don't understand?


Tip 1... you can enter code, if you change the "Make Post" dropdown to "without UBBCode/HTML"

Assuming you have the element named earlier in the LAY file? For example:

<element name="button-sml" defstate="0"></element>

If no... that's gotta be in there also. If yes... PM me the actual file if you can, and I can look at it tonight, see what I can figure out.



RELAX and just have fun. Remember, it's all about the games.








Entire thread
Subject Posted by Posted on
* Understanding Clickable LAYout elements Parduz 03/21/22 02:47 AM
. * Re: Understanding Clickable LAYout elements Mr. DoAdministrator  03/21/22 06:18 PM
. * Re: Understanding Clickable LAYout elements Parduz  03/22/22 12:31 AM
. * Re: Understanding Clickable LAYout elements Mr. DoAdministrator  03/22/22 02:09 AM
. * Re: Understanding Clickable LAYout elements Parduz  03/22/22 11:39 AM
. * Re: Understanding Clickable LAYout elements Robbbert  03/22/22 01:13 PM

Extra information Permissions
Moderator:  Pi 
0 registered and 4 anonymous users are browsing this forum.
You cannot start new topics
You cannot reply to topics
HTML is enabled
UBBCode is enabled
Thread views: 398