CommonUI V1.1 - Simple UI Framework

Started by Pitaya4, Aug 14, 2021, 05:38 pm

Previous topic - Next topic

Pitaya4

Aug 14, 2021, 05:38 pm Last Edit: Aug 21, 2021, 07:00 pm by Pitaya4
I had to make a simple frontend to an API. It was a very cumbersome experience, so I made a little framework for simple UI.

CommonUI Framework

Code Select
-- Download
wget https://raw.githubusercontent.com/DimitarBogdanov/CommonUI/main/commonui.lua commonui.lua

Here are some screenshots of stuff made with CommonUI - all from my OpusOS-inspired operating system:



There is documentation over at the GitHub wiki page. There is a little tutorial on there as well!

Update log:
Code Select
V.1.1, 21 August 2021 - initial OOP version (beta)
V1.02, 15 August 2021 - added NewLabel() and ClearComponents(). See API for more details
V1.01, 15 August 2021 - added CommonUI.AddAndDrawComponent(). See API for more details

QuickMuffin8782

Nice API! Keep up the good work!
GOTTA GO FAST!!!!
Gitlab - COSC - XenusSoft - Hangout

Pitaya4

Thanks! I've been working on an improved OOP version, as I've been writing my OS. The OOP model is way more suitable for this. I've also touched up some components as well. I'll post in a couple of days, probably.

QuickMuffin8782

Make sure the updated version is on the post so it's up to date! Let me know if any help is needed!
And you're welcome. :D
GOTTA GO FAST!!!!
Gitlab - COSC - XenusSoft - Hangout

8589


QuickMuffin8782

GOTTA GO FAST!!!!
Gitlab - COSC - XenusSoft - Hangout


Pitaya4

Quote from: 8589 on Aug 20, 2021, 08:34 pmEither having multiple buttons doesn't seem to work or I'm doing something wrong. https://copy-cat.squiddev.cc/?startup=ZnMuZGVsZXRlKCJ0ZXN0Lmx1YSIpCmlmIHNoZWxsLnJ1bigicGFzdGViaW4gZ2V0IEs3eG1YdWhQIHRlc3QubHVhIikgYW5kIHNoZWxsLnJ1bigidGVzdC5sdWEiKSB0aGVuIGVuZA==

Looks like perfectly valid code. I've coded my entire OS in the OOP version of CommonUI, that's pretty polished, I'll upload it shortly.

Pitaya4

We're switching up to GitHub - here's an experimental version of CommonUI running.
In fact, since it's just the raw file on GitHub, this wget will always be up-to-date:

Code Select
wget https://raw.githubusercontent.com/DimitarBogdanov/CommonUI/main/commonui.lua commonui.lua
There's some wiki pages up over at https://github.com/DimitarBogdanov/CommonUI/wiki if you need help with the OOP version.

QuickMuffin8782

Aug 22, 2021, 11:33 pm #9 Last Edit: Aug 23, 2021, 11:46 pm by QuickMuffin8782
I'd also suggest on making all UI componets on all computers out there and include CraftOS PC support, and also for finishing touches, add double buffering.
GOTTA GO FAST!!!!
Gitlab - COSC - XenusSoft - Hangout

Pitaya4

Quote from: QuickMuffin8782 on Aug 22, 2021, 11:33 pmI'd also suggest on making all UI componets on all computers out there and include CraftOS PC support, and also for finishing touches, add double buffering.


Thank you for your response and the links! Some of the stuff in the usability.gov website is going to be coming to CommonUI, but not all of it. For instance, something like a message box is beyond the scope of the project.

I'll have a look at CraftOS-PC. I've been solely using ccemux for developing CommonUI, as it's the only thing I have available with my limited internet access, so that'll be happening in at least a week or two. Double buffering is a great idea, and might come at some point in the future, if I have enough time to implement and test it. School's coming up, unfortunately that means less time for Minecraft/CC, but yeah.

QuickMuffin8782

Aug 25, 2021, 10:07 pm #11 Last Edit: Aug 25, 2021, 10:43 pm by QuickMuffin8782
Quote from: Pitaya4 on Aug 24, 2021, 01:23 pm
Quote from: QuickMuffin8782 on Aug 22, 2021, 11:33 pmI'd also suggest on making all UI componets on all computers out there and include CraftOS PC support, and also for finishing touches, add double buffering.


Thank you for your response and the links! Some of the stuff in the usability.gov website is going to be coming to CommonUI, but not all of it. For instance, something like a message box is beyond the scope of the project.

I'll have a look at CraftOS-PC. I've been solely using ccemux for developing CommonUI, as it's the only thing I have available with my limited internet access, so that'll be happening in at least a week or two. Double buffering is a great idea, and might come at some point in the future, if I have enough time to implement and test it. School's coming up, unfortunately that means less time for Minecraft/CC, but yeah.

No problem! Xelostar's Buffer API can be used for reference on double buffering.
GOTTA GO FAST!!!!
Gitlab - COSC - XenusSoft - Hangout