[WIP] GrimTK GUI Framework
- JohnWordsworth
- Posts: 1397
- Joined: Fri Sep 14, 2012 4:19 pm
- Location: Devon, United Kingdom
- Contact:
Re: [WIP] GrimTK GUI Framework
JKos. If I recall correctly, your GUI framework for LOG1 had an "autoexec" mechanism for calling a function from each script entity. Do you have this in the new framework? If so, I can add an autoexec to install the GrimTK methods automatically when using the framework .
My Grimrock Projects Page with links to the Grimrock Model Toolkit, GrimFBX, Atlas Toolkit, QuickBar, NoteBook and the Oriental Weapons Pack.
Re: [WIP] GrimTK GUI Framework
Hello, why that sample map keep crashing when i step at the first pressurre plate? And same thing when i tried to GTKGui.Basic.showInfoMessage("blaa"); to my own map.. what im doing wrong? Installed it like readme said. Im a complete noob at lua and everyting but trying hard...so srry
- JohnWordsworth
- Posts: 1397
- Joined: Fri Sep 14, 2012 4:19 pm
- Location: Devon, United Kingdom
- Contact:
Re: [WIP] GrimTK GUI Framework
Hi Slade. Are you running the latest beta version of Grimrock 2? The latest version of the toolkit only works with 2.2.4 - which is only available through Steam at the moment. If you are not running the Beta, and do not have the Steam version - you can download Alpha 005 for now and then upgrade when the Beta is made public!
My Grimrock Projects Page with links to the Grimrock Model Toolkit, GrimFBX, Atlas Toolkit, QuickBar, NoteBook and the Oriental Weapons Pack.
Re: [WIP] GrimTK GUI Framework
Oh, my version is 2.1.18 apparently, so where i can download that on steam?(why i cant find it) Thanks for the answer btw
Last edited by Slade on Tue Mar 03, 2015 10:17 pm, edited 1 time in total.
- Zo Kath Ra
- Posts: 931
- Joined: Sat Apr 21, 2012 9:57 am
- Location: Germany
Re: [WIP] GrimTK GUI Framework
viewtopic.php?f=18&t=8168&p=82749#p82749Slade wrote:Oh, my version is 2.1.18 apparently, so where i can download that on steam?(why i cant find it) Thanks for the answer
Re: [WIP] GrimTK GUI Framework
@AdrTru:
Oh, right, now I understand what the problem is, the onDrawGui-connector of the grimtk doesn't get called if the party.onDrawGui-hook isn't defined.
This can be fixed by defining a dummy onDrawGui-hook like this in your party-object definition:
Defining onDrawGui with hook-framework doesn't really differ from native in any way (other than that the Party-component definition is inside of a fw_addHooks-function call).
onDrawXXX-hooks aren't passed to hook-framework for performance reasons, and it's not even needed with LoG2 since we can use native connectors if we need add/remove onDraw-hooks at runtime.
@JohnW
autoexec is not a part of the hook-framework, I wanted to keep it as simple as possible. However I made a separate script which implements autoexec viewtopic.php?f=22&t=8132
Oh, right, now I understand what the problem is, the onDrawGui-connector of the grimtk doesn't get called if the party.onDrawGui-hook isn't defined.
This can be fixed by defining a dummy onDrawGui-hook like this in your party-object definition:
Code: Select all
defineObject{
name = "party",
baseObject = "party",
components = {
fw_addHooks{
class = "Party",
onDrawGui = function(party,g)
--Dummy hook for enabling onDrawGui-connectors
end
}
}
}
onDrawXXX-hooks aren't passed to hook-framework for performance reasons, and it's not even needed with LoG2 since we can use native connectors if we need add/remove onDraw-hooks at runtime.
@JohnW
autoexec is not a part of the hook-framework, I wanted to keep it as simple as possible. However I made a separate script which implements autoexec viewtopic.php?f=22&t=8132
- 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
- cloneObject viewtopic.php?f=22&t=8450
- JohnWordsworth
- Posts: 1397
- Joined: Fri Sep 14, 2012 4:19 pm
- Location: Devon, United Kingdom
- Contact:
Re: [WIP] GrimTK GUI Framework
@Slade...
1. Steam -> Library
2. Right Click "Legend of Grimrock 2" and click "Properties".
3. Go to "Betas" tab.
4. Select "beta - " from the dropdown.
You may need to restart Steam afterwards.
@JKos: Strangely, if there is no onDrawXXX method in the party definition - then you cannot hook into it using party.party:addConnector("onDrawGui", ...). So, I had to define a completely empty onDrawGui hook in the party definition so that I could add a connector for it later.
1. Steam -> Library
2. Right Click "Legend of Grimrock 2" and click "Properties".
3. Go to "Betas" tab.
4. Select "beta - " from the dropdown.
You may need to restart Steam afterwards.
@JKos: Strangely, if there is no onDrawXXX method in the party definition - then you cannot hook into it using party.party:addConnector("onDrawGui", ...). So, I had to define a completely empty onDrawGui hook in the party definition so that I could add a connector for it later.
My Grimrock Projects Page with links to the Grimrock Model Toolkit, GrimFBX, Atlas Toolkit, QuickBar, NoteBook and the Oriental Weapons Pack.
Re: [WIP] GrimTK GUI Framework
JKos could be there some collide problem between John GUI and your party hiring GUI ? Just asking, cause I still have John GUI dialogues screwed sometimes :/JKos wrote:@AdrTru:
Oh, right, now I understand what the problem is, the onDrawGui-connector of the grimtk doesn't get called if the party.onDrawGui-hook isn't defined.
This can be fixed by defining a dummy onDrawGui-hook like this in your party-object definition:Defining onDrawGui with hook-framework doesn't really differ from native in any way (other than that the Party-component definition is inside of a fw_addHooks-function call).Code: Select all
defineObject{ name = "party", baseObject = "party", components = { fw_addHooks{ class = "Party", onDrawGui = function(party,g) --Dummy hook for enabling onDrawGui-connectors end } } }
onDrawXXX-hooks aren't passed to hook-framework for performance reasons, and it's not even needed with LoG2 since we can use native connectors if we need add/remove onDraw-hooks at runtime.
@JohnW
autoexec is not a part of the hook-framework, I wanted to keep it as simple as possible. However I made a separate script which implements autoexec viewtopic.php?f=22&t=8132
Re: [WIP] GrimTK GUI Framework
I don't think that it's possible, they don't share same variables or anything, so I can not see how they could interfere with each others.
- 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
- cloneObject viewtopic.php?f=22&t=8450
Re: [WIP] GrimTK GUI Framework
Cool, thanks dudes! Now it works..learned something new about steam too This is everything that i could ask for a mod! I appreciate your work very much John! And one more question.. : Can you activate that dialog with mouse click?(edit i guess with that npc mod.. need to try out)