Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: [Lua] Making a list similar to adventure mode health screen.  (Read 747 times)

SlimeOfSteel

  • Bay Watcher
  • Novice Programmer
    • View Profile
[Lua] Making a list similar to adventure mode health screen.
« on: April 10, 2018, 10:08:31 am »

I want to create a Panel that allows you to pick an option. I also want it to look similar to the health screen in adventure mode. Unfortunately, because I am a Lua noob, I don't know how to do this.

Is what I'm looking for even possible? If so, how do I do it?
Logged
It works, but I don't know why.

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: [Lua] Making a list similar to adventure mode health screen.
« Reply #1 on: April 14, 2018, 01:37:48 am »

https://github.com/DFHack/dfhack/blob/master/docs/Lua%20API.rst#gui-widgets

you'll want to look at some existing gui lua scripts in scripts/gui for this

SlimeOfSteel

  • Bay Watcher
  • Novice Programmer
    • View Profile
Re: [Lua] Making a list similar to adventure mode health screen.
« Reply #2 on: April 18, 2018, 07:01:32 am »

https://github.com/DFHack/dfhack/blob/master/docs/Lua%20API.rst#gui-widgets

you'll want to look at some existing gui lua scripts in scripts/gui for this

Thanks.
Logged
It works, but I don't know why.

SlimeOfSteel

  • Bay Watcher
  • Novice Programmer
    • View Profile
Re: [Lua] Making a list similar to adventure mode health screen.
« Reply #3 on: April 18, 2018, 09:49:10 am »

Actually, I've been thinking: would that even be a good idea to do usage wise? Would that hurt user friendliness?

EDIT: Screw it, I'm just gonna go with it. If the community doesn't like it, then I'll change it.
« Last Edit: April 18, 2018, 12:44:15 pm by SlimeOfSteel »
Logged
It works, but I don't know why.

SlimeOfSteel

  • Bay Watcher
  • Novice Programmer
    • View Profile
Re: [Lua] Making a list similar to adventure mode health screen.
« Reply #4 on: April 19, 2018, 09:20:41 am »

Yeah, I still have no idea what I'm doing. Do I need to create a new module? If so, how can I get it to be used and extend the List class?
Logged
It works, but I don't know why.

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: [Lua] Making a list similar to adventure mode health screen.
« Reply #5 on: April 21, 2018, 02:21:09 am »

this file has a bunch of examples of various extensions and uses.