Search found 33 matches

by matt7
Mon Mar 25, 2019 7:37 pm
Forum: For beginners
Topic: Help with BUTTONS, SWITCHES and SLIDERS, PLEASE.
Replies: 9
Views: 1462

Re: Help with BUTTONS, SWITCHES and SLIDERS, PLEASE.

It's also worth mentioning that any interface object you create is added to a "page." If no page is manually set up (like in my example above), then Smart Basic puts the interface object onto the default page (with name "") that has a transparent background and covers the entire screen. But if you s...
by matt7
Mon Mar 25, 2019 7:26 pm
Forum: For beginners
Topic: Help with BUTTONS, SWITCHES and SLIDERS, PLEASE.
Replies: 9
Views: 1462

Re: Help with BUTTONS, SWITCHES and SLIDERS, PLEASE.

Here's a quick example I threw together. The "Reset" button resets slider value back to 0.5. The switch toggles the "Reset" button between enabled/disabled (using a text field over top the button to dim the button and prevent it being pressed). The slider does nothing, but you could read out the val...
by matt7
Mon Mar 11, 2019 9:22 pm
Forum: BASIC programs
Topic: Ellipse, rotated about an angle
Replies: 4
Views: 806

Re: Ellipse, rotated about an angle

I always forget about the DRAW TO and DRAW LINE TO functions! Nice use of them. Because of the difference in screen resolutions, I did not get those thin gaps between line segments on my iPhone like in your screenshot. But if I make the DRAW SIZE larger then I do start to get some and part of the el...
by matt7
Thu Mar 07, 2019 9:12 pm
Forum: Libraries
Topic: Rounded Rectangles
Replies: 7
Views: 1115

Re: Rounded Rectangles

I didn't see those earlier posts! After looking back at them, I suppose what my functions provide is the most minimalistic version possible. Any draw and fill settings (including color, alpha, dash, and shadow) must be set before calling one of the functions, just like normal DRAW and FILL commands....
by matt7
Wed Mar 06, 2019 7:29 pm
Forum: Libraries
Topic: Rounded Rectangles
Replies: 7
Views: 1115

Rounded Rectangles

These are some simple functions for drawing rectangles with rounded corners. They are designed to match the built-in DRAW RECT and FILL RECT functions but have an additional parameter for the rectangle's corner radius. These functions work as you would expect with DRAW COLOR, DRAW ALPHA, DRAW SIZE, ...
by matt7
Mon Mar 04, 2019 6:22 pm
Forum: BASIC programs
Topic: "Quick & dirty" file selector
Replies: 7
Views: 1059

Re: "Quick & dirty" file selector

Disregard my earlier question. I just realized that the reason you switched from drawing lines to using a button to create the window border was to prevent overwriting anything on the graphics layer. I only glanced at the code and didn't realize the graphics clear at the top is only for the demo cod...
by matt7
Mon Mar 04, 2019 6:08 pm
Forum: BASIC programs
Topic: "Quick & dirty" file selector
Replies: 7
Views: 1059

Re: "Quick & dirty" file selector

Thanks, Henko. This is helpful. I'm wondering why you need to do a graphics clear though? Why not create a fullscreen page (maybe solid white or black, and maybe with a transparency of 50% or something) and then create the list and buttons for selecting a file on that new page? Then when "Ok" is pre...
by matt7
Fri Feb 01, 2019 6:07 pm
Forum: Libraries
Topic: Sleep Function
Replies: 10
Views: 706

Re: Sleep Function

Definitely seems inconsistent in one sense, but it is consistent in another sense. The inability to get touch coordinates when in TEXT mode is consistent with editable text boxes that appear when in GRAPHICS mode. (I think touches still work over read-only text boxes.) I think that is because priori...
by matt7
Fri Feb 01, 2019 4:48 pm
Forum: Libraries
Topic: Sleep Function
Replies: 10
Views: 706

Re: Sleep Function

your pause routine that uses screen touch sensing to end the pause needs a GRAPHICS command at the start. Yes, that is true. I probably should have mentioned that in the description above the function, that the touch-interrupt functionality only works while on the GRAPHICS screen. Whatever you do, ...
by matt7
Fri Feb 01, 2019 2:20 am
Forum: Libraries
Topic: Sleep Function
Replies: 10
Views: 706

Re: Sleep Function

You make many valid points, and I definitely agree that for most applications the changes I made are unnecessary and overkill. I just wanted to provide some alternatives here in the thread you started so others can choose what works best for them. For longer pauses, processor efficiency becomes a bi...