Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 04:03 15 Nov 2025 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : GUI?  Comments Welcome

Author Message
elk1984

Senior Member

Joined: 11/07/2020
Location: United Kingdom
Posts: 229
Posted: 08:06pm 05 Oct 2020
Copy link to clipboard 
Print this post

This is very rough and ready, but I'm putting it out there for comments & suggestions on how I might do this better (or indeed if it's a total waste of time!)  I don't want to go to Csubs (mostly because I can't code in C!)

wimp.zip

Features
- Movable panels (implemented as sprites and I'm sure this is a problem because it's easy to get up to the sprite limit with 64 controls on a page!)
- Buttons (default and normal)
- Show/Hide control
- Move control

To Do:
* Relative positioning (so the X and Y coordinates are defined relative to the container control rather than the screen)
* Z-Order (the hiding of ID: 2 leaving the background to ID: 1 visible when Id:5 would need to redraw; the hiding of Id: 5 leaving part of Id: 2 visible when Id:1 would need to redraw)
* Implement the other controls!
* Navigation (Keyboard / Nunchuk / Wii Classic / Mouse?)
* Memory usage - I'm sure I'm swallowing loads in all those string arrays!  I think maybe implementing the Container / Controls as a tree?
* Recursive redraw (repainting a Container causing all contents to draw)

Comments welcome.

@matherp - This is the project I'm considering for a mouse...  I started off creating a sprite editor and found myself wondering can I build a reusable GUI framework  
Edited 2020-10-06 06:06 by elk1984
 
elk1984

Senior Member

Joined: 11/07/2020
Location: United Kingdom
Posts: 229
Posted: 06:09pm 06 Oct 2020
Copy link to clipboard 
Print this post




Screen capture using new VGA Capture Device
Edited 2020-10-07 04:25 by elk1984
 
Nimue

Guru

Joined: 06/08/2020
Location: United Kingdom
Posts: 425
Posted: 06:24pm 06 Oct 2020
Copy link to clipboard 
Print this post

  elk1984 said  

Screen capture using new VGA Capture Device


Awesome work.

I fear a discussion about "reusable code" might emerge   -- that said, a range of reusable libraries that allow us to utilise great work is a huge step forward.

Around 1989 I remember using QBasic libraries that I got as "shareware" via BBS that did multilevel menus etc etc - they allowed me to wrap up some processes control programmes with a veneer of gloss that I would otherwise have not been able to do.

Nice work and looking forward to seeing it develop.

Nim
Entropy is not what it used to be
 
elk1984

Senior Member

Joined: 11/07/2020
Location: United Kingdom
Posts: 229
Posted: 06:48pm 06 Oct 2020
Copy link to clipboard 
Print this post

  Quote  Awesome work.

I fear a discussion about "reusable code" might emerge   -- that said, a range of reusable libraries that allow us to utilise great work is a huge step forward.

Around 1989 I remember using QBasic libraries that I got as "shareware" via BBS that did multilevel menus etc etc - they allowed me to wrap up some processes control programmes with a veneer of gloss that I would otherwise have not been able to do.

Nice work and looking forward to seeing it develop.

Nim


Thanks.

Video capture uploaded to here showing frames moving and the Z-order problems.
Edited 2020-10-07 04:50 by elk1984
 
Nimue

Guru

Joined: 06/08/2020
Location: United Kingdom
Posts: 425
Posted: 07:26pm 06 Oct 2020
Copy link to clipboard 
Print this post

  elk1984 said  
  Quote  

Video capture uploaded to here showing frames moving and the Z-order problems.


What's really interesting here is that I remember using GUIs like this without a mouse - process control software with "windowed" GUI elements accessible by keyboard (or touch screen) input, so work like this is just as applicable without a mouse.

Interestingly, one of the positives from an education perspective is the lack of mouse.  Forcing keyboard input makes students focus on what is going without the usual "click fest" that seems to plague software in schools.  So, oddly, no mouse by default is a positive for me.

That said - the GUI looks great - am following with interest.

Cheers
Nim
Entropy is not what it used to be
 
mkopack73
Senior Member

Joined: 03/07/2020
Location: United States
Posts: 261
Posted: 11:50pm 07 Oct 2020
Copy link to clipboard 
Print this post

Awesome!!! And yeah, reusable libraries = GOOD THINGS!!! :)
 
mkopack73
Senior Member

Joined: 03/07/2020
Location: United States
Posts: 261
Posted: 02:18am 08 Oct 2020
Copy link to clipboard 
Print this post

If you're concerned about hitting the sprite limit, talk with Michael Packard and see how he handled >64 asteroids in his Oidzone game... I believe he did a lot of it with Blitting...
 
Tinine
Guru

Joined: 30/03/2016
Location: United Kingdom
Posts: 1646
Posted: 05:00pm 08 Oct 2020
Copy link to clipboard 
Print this post

Here's what I have been doing since my DOS days because I never saw the point of drawing GUIs in code.

















 
elk1984

Senior Member

Joined: 11/07/2020
Location: United Kingdom
Posts: 229
Posted: 07:29pm 08 Oct 2020
Copy link to clipboard 
Print this post

  Tinine said  Here's what I have been doing since my DOS days because I never saw the point of drawing GUIs in code.


Cool!
 
elk1984

Senior Member

Joined: 11/07/2020
Location: United Kingdom
Posts: 229
Posted: 07:34pm 08 Oct 2020
Copy link to clipboard 
Print this post

Also cool...

I'll get me coat...
 
mkopack73
Senior Member

Joined: 03/07/2020
Location: United States
Posts: 261
Posted: 12:06am 09 Oct 2020
Copy link to clipboard 
Print this post

VERY cool!
 
Tinine
Guru

Joined: 30/03/2016
Location: United Kingdom
Posts: 1646
Posted: 07:20am 09 Oct 2020
Copy link to clipboard 
Print this post

Make use of the graphics capabilities of the CMM2, especially the page flipping.

Do a search for:

Knobman

Skinman

Creator: g200kg

I'd post a link but a search will reveal more.

The photo-realistic graphics for audio devices, etc., are created with these tools.

The rotary dial used in my top image was created with Knobman  
 
Tinine
Guru

Joined: 30/03/2016
Location: United Kingdom
Posts: 1646
Posted: 08:29am 09 Oct 2020
Copy link to clipboard 
Print this post

Some elements to play with:


Graphic elements 1.zip


Graphic elements 2.zip


Graphic elements 3.zip


Graphic elements 4.zip

Note that the file names have the image size in parentheses. Re-name them as just png. Use a graphics program to size the image to suit. These are transparent backgrounds....I believe most graphics programs support this, now.
 
Tinine
Guru

Joined: 30/03/2016
Location: United Kingdom
Posts: 1646
Posted: 08:51am 09 Oct 2020
Copy link to clipboard 
Print this post

Fancy text

Create buttons
 
Print this page


To reply to this topic, you need to log in.

The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025