I've used SLAB and it's great but I don't need an entire framework. I need a text box, I guess a button, perhaps a 'spinner' (up/down buttons). IDK what else yet. Just checking if anyone has something that's not a full-blown framework. I'm also happy to 'rip and fit' from existing code if ppl have samples that is not in a tidy module.
Cheers n beers.
I'm looking for a lightweight GUI/control pack
I'm looking for a lightweight GUI/control pack
Last project:
https://togfox.itch.io/hwarang
A card game that brings sword fighting to life.
Current project:
Idle gridiron. Set team orders then idle and watch: https://togfox.itch.io/idle-gridiron
https://togfox.itch.io/hwarang
A card game that brings sword fighting to life.
Current project:
Idle gridiron. Set team orders then idle and watch: https://togfox.itch.io/idle-gridiron
Re: I'm looking for a lightweight GUI/control pack
Can you make the small GUI by yourself?
Just several objects with x, y positions and width and height, by hovering change the active gui element an by clicking check the position and return the clicked gui element.
Just several objects with x, y positions and width and height, by hovering change the active gui element an by clicking check the position and return the clicked gui element.
Re: I'm looking for a lightweight GUI/control pack
I attached clickbuttons. It is clickable buttons. You can use mouse or arrow keys up/up and return key.
There are also "toggle" buttons, if you click them they cycle through pre-defined toggles.
(like a difficulty button and it each click it changes from "easy" to "medium" to "advanced" to "hard")
It is used in this game:
viewtopic.php?p=250233#p250233
except not as a seperate module but inside main.lua where it says -- BUTTONS ---
You fill the buttons table like this:
you read the clicks like
and draw the buttons like
There are some global variables like mouse_was_down and active_button (the button that is currently selected by keyboard) etc
Wow, this code is just the best.
There are also "toggle" buttons, if you click them they cycle through pre-defined toggles.
(like a difficulty button and it each click it changes from "easy" to "medium" to "advanced" to "hard")
It is used in this game:
viewtopic.php?p=250233#p250233
except not as a seperate module but inside main.lua where it says -- BUTTONS ---
You fill the buttons table like this:
Code: Select all
add_button (buttons, res_w/2-220, res_h-60, 400, 20, "back to menu", "button_to_menu")
Code: Select all
local clicked_button_name, clicked_button_i = clicked_button (buttons)
if (clicked_button_name == "button_to_menu") then change_gamestatus ("MENU") end
Code: Select all
draw_buttons (buttons)
Wow, this code is just the best.
- Attachments
-
- clickbuttons.lua
- (3.41 KiB) Downloaded 80 times
Re: I'm looking for a lightweight GUI/control pack
Thanks. I wasn't expecting a module and I'm happy to extract from your code.
I could do this myself but I've no experience and it'd take me a while to fumble through it.
Someone else here has 'textinput' I'll also look into.
Cheers!
I could do this myself but I've no experience and it'd take me a while to fumble through it.
Someone else here has 'textinput' I'll also look into.
Cheers!
Last project:
https://togfox.itch.io/hwarang
A card game that brings sword fighting to life.
Current project:
Idle gridiron. Set team orders then idle and watch: https://togfox.itch.io/idle-gridiron
https://togfox.itch.io/hwarang
A card game that brings sword fighting to life.
Current project:
Idle gridiron. Set team orders then idle and watch: https://togfox.itch.io/idle-gridiron
- BrotSagtMist
- Party member
- Posts: 659
- Joined: Fri Aug 06, 2021 10:30 pm
Re: I'm looking for a lightweight GUI/control pack
What text input are you planning/looking for?
I have a full editor box with marking/copypaste/mouse/tabs/highlight etc. with only 500 lines size.
I just kinda stalled working on it midway and forgot how it works. Not sure if i can turn this into a module to be randomly deployed in other peoples projects.
I have a full editor box with marking/copypaste/mouse/tabs/highlight etc. with only 500 lines size.
I just kinda stalled working on it midway and forgot how it works. Not sure if i can turn this into a module to be randomly deployed in other peoples projects.
obey
Re: I'm looking for a lightweight GUI/control pack
I'm after basic controls for my OPTIONS screen. You know - the usual - check boxes for music, maybe a text box to enter player name, an OKAY button to exit. Perhaps up/down arrows to adjust bot difficulty. Normal stuff. Nothing demanding.
If you agree - there is no harm in sharing. I'll either use it or I won't.
If you agree - there is no harm in sharing. I'll either use it or I won't.
Last project:
https://togfox.itch.io/hwarang
A card game that brings sword fighting to life.
Current project:
Idle gridiron. Set team orders then idle and watch: https://togfox.itch.io/idle-gridiron
https://togfox.itch.io/hwarang
A card game that brings sword fighting to life.
Current project:
Idle gridiron. Set team orders then idle and watch: https://togfox.itch.io/idle-gridiron
- BrotSagtMist
- Party member
- Posts: 659
- Joined: Fri Aug 06, 2021 10:30 pm
Re: I'm looking for a lightweight GUI/control pack
Nah, this is total overkill. Its a code editor, the work needed to adjust it for "player names" is probably more than just rewriting it.
obey
Re: I'm looking for a lightweight GUI/control pack
Gspöt is quite lightweight (single file, albeit somewhat big). It's what I use for simple things like what you're describing.
Re: I'm looking for a lightweight GUI/control pack
I took your suggestion and I'm trying it now. I like it. I have to use the example code + the old docs because the example alone doesn't demonstrate everything (not surprising). For example, I had to read the docs to see how to :hide() and :show() buttons. (Not complaining - just saying - the docs have SOME value).
This has absolutely got me started with my basic GUI. Thanks!!
Last project:
https://togfox.itch.io/hwarang
A card game that brings sword fighting to life.
Current project:
Idle gridiron. Set team orders then idle and watch: https://togfox.itch.io/idle-gridiron
https://togfox.itch.io/hwarang
A card game that brings sword fighting to life.
Current project:
Idle gridiron. Set team orders then idle and watch: https://togfox.itch.io/idle-gridiron
Who is online
Users browsing this forum: Google [Bot], Semrush [Bot] and 2 guests