[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
User avatar
cromcrom
Posts: 549
Joined: Tue Sep 11, 2012 7:16 am
Location: Chateauroux in a socialist s#!$*&% formerly known as "France"

Re: [WIP] GrimTK GUI Framework

Post by cromcrom » Sun Mar 01, 2015 3:34 pm

Freakin' awesome, thank you so very much :-)
A trip of a thousand leagues starts with a step.

User avatar
JohnWordsworth
Posts: 1387
Joined: Fri Sep 14, 2012 4:19 pm
Location: Devon, United Kingdom
Contact:

Re: [WIP] GrimTK GUI Framework

Post by JohnWordsworth » Sun Mar 01, 2015 8:10 pm

Alpha 006 uploaded with the latest changes. I haven't had a chance yet to finish the cinematic module though I'm afraid.

Enjoy!
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: 1387
Joined: Fri Sep 14, 2012 4:19 pm
Location: Devon, United Kingdom
Contact:

Re: [WIP] GrimTK GUI Framework

Post by JohnWordsworth » Sun Mar 01, 2015 10:38 pm

Oooh - One important note!

Alpha 006 and onwards requires the 2.2.4 beta version of LOG2!

Also, I have changed the field "image" for the GImageView component to "imageName", so if anything has broken and you are using image views, that is probably it.
My Grimrock Projects Page with links to the Grimrock Model Toolkit, GrimFBX, Atlas Toolkit, QuickBar, NoteBook and the Oriental Weapons Pack.

User avatar
Eleven Warrior
Posts: 726
Joined: Thu Apr 18, 2013 2:32 pm
Location: Australia

Re: [WIP] GrimTK GUI Framework

Post by Eleven Warrior » Mon Mar 02, 2015 8:40 am

Hi errr sorry but is Alpha 6 out? If it is I cannot see it on the first page of this post only 2 thxs :)

User avatar
JohnWordsworth
Posts: 1387
Joined: Fri Sep 14, 2012 4:19 pm
Location: Devon, United Kingdom
Contact:

Re: [WIP] GrimTK GUI Framework

Post by JohnWordsworth » Mon Mar 02, 2015 8:48 am

Hi Eleven Warrior! Ahh, the links all go to the same place - the files are all stored on the nexus mods site...

http://www.nexusmods.com/legendofgrimrock2/mods/23/

You will always find the latest version there, I just don't always remember to update the front page.
My Grimrock Projects Page with links to the Grimrock Model Toolkit, GrimFBX, Atlas Toolkit, QuickBar, NoteBook and the Oriental Weapons Pack.

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 » Mon Mar 02, 2015 8:59 am

I found there little bug in core.lua in self.drawIcon must be:

Code: Select all

				local builtInGfxAtlasIndex = math.floor(args.gfxIndex / 200);
				index = index - (builtInGfxAtlasIndex * 200); 
becouse internal icons have pictures in matrix 13x13, but next set begin index is 200.

And I have problem with Jkos FW integration in same dung as GrimTk. This problem I didnt solved.
My LOG2 projects: virtual money, Forge recipes, liquid potions and
MultiAlcoveManager, Toolbox, Graphic text,

User avatar
Eleven Warrior
Posts: 726
Joined: Thu Apr 18, 2013 2:32 pm
Location: Australia

Re: [WIP] GrimTK GUI Framework

Post by Eleven Warrior » Mon Mar 02, 2015 9:12 am

Hi John eerr yeah I did not check nexus out sorry about that lol. I have now downloaded the new version thxs a lot for your awesome work bro good job :)

User avatar
Drakkan
Posts: 1317
Joined: Mon Dec 31, 2012 12:25 am

Re: [WIP] GrimTK GUI Framework

Post by Drakkan » Mon Mar 02, 2015 10:04 am

AdrTru wrote:I found there little bug in core.lua in self.drawIcon must be:

Code: Select all

				local builtInGfxAtlasIndex = math.floor(args.gfxIndex / 200);
				index = index - (builtInGfxAtlasIndex * 200); 
becouse internal icons have pictures in matrix 13x13, but next set begin index is 200.

And I have problem with Jkos FW integration in same dung as GrimTk. This problem I didnt solved.
AdrTru wrote:I found there little bug in core.lua in self.drawIcon must be:

Code: Select all

				local builtInGfxAtlasIndex = math.floor(args.gfxIndex / 200);
				index = index - (builtInGfxAtlasIndex * 200); 
becouse internal icons have pictures in matrix 13x13, but next set begin index is 200.

And I have problem with Jkos FW integration in same dung as GrimTk. This problem I didnt solved.
Hi AdrTru, could you specify the problem ? I am using Jkos hooks as well in my dungeon. i have random problem with GUI, when starting some dialogue (with GTK picture defined) and I click on first id response I got error: GTK dialogue response called but no current page... and game is stacked. :/ it is quite random, sometimes dialogue is working with that and next time it is not :/
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 » Tue Mar 03, 2015 6:15 pm

GrimTK defines party.onRest and party.onWakeUp hooks in grimtk init.lua, so if you use framework party hooks you must add them to framework for example like this:

to some script entity

Code: Select all

function fwAddGrimtkHooks()
	local gtkhook = function()
		if ( findEntity("GTK") ) then
			if ( GTK.Core.GUI:isPartyLocked() ) then
				return false;
			end
		end		
	end
	fw.script:set('party.grimtk.onRest',gtkhook)
	fw.script:set('party.grimtk.onWakeUp',gtkhook)
end
and call fwAddGrimtkHooks() from some appropriate place. There should not be other conflicts.
- 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 » Tue Mar 03, 2015 7:24 pm

Thank you JKos.
Your solution working and is nice and simple :)

EDIT:
After some time this hooks finish correct working.
There is problem with onDrawGui, its not called and in FWhook site isnt describe how activate GUI hooks.
My LOG2 projects: virtual money, Forge recipes, liquid potions and
MultiAlcoveManager, Toolbox, Graphic text,

Post Reply