How To Make A Button Your Way

All flavors welcome.
Forum rules
Be kind.
Post Reply
User avatar
richmond62
Posts: 2765
Joined: Sun Sep 12, 2021 11:03 am
Location: Bulgaria
Contact:

How To Make A Button Your Way

Post by richmond62 »

OK, OK, OK: you have found out that the standard buttons in OXT are ever so slightly boring, and you would like something with a bit more, um, pizzazz.

So: open a new stack in OXT:
-
SShot 2023-12-07 at 10.50.03.png
SShot 2023-12-07 at 10.50.03.png (233.32 KiB) Viewed 653 times
-
Import the image you want to have as the back ground of your button:
-
SShot 2023-12-07 at 10.51.33.png
SShot 2023-12-07 at 10.51.33.png (373.22 KiB) Viewed 653 times
-
Make sure you know what the image is called:
-
SShot 2023-12-07 at 10.51.44.png
SShot 2023-12-07 at 10.51.44.png (261.14 KiB) Viewed 653 times
https://richmondmathewson.owlstown.net/
User avatar
richmond62
Posts: 2765
Joined: Sun Sep 12, 2021 11:03 am
Location: Bulgaria
Contact:

Re: How To Make A Button Your Way

Post by richmond62 »

Move the image where people will not be able to see it:
-
SShot 2023-12-07 at 10.52.03.png
SShot 2023-12-07 at 10.52.03.png (231.03 KiB) Viewed 653 times
-
Create a rectangle graphic:
-
SShot 2023-12-07 at 10.52.22.png
SShot 2023-12-07 at 10.52.22.png (234.22 KiB) Viewed 653 times
-
and set its name to the words you want on your button:
-
SShot 2023-12-07 at 10.53.12.png
SShot 2023-12-07 at 10.53.12.png (186.84 KiB) Viewed 653 times
https://richmondmathewson.owlstown.net/
User avatar
richmond62
Posts: 2765
Joined: Sun Sep 12, 2021 11:03 am
Location: Bulgaria
Contact:

Re: How To Make A Button Your Way

Post by richmond62 »

Set the text size of the graphic to the size you want in your finished button:
-
SShot 2023-12-07 at 10.53.34.png
SShot 2023-12-07 at 10.53.34.png (212 KiB) Viewed 652 times
-
And resize the graphic to the way you want it:
-
SShot 2023-12-07 at 10.53.58.png
SShot 2023-12-07 at 10.53.58.png (242.87 KiB) Viewed 652 times
-
Now set the back ground of your button by entering code into the messageBox:
-
SShot 2023-12-07 at 10.54.57.png
SShot 2023-12-07 at 10.54.57.png (267.28 KiB) Viewed 652 times
https://richmondmathewson.owlstown.net/
User avatar
richmond62
Posts: 2765
Joined: Sun Sep 12, 2021 11:03 am
Location: Bulgaria
Contact:

Re: How To Make A Button Your Way

Post by richmond62 »

Resize and reshape the graphic to the way you want your button to look:
-
SShot 2023-12-07 at 10.55.47.png
SShot 2023-12-07 at 10.55.47.png (213.76 KiB) Viewed 651 times
-
Change the text and border colour if you want to:
-
SShot 2023-12-07 at 10.56.14.png
SShot 2023-12-07 at 10.56.14.png (213.1 KiB) Viewed 651 times
-
Add any shadow effects if you wish:
-
SShot 2023-12-07 at 10.56.33.png
SShot 2023-12-07 at 10.56.33.png (194.3 KiB) Viewed 651 times
https://richmondmathewson.owlstown.net/
User avatar
richmond62
Posts: 2765
Joined: Sun Sep 12, 2021 11:03 am
Location: Bulgaria
Contact:

Re: How To Make A Button Your Way

Post by richmond62 »

Group the graphic by using the menu:
-
SShot 2023-12-07 at 11.11.21.png
SShot 2023-12-07 at 11.11.21.png (221.6 KiB) Viewed 650 times
-
Give your group a name:
-
SShot 2023-12-07 at 11.11.46.png
SShot 2023-12-07 at 11.11.46.png (221.87 KiB) Viewed 650 times
-
SShot 2023-12-07 at 11.12.17.png
SShot 2023-12-07 at 11.12.17.png (187.15 KiB) Viewed 649 times
https://richmondmathewson.owlstown.net/
User avatar
richmond62
Posts: 2765
Joined: Sun Sep 12, 2021 11:03 am
Location: Bulgaria
Contact:

Re: How To Make A Button Your Way

Post by richmond62 »

Make sure that your group is locked:
-
SShot 2023-12-07 at 11.12.27.png
SShot 2023-12-07 at 11.12.27.png (191.07 KiB) Viewed 648 times
-
Write code in the messageBox to take a snapshot of the group:
-
SShot 2023-12-07 at 11.35.26.png
SShot 2023-12-07 at 11.35.26.png (142.97 KiB) Viewed 647 times
-
Delete the group:
-
SShot 2023-12-07 at 11.35.47.png
SShot 2023-12-07 at 11.35.47.png (151.4 KiB) Viewed 647 times
https://richmondmathewson.owlstown.net/
User avatar
richmond62
Posts: 2765
Joined: Sun Sep 12, 2021 11:03 am
Location: Bulgaria
Contact:

Re: How To Make A Button Your Way

Post by richmond62 »

You now have an image which can be used as a button:
-
SShot 2023-12-07 at 11.36.02.png
SShot 2023-12-07 at 11.36.02.png (136.2 KiB) Viewed 646 times
-
You can remove the back ground image from your stack as it is no longer needed.
https://richmondmathewson.owlstown.net/
User avatar
tperry2x
Posts: 1531
Joined: Tue Dec 21, 2021 9:10 pm
Location: Britain (Previously known as Great Britain)
Contact:

Re: How To Make A Button Your Way

Post by tperry2x »

To add to this, another idea if you just want a UI control that looks a bit different:
another-way.png
another-way.png (29.18 KiB) Viewed 510 times
coloured-popup.oxtstack
(269 Bytes) Downloaded 57 times
User avatar
richmond62
Posts: 2765
Joined: Sun Sep 12, 2021 11:03 am
Location: Bulgaria
Contact:

Re: How To Make A Button Your Way

Post by richmond62 »

That's very nice, but the point of this thread was really how to make a button that looks the same regardless of which platform a standalone hived off from the source stack is meant to run on: and that includes not getting buggered-up because chummy, the end-user does not have the 'Rocky Horror' font on his/her system.
https://richmondmathewson.owlstown.net/
Post Reply

Who is online

Users browsing this forum: No registered users and 13 guests