[WIP] GrimTK GUI Framework

Ask for help about creating mods and scripts for Grimrock 2 or share your tips, scripts, tools and assets with other modders here. Warning: forum contains spoilers!
Post Reply
cameronC
Posts: 80
Joined: Wed Apr 11, 2012 10:54 pm

Re: [WIP] GrimTK GUI Framework

Post by cameronC »

AdrTru wrote:Its realy brilliant framework.
I am making on own dialog for some forge mod.
Here is preview of my work :)
Image
Very cool!
Hoping to dig in and get my hands dirty over the next few days with this.
Writer and sometimes artist of the very slightly acclaimed comic series Scrambled Circuits. A comic series about a robot written by a human.

Grimrock 2 socketSystem: viewtopic.php?f=22&t=8546 / Github
User avatar
Eleven Warrior
Posts: 744
Joined: Thu Apr 18, 2013 2:32 pm
Location: Australia

Re: [WIP] GrimTK GUI Framework

Post by Eleven Warrior »

Hi John. Is the Notebook fully working yet? I am getting a error: warning [GKT] GUI type 'GButton" does not exist.

I can open the book and type text but I cannot close the book or add a note to it, not sure what I am doing wrong.

Awesome work Ardtru love it :)
cameronC
Posts: 80
Joined: Wed Apr 11, 2012 10:54 pm

Re: [WIP] GrimTK GUI Framework

Post by cameronC »

Image
https://www.mediafire.com/folder/epa88o ... type_staff
A few moments of looking at the examples shows how simple this is. Right-Click the staff to bring up a list of spells. Select a spell and the secondary action of the staff changes to the chosen spell. Can easily have staves with a set of spells inside them, or have it populate the list based on all spells the champion knows.
Writer and sometimes artist of the very slightly acclaimed comic series Scrambled Circuits. A comic series about a robot written by a human.

Grimrock 2 socketSystem: viewtopic.php?f=22&t=8546 / Github
User avatar
JohnWordsworth
Posts: 1397
Joined: Fri Sep 14, 2012 4:19 pm
Location: Devon, United Kingdom
Contact:

Re: [WIP] GrimTK GUI Framework

Post by JohnWordsworth »

@Drakkan: I'll build more and more examples in over the coming weekends. :) With regards to optional answers, I will have a think about this. For now, you could always tweak the dialogue structure depending on the character's skills, but you're right - it would be nice if there was a relatively easy way to check for a few basic things "hasStat > Value", "hasSkill > Value", "hasTrait", "hasItem". Any more?

@AdrTru: Looks great! Let me know if there are any simple-(ish) widgets that would make your job easier. I want to add 'drop down' type affairs soon (which will probably pop-up a list, like the character generator) - but if you have any more useful ideas, just let me know!

@ElevenWarrior: Nope, the Notebook is not done yet I'm afraid. That's a bit later on the list as I ran into some issues with the way containers now work which is going to make it a little more complicated than I had hoped. Please ignore the Notebooks in the Sample Dungeon, they shouldn't be there yet!

@cameronC: Love the prototype staff. I really like the idea of extending Staves with a selection of spells. I will tidy up that select menu dialogue at some point too so it looks a bit prettier (make the buttons go all the way across - make it a bit more fluid depending on the content sizes).
My Grimrock Projects Page with links to the Grimrock Model Toolkit, GrimFBX, Atlas Toolkit, QuickBar, NoteBook and the Oriental Weapons Pack.
User avatar
Drakkan
Posts: 1318
Joined: Mon Dec 31, 2012 12:25 am

Re: [WIP] GrimTK GUI Framework

Post by Drakkan »

JohnWordsworth wrote:@Drakkan: I'll build more and more examples in over the coming weekends. :) With regards to optional answers, I will have a think about this. For now, you could always tweak the dialogue structure depending on the character's skills, but you're right - it would be nice if there was a relatively easy way to check for a few basic things "hasStat > Value", "hasSkill > Value", "hasTrait", "hasItem". Any more?
for custom base party something like hasName could be nice. This will make different dialogues available only for some party members which could make it more interesting.

Also I have small request when you will have time - please coudl you make for me default template which will be looking like dialogue_03 example, just speaker name will be in some upper box and possible answers instead speakers name ?
EDIT: also maybe bump (stick)the whole botom box to the upper part could be nice, as I do not need to see the middle empty part (its kind of distraction, when reading the dialogue)
Image
Breath from the unpromising waters.
Eye of the Atlantis
User avatar
JKos
Posts: 464
Joined: Wed Sep 12, 2012 10:03 pm
Location: Finland
Contact:

Re: [WIP] GrimTK GUI Framework

Post by JKos »

Looking really great, unfortunately I haven't have a time to play with it yet, but hopefully I will soon.
- LoG Framework 2http://sites.google.com/site/jkoslog2 Define hooks in runtime by entity.name or entity.id + multiple hooks support.
- cloneObject viewtopic.php?f=22&t=8450
User avatar
AdrTru
Posts: 223
Joined: Sat Jan 19, 2013 10:10 pm
Location: Trutnov, Czech Republic

Re: [WIP] GrimTK GUI Framework

Post by AdrTru »

JohnWordsworth wrote:@AdrTru: Looks great! Let me know if there are any simple-(ish) widgets that would make your job easier. I want to add 'drop down' type affairs soon (which will probably pop-up a list, like the character generator) - but if you have any more useful ideas, just let me know!
@JohnWordsworth:
Thank you for offer to help me.
I sent you PM becouse my message contain "maybe dirty" code and description of changes where I made in your framework for draw icons. Thx for analisis and correction there and eventualy integration to your work .
Thx
My LOG2 projects: virtual money, Forge recipes, liquid potions and
MultiAlcoveManager, Toolbox, Graphic text,
User avatar
JohnWordsworth
Posts: 1397
Joined: Fri Sep 14, 2012 4:19 pm
Location: Devon, United Kingdom
Contact:

Re: [WIP] GrimTK GUI Framework

Post by JohnWordsworth »

New version posted to the Nexus

Note. This update saves a save crash bug with NPC dialogue and message boxes! Stupid up values!

@AdrTu: Thanks for the PM. Great idea to have the widgets automatically be able to display item icons. I am not 100% yet, but I am contemplating having Icons as a separate Widget type (GIcon), but also maybe just wrapping it into the GImageView class is good too. Will add your feature tomorrow when I get a bit of time!
My Grimrock Projects Page with links to the Grimrock Model Toolkit, GrimFBX, Atlas Toolkit, QuickBar, NoteBook and the Oriental Weapons Pack.
User avatar
JohnWordsworth
Posts: 1397
Joined: Fri Sep 14, 2012 4:19 pm
Location: Devon, United Kingdom
Contact:

Re: [WIP] GrimTK GUI Framework

Post by JohnWordsworth »

Many thanks Petri for your awesome day of Glogg. I had 10 minutes spare this evening, so I added the possibility to centre (and right align) text on labels!

Image

Doesn't work for multi-line labels yet, but it's on the to do list for later.
My Grimrock Projects Page with links to the Grimrock Model Toolkit, GrimFBX, Atlas Toolkit, QuickBar, NoteBook and the Oriental Weapons Pack.
User avatar
JohnWordsworth
Posts: 1397
Joined: Fri Sep 14, 2012 4:19 pm
Location: Devon, United Kingdom
Contact:

Re: [WIP] GrimTK GUI Framework

Post by JohnWordsworth »

Another bumper day of updates for GrimTK! I will likely upload tomorrow.

Image

Change Log...

- Removed need for onMove and onTurns hooks thanks to GameMode.setGameFlag.
- Can lock the party and/or the keyboard when showing a window.
- Text input is much better now as we can turn shortcuts off (so you can type 1, 2, 3, 4 etc).
- Can add "keyboardShortcut" to any button and it will trigger the button when you press that key.
- Can add "onPressedSound" to any button. I'll leave you to guess what that does...
- Added a GIcon widget (thanks for the idea AdrTru) to draw an icon from a gfxAtlas.
- Added a GUI debugging panel which gives you info about the widget your mouse is over.
My Grimrock Projects Page with links to the Grimrock Model Toolkit, GrimFBX, Atlas Toolkit, QuickBar, NoteBook and the Oriental Weapons Pack.
Post Reply