CommonUI V1.1 - Simple UI Framework

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

Previous topic - Next topic

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

-- 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:
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!
"The Blue Blur" - Working on Net Star OS, a new frontier for Red Star OS 3.0
linktr.ee/quickmuffin8782

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
"The Blue Blur" - Working on Net Star OS, a new frontier for Red Star OS 3.0
linktr.ee/quickmuffin8782

8589


QuickMuffin8782

"The Blue Blur" - Working on Net Star OS, a new frontier for Red Star OS 3.0
linktr.ee/quickmuffin8782


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:

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

#9
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.
"The Blue Blur" - Working on Net Star OS, a new frontier for Red Star OS 3.0
linktr.ee/quickmuffin8782

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

#11
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.
"The Blue Blur" - Working on Net Star OS, a new frontier for Red Star OS 3.0
linktr.ee/quickmuffin8782