Page 4 of 15

Re: [WIP] GrimTK GUI Framework

Posted: Sun Jan 11, 2015 11:21 pm
by Drakkan
looking fantastic! In case not prepared, please could you include some examples:

- how to display some picture inside Simple Message Box and change its position
- have you somehow worked on custom size of the message inbox ? If it is somehow easy customizable, because I am planning lots of text and the window is quite small
- I do not have noticed if you have somehow solved the "freeze" world option when message box is displayed (curently I can move freely and disable that way the message box)

- is the text box windowreacting somehow on what is written in ? Perhaps some example could be fine

btw these advanced scripts are really impressive !
looking forward to dialogue system !

Re: [WIP] GrimTK GUI Framework

Posted: Sun Jan 11, 2015 11:39 pm
by JohnWordsworth
Thanks Drakkan! I intend to have a bunch of "built-in" one-liners that you can use to fire off a few different UIs. I will make one with bigger texts in mind soon with a lot more space on the screen.

At the moment, the world freezes when you use the edit boxes (so you don't move around when typing), but I will make it so that you can just attach a flag to an active window (freezeParty), and if that is set on any active window, it will freeze the party until the window has gone away.

Good idea for an example of how to get text from a window. I'll keep building up the examples in the same dungeon so that they will all be there whenever I add new features. :)

Re: [WIP] GrimTK GUI Framework

Posted: Sun Jan 11, 2015 11:47 pm
by Eleven Warrior
Truly awesome John, cant wait to see it :)

Re: [WIP] GrimTK GUI Framework

Posted: Mon Jan 12, 2015 8:52 am
by cameronC
I haven't done anything with the gui framework yet - I spent a nice while going through the code, though, and it's pretty beautiful stuff. The demo dungeon does a nice job of showing off some of the capabilities and possibilities.

A potential "one-liner" I know I'd be interested in: A box with a list of choices, and an area below that changes based on what is selected. My particular use case would be, for example, an item that onUse would display a small selection of traits and highlighting each would allow that traits description to be displayed below. The selected trait when an accept button is pressed is then added to the champion that used the item. Obviously this has a lot of potential uses, probably chiefly as a shop interface, but I don't know if this qualifies as "one-liner", though it certainly looks like it would be possible at least.

Re: [WIP] GrimTK GUI Framework

Posted: Sat Jan 31, 2015 11:42 pm
by JohnWordsworth
Just a quick preview of what I hope to release tomorrow...

Dialogue System Screenshot

As usual, it will be very easy to use...

Code: Select all

local options = {
	speakerName = "Forest Ogre",
	message = "Hello puny adventurer. I am a nice ogre and I am going to give you one chance to save your skin before I destroy you...",
	responses = {
		{ text = "Hahahah. You do not scare me!" },
		{ text = "Oh. Erm. Okay. Whatever you say." },
		{ text = "Noooo. Please don't hurt me Mr Ogre Sir!" }
	}
}
GTKGui.Dialogue.showDialoguePage(options);
I intend to make it possible to chain together the pages with a single call too, but I've not quite finished designing that. I also hope to add lots of options too (and optional portrait for the speaker, an optional "top image" that sits in the top half of the screen if you want that).

Re: [WIP] GrimTK GUI Framework

Posted: Sun Feb 01, 2015 12:03 am
by Drakkan
JohnWordsworth wrote:Just a quick preview of what I hope to release tomorrow...

Dialogue System Screenshot

As usual, it will be very easy to use...

Code: Select all

local options = {
	speakerName = "Forest Ogre",
	message = "Hello puny adventurer. I am a nice ogre and I am going to give you one chance to save your skin before I destroy you...",
	responses = {
		{ text = "Hahahah. You do not scare me!" },
		{ text = "Oh. Erm. Okay. Whatever you say." },
		{ text = "Noooo. Please don't hurt me Mr Ogre Sir!" }
	}
}
GTKGui.Dialogue.showDialoguePage(options);
I intend to make it possible to chain together the pages with a single call too, but I've not quite finished designing that. I also hope to add lots of options too (and optional portrait for the speaker, an optional "top image" that sits in the top half of the screen if you want that).
cool .I wonder how you define for each answer to which "page" of dialogue go to (or what to do ?)

example:
{ text = "Hahahah. You do not scare me!" },
{ text = "Oh. Erm. Okay. Whatever you say." },
{ text = "Noooo. Please don't hurt me Mr Ogre Sir!" }

if I click text row 1, I want open dialogue where ogre is saying: "I kill you" and when press Ok, dialogue is closed and fight begin
if I click row 2 another dialogue window is opened with another different answers
if I click row 3 answer I want some fucntion to be enabled and some door to be opened... etc.

I think it will be much more cleaner when you release it. cannot wait ! :)

Re: [WIP] GrimTK GUI Framework

Posted: Sun Feb 01, 2015 1:25 am
by JohnWordsworth
So the "single page" option will allow you to provide a callback function, but the full system will allow you to provide multiple "pages" and then simply define which page to go to if they select something. Probably something like this (still WIP).

Code: Select all

pages = {
  { 
    id = "first", speakerName = "John", message = "some text", responses = {
      { text = "Option A", nextPage = "second" },
      { text = "Option B", callback = someFunction }
    },
    id = "second", speakerName = "Drakkan", message = "some other text", responses = {
      { text = "Please repeat that!", nextPage = "first" },
      { text = "Quit", closeDialogue = true }
    }
  }
}
Something like that anyway :)

Re: [WIP] GrimTK GUI Framework

Posted: Sun Feb 01, 2015 9:14 pm
by JohnWordsworth
Going to try to upload a (half-finished) preview version tomorrow, but I didn't get all of the features in today that I'd hoped I'm afraid.

Here's a preview of the latest changes though (might take a while for the high-res one to be available).

http://youtu.be/ZbX5_-dFyhY

Re: [WIP] GrimTK GUI Framework

Posted: Sun Feb 01, 2015 9:24 pm
by Skuggasveinn
This is looking seriously cool :shock:
Fantastic works (as always).

Skuggasveinn.

Re: [WIP] GrimTK GUI Framework

Posted: Sun Feb 01, 2015 11:41 pm
by Grimfan
you are the MAN John!!!!! :shock:

Seriously, this is brilliant stuff. The possibilities this will open up to modders are too many to count.

AH should take note. Grimrock 3 should incorporate these features in some capacity.

Also, take as much time as you need. ;)