A few buttons...

A forum to share your demonstrations stacks, fun stacks, games, etc.
User avatar
tperry2x
Posts: 2475
Joined: Tue Dec 21, 2021 9:10 pm
Location: Somewhere in deepest darkest Norfolk, England
Contact:

A few buttons...

Post by tperry2x »

A few buttons. Nothing extra you need to do to use them. Just select them, copy them, and paste into your stack.
If the font looks different on your computer, that's because some of them use "Atkinson-Hyperlegible" which I'm thinking of including in OXT Lite at some point.

Customise to your liking, (and if you come up with extra ones, that would be good to share them here too).
buttons.png
buttons.png (123.2 KiB) Viewed 2517 times
Attachments
buttons.oxtstack
(49.39 KiB) Downloaded 35 times
User avatar
richmond62
Posts: 3896
Joined: Sun Sep 12, 2021 11:03 am
Location: Bulgaria
Contact:

Re: A few buttons...

Post by richmond62 »

Wow! Those are cheery.

Any chance of ROUND buttons?
https://richmondmathewson.owlstown.net/
User avatar
richmond62
Posts: 3896
Joined: Sun Sep 12, 2021 11:03 am
Location: Bulgaria
Contact:

Re: A few buttons...

Post by richmond62 »

Err, But, I thought you said this stack contained buttons:
-
Screenshot 2024-09-13 at 14.45.56.png
Screenshot 2024-09-13 at 14.45.56.png (86.33 KiB) Viewed 1798 times
-
But that is NOT a button: it is a graphic.

And all the other 'buttons' are graphics.

And because they are graphics they cannot entirely behave the way buttons do: for instance you cannot assign an icon
to them:
-
Screenshot 2024-09-13 at 14.53.56.png
Screenshot 2024-09-13 at 14.53.56.png (20.83 KiB) Viewed 1794 times
https://richmondmathewson.owlstown.net/
User avatar
richmond62
Posts: 3896
Joined: Sun Sep 12, 2021 11:03 am
Location: Bulgaria
Contact:

Re: A few buttons...

Post by richmond62 »

https://github.com/revig/universal-butt ... t/releases

This is quite clever, but does NOT provide much in terms of 'buttons':
-
Screenshot 2024-09-13 at 16.22.18.png
Screenshot 2024-09-13 at 16.22.18.png (25.29 KiB) Viewed 1746 times
-
There is no way to add a coloured image as an icon (confined to monochrome SVG images), no way to add any textStyle to the 'button' name, no way to alter the background.
https://richmondmathewson.owlstown.net/
User avatar
tperry2x
Posts: 2475
Joined: Tue Dec 21, 2021 9:10 pm
Location: Somewhere in deepest darkest Norfolk, England
Contact:

Re: A few buttons...

Post by tperry2x »

richmond62 wrote: Fri Sep 13, 2024 11:47 am Err, But, I thought you said this stack contained buttons...that is NOT a button: it is a graphic.
And all the other 'buttons' are graphics.
True, but all objects (perhaps apart from widgets) can behave as "buttons", as in - they can receive a mouseup / mousedown message.
richmond62 wrote: Fri Sep 13, 2024 11:47 am ...And because they are graphics they cannot entirely behave the way buttons do: for instance you cannot assign an icon to them
At which point they become an icon with a label. Not a button. What you then have is an icon with a text label. Like you find on your desktop. You wouldn't call those icons on your desktop "buttons" would you.... you'd call them icons :|
richmond62 wrote: Fri Sep 13, 2024 1:09 pm There is no way to add a coloured image as an icon (confined to monochrome SVG images), no way to add any textStyle to the 'button' name, no way to alter the background.
Why not?
eh2.png
eh2.png (16.7 KiB) Viewed 1662 times
buttons-icons.oxtstack
(837 Bytes) Downloaded 21 times
The reason they are done as "graphics" objects in the IDE (not to be confused with imported vector graphics or images) - which is why the stack size is so low despite showing all those buttons, is that you can change the radius of a graphic - which you can't do on a button.

It's just so people could have some different "button styles" (things that look and work like buttons - just aren't labelled as buttons in the IDE, as the IDE's implementation of them is limited) - the point of making them is not needing to resort to Photoshop, Gimp, Krita or Photopea.

The other great thing - because they aren't technically "buttons", they will look the same across all platforms, yet you can stretch and resize them without any pixellation - because they are not bitmaps like you'd produce with Photoshop and so on.
But anyway, sorry I bothered now.
User avatar
richmond62
Posts: 3896
Joined: Sun Sep 12, 2021 11:03 am
Location: Bulgaria
Contact:

Re: A few buttons...

Post by richmond62 »

Sorry you bothered me.. .

What a load of nonsense: you stimulated me. 8-)
https://richmondmathewson.owlstown.net/
User avatar
tperry2x
Posts: 2475
Joined: Tue Dec 21, 2021 9:10 pm
Location: Somewhere in deepest darkest Norfolk, England
Contact:

Re: A few buttons...

Post by tperry2x »

richmond62 wrote: Fri Sep 13, 2024 6:35 pm What a load of nonsense: you stimulated me. 8-)
On the 2nd row down, on the far right of that stack - you'll note a button that can be enlarged to mimic your devawriter buttons - I put this in to perhaps help you as a suggestion.
User avatar
richmond62
Posts: 3896
Joined: Sun Sep 12, 2021 11:03 am
Location: Bulgaria
Contact:

Re: A few buttons...

Post by richmond62 »

I have a stack set up about 6 years ago to pump out images-as-buttons for my Devawriter.

AND the one-size-fit-all of the commonly tolerated xTalk IDE doesn't "do it".

What is needed is a template button with "hundreds" of settable properties so everyone can be "happy little campers" all the time.
https://richmondmathewson.owlstown.net/
User avatar
tperry2x
Posts: 2475
Joined: Tue Dec 21, 2021 9:10 pm
Location: Somewhere in deepest darkest Norfolk, England
Contact:

Re: A few buttons...

Post by tperry2x »

richmond62 wrote: Fri Sep 13, 2024 6:53 pm What is needed is a template button with "hundreds" of settable properties so everyone can be "happy little campers" all the time.
Which would require a rewrite of the engine to support that on all platforms. I'm working within the limitations of the IDE (aren't we all).
User avatar
richmond62
Posts: 3896
Joined: Sun Sep 12, 2021 11:03 am
Location: Bulgaria
Contact:

Re: A few buttons...

Post by richmond62 »

I'm working within the limitations of the IDE (aren't we all).
Well, Yes: I am trying to transition to a hippopotamus at the moment. 8-)
https://richmondmathewson.owlstown.net/
User avatar
tperry2x
Posts: 2475
Joined: Tue Dec 21, 2021 9:10 pm
Location: Somewhere in deepest darkest Norfolk, England
Contact:

Re: A few buttons...

Post by tperry2x »

You can actually customise a graphic quite a lot more than a standard 'button' object.
graphic-btn-custom.png
graphic-btn-custom.png (25.73 KiB) Viewed 1598 times
customised graphic.oxtstack
(661 Bytes) Downloaded 18 times
User avatar
OpenXTalkPaul
Posts: 2266
Joined: Sat Sep 11, 2021 4:19 pm
Contact:

Re: A few buttons...

Post by OpenXTalkPaul »

richmond62 wrote: Fri Sep 13, 2024 1:09 pm https://github.com/revig/universal-butt ... t/releases

This is quite clever, but does NOT provide much in terms of 'buttons':
-
Screenshot 2024-09-13 at 16.22.18.png
-
There is no way to add a coloured image as an icon (confined to monochrome SVG images), no way to add any textStyle to the 'button' name, no way to alter the background.
This is why I started updating the 'Button' widget I found (as an old LCB demo) in the repo, in order to make it have more features like standard 'classic' control Button.
You can actually customise a graphic quite a lot more than a standard 'button' object.
Yes you can do a pattern fill in a classic graphic control, but you can not assign a single instance of an image to use as an icon, while 'Button' widget I was working on can do that already, I was going to allow TWO icons, and allow them to be either SVG Path Icon OR a Image/PNG that way you can for example have an full color image icon on one side of Button's 'label' text, and a triangle svg icon on the other side to indicate a drop-down.
User avatar
OpenXTalkPaul
Posts: 2266
Joined: Sat Sep 11, 2021 4:19 pm
Contact:

Re: A few buttons...

Post by OpenXTalkPaul »

tperry2x wrote: Fri Sep 13, 2024 6:16 pm True, but all objects (perhaps apart from widgets) can behave as "buttons", as in - they can receive a mouseup / mousedown message.
Widgets can absolutely behave as buttons (including pop-up menu buttons), so long as long as the author included some handler to send those events. Even the 'SVGIcon' widget has them built in but LC team forgot to include the proper metadata to let the script editor know that it supports those (I patched it so it would an updated version).
In fact widgets can send mouseUp, mouseDown, mouseDoubleDown, quintupleMouseDown, whateverMessageYouWant, etc. Extension Builder has the keyword 'post' that lets you send arbitrary messages to the scripting engine.

Code: Select all

post "mouseDown"
--- or to get specific about 'the target'
post "mouseUp 1" to my scriptObject
-- the '1' in the line above would be the mouse button parameter received on the script engine side.
User avatar
OpenXTalkPaul
Posts: 2266
Joined: Sat Sep 11, 2021 4:19 pm
Contact:

Re: A few buttons...

Post by OpenXTalkPaul »

richmond62 wrote: Wed Sep 11, 2024 8:12 pm Wow! Those are cheery.

Any chance of ROUND buttons?
Those are cheery, I like 'em.

To make a 'classic button' into a round button set it's style to 'oval'
There's no UI to do that so you have to do it from the message box.
Select the button you want to modify to be round and then in the msg box do this:

Code: Select all

set the style of the selectedObjects to "oval" 
User avatar
richmond62
Posts: 3896
Joined: Sun Sep 12, 2021 11:03 am
Location: Bulgaria
Contact:

Re: A few buttons...

Post by richmond62 »

Wow! That hint is fantastic.
-
Screenshot 2024-09-14 at 18.31.32.png
Screenshot 2024-09-14 at 18.31.32.png (467.12 KiB) Viewed 1290 times
-
Screenshot 2024-09-14 at 18.35.53.png
Screenshot 2024-09-14 at 18.35.53.png (110.78 KiB) Viewed 1284 times
-
Screenshot 2024-09-14 at 18.39.39.png
Screenshot 2024-09-14 at 18.39.39.png (85.57 KiB) Viewed 1281 times
https://richmondmathewson.owlstown.net/
User avatar
richmond62
Posts: 3896
Joined: Sun Sep 12, 2021 11:03 am
Location: Bulgaria
Contact:

Re: A few buttons...

Post by richmond62 »

Now: almost inevitably, I have an enhancement request for the Properties Palettes of 'classic' controls:
-
enhancementReq.png
enhancementReq.png (125.39 KiB) Viewed 1276 times
https://richmondmathewson.owlstown.net/
User avatar
tperry2x
Posts: 2475
Joined: Tue Dec 21, 2021 9:10 pm
Location: Somewhere in deepest darkest Norfolk, England
Contact:

Re: A few buttons...

Post by tperry2x »

richmond62 wrote: Sat Sep 14, 2024 3:52 pm ...I have an enhancement request for the Properties Palettes of 'classic' controls:
@Paul, going to have to ask you on this one, as I have no idea how to even start changing that in the old inspector.
User avatar
richmond62
Posts: 3896
Joined: Sun Sep 12, 2021 11:03 am
Location: Bulgaria
Contact:

Re: A few buttons...

Post by richmond62 »

The funny thing about this is that the Properties Palette DOES HAVE a Style menu: BUT not all of the styles are there to choose from:
-
enhancementReq.png
enhancementReq.png (128.95 KiB) Viewed 1268 times
-
So the "sensible" thing would be if that Style menu could be modified to include ALL of the available styles: I had to set the button's style to 'oval' via the MessageBox FFS.
https://richmondmathewson.owlstown.net/
User avatar
OpenXTalkPaul
Posts: 2266
Joined: Sat Sep 11, 2021 4:19 pm
Contact:

Re: A few buttons...

Post by OpenXTalkPaul »

I did mention this before, somewhere. I think I reported it in the known bugs thread.
It's probably not there as more of an intentional deprecation than it was a bug.
The style was probably there for compatibility with other HyperCard and other xTalks, which is probably not a high priority anymore.

Anyway, adding 'oval' into the 'styles' menu items for Button objects should be as easy as adding it to the appropriate properties .tsv file:
com.livecode.interface.classic.Button.tsv
Line 9 in that file:

Code: Select all

style							standard	standard,transparent,opaque,rectangle,roundRect,oval,shadow,checkbox,radioButton				
That gives me a working menu item choice, but it also needs it's own default properties settings, otherwise it doesn't have the correct properties to display as an oval (it's is an oval but it's not set to opaque so you can't recognize it as an oval visually)
So we need to create a file named something like: com.livecode.interface.classic.OvalButton.tsv
That would have the default properties for that style (which would also add it as an icon in the 'Tools' palette).

I'd do it myself now, but right now I'm dealing with a crisis of a 15yr old having his Valve Steam account phished away from him by hacker from the Russian Federation (of course), sigh.
User avatar
richmond62
Posts: 3896
Joined: Sun Sep 12, 2021 11:03 am
Location: Bulgaria
Contact:

Re: A few buttons...

Post by richmond62 »

Oh, 15 year old semi-males. semi-adults . . . had 2 of them about 16 years ago.

"Nasty Dad" had the one semi-decent computer (G4 Mac 'Mirror door') inside a lockable room: spotty teenagers allowed access (remember World of Warcraft?) max 2 hours each on Saturday & Sunday.

Today, my older son (32) said that recently in a discussion with his brother (30), they both remarked that they never felt deprived.

Well, "f*ck me with Donald Trump's ego", that's not the way I remember things: I DO REMEMBER rolling on the floor laughing when my older son first told me he could do whatever he wanted whenever he wanted, and then saying, "Dad, could you me the key to the computer room?"

You could use the thing with Russian hacker to tell your 15 year old about the facts of life.

I would just demonstrate my Scots, Presbyterian ancestry by asking why you wasted your hard-earned money on something with no lasting value for your 15 year old.

Valve Steam account . . . cliesh ma dowp (as we Scots are wont to say). 8-)
https://richmondmathewson.owlstown.net/
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest