[WIP] GrimTK GUI Framework
- 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
Is there a way to not make the UI "transparent" ? When I click on a button, if there is an item "behind" (say, for example, on an alcove), it will grab that item. Leading to a "bug", if the clicked button should destroy that alcove item. (I encountered this problem quite a lot of times before figuring out. )
I could probably write a bugproof function (if mouseItem then return) of some sort, but well.
If anybody has a tip, most welcome. Thanks.
I could probably write a bugproof function (if mouseItem then return) of some sort, but well.
If anybody has a tip, most welcome. Thanks.
A trip of a thousand leagues starts with a step.
- JohnWordsworth
- Posts: 1397
- Joined: Fri Sep 14, 2012 4:19 pm
- Location: Devon, United Kingdom
- Contact:
Re: [WIP] GrimTK GUI Framework
Hmm, I hit this problem the other day with the ORRR3. I have yet to solve the issue (not that I've tried for long), but will have a think about it and post a solution. I'm hoping that a button will block mouse input to the game world, and then I could just place a big button behind every window automatically. Failing that, we might need to disable any surfaces / clickable entities in the spaces around the player and then re-enable them later.
Will ponder and get back to you!
Other news about GrimTK - I'm working on a crafting system for the ORRR3 which will come bundled with GrimTK. It's very similar in style to Skyrim - Select Category -> Select Item -> Click Build.
Will ponder and get back to you!
Other news about GrimTK - I'm working on a crafting system for the ORRR3 which will come bundled with GrimTK. It's very similar in style to Skyrim - Select Category -> Select Item -> Click Build.
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
Cromcrom & john,cromcrom wrote:Is there a way to not make the UI "transparent" ? When I click on a button, if there is an item "behind" (say, for example, on an alcove), it will grab that item. Leading to a "bug", if the clicked button should destroy that alcove item. (I encountered this problem quite a lot of times before figuring out. )
I could probably write a bugproof function (if mouseItem then return) of some sort, but well.
If anybody has a tip, most welcome. Thanks.
Last post here was from November - you guys may have found solutions to the 'transparent' UI - being able to interact with objects, pick up and throw items through the UI etc
I have also encountered logistical issues with this while creating my picklocking system, Question - do we have a solution to this??
If not, here is how I have hacked around it (correct me if there is a better way pls)
My system requires you to keep pick locks in the mouse cursor through out the picklocking process - so I needed to move my UI buttons into areas of the screen that you cant throw or place items into
If you click on the clickable area of the chest through the Champ Select menu - then it just takes you back to the Main Menu anyways
These are the positions of the spawned UI menus
SpoilerShow
SpoilerShow
Also, I have written some functions to make sure you cant pick up items while UI menus are activated....
Place in a script called guiExpScript
SpoilerShow
Code: Select all
--place all names of menus you are using in this table
guiWindows = {"gtk-select-menu-small", "gtk_info_message", "log2-messagebox-champSelect", "gtk-info-message-box", "log2-messagebox-large", "log2-messagebox-small",
"gtk-select-menu-option", "gtk-select-menu", "log2-textinputbox", "gtk_text_input"}
function getGuiWindows() --check if any of the windows in the table are currently spawned
for i = 1,#guiWindows do
local name = guiWindows[i]
local winList = GTK.Core.GUI:getWindow(name)
if winList then
return true
else
return false
end
end
end
SpoilerShow
Code: Select all
onPickUpItem = function(self, item)
if guiExpScript.script.getGuiWindows() then
return false
end
Labyrinth of Lies (viewtopic.php?f=14&t=4400)
Legacy of Lies (viewtopic.php?f=22&t=12983&hilit=+legacy)
Legacy of Lies (viewtopic.php?f=22&t=12983&hilit=+legacy)
Re: [WIP] GrimTK GUI Framework
Can anyone help me, how to lock the party while a messagebox or a selectmenue is open?
I had a look into the examples and for a dialogue there is this:
But I cannot find out IF ther is a way, to put this also into messageboxes/selectmenues, and if WHERE to put.
Has anyone an idea?
I had a look into the examples and for a dialogue there is this:
Code: Select all
local dialogue = {
lockParty = true,
pages = {... ... ...
Has anyone an idea?
Re: [WIP] GrimTK GUI Framework
What is the mod directory path the pictures that are used in the dialogue scripts should be placed in when uploading the mod to say steam? I'm able to pull them into the dialogue via the editor no problem however once uploaded to steam it results in a crash when triggered. I'm guessing just like the custom portraits being uploaded there is a very specific location and format that needs to be used so it will upload properly. Portraits needed to be 128x128 dds format and placed in the mod_assets/textures/portraits folder. Those work fine. The pictures in question for the dialogue are dds format and 192x192 and do not display when triggered in the dialogue scripts once published. Again they do work inside the editor.
Code: Select all
function gtkDidLoad()
GTK.Core.GUI:addImage({ name="davion", path="mod_assets/ext/grimtk/samples/davion.tga", size={192, 192} });
end
isDone = false;
function showIntroDialogue(sender)
if ( isDone == true ) then
return;
end
local dialogue = {
lockParty = true,
pages = {
{
id = "page1",
mainImage = "davion",
mainMessage = "Spoilers",
speakerMessage = "Yysara:",
responses = {
{ text = "Spoilers", nextPage = "page2" },
}
},
{
id = "page2",
mainImage = "davion",
mainMessage = "Spoilers,
speakerMessage = "Yysara",
responses = {
{ text = "Spoilers", nextPage = "page3" },
}
},
{
id = "page3",
mainImage = "davion",
mainMessage = "Spoilers",
speakerMessage = "Yysara",
responses = {
{ text = "<Spoilers.>"},
}
}
}
}
GTKGui.Dialogue.startDialogue(dialogue);
end
function hideDemoDialogue()
GTKGui.Dialogue.hideDialogue();
end
Re: [WIP] GrimTK GUI Framework
Only files that are somewhere in the mod_assets directory, and whose filenames end in .dds, .lua, .model, .animation, .wav, .ogg, or .ivf, will be exported. If you are trying to use files that actually end in .tga or .DDS instead of .dds, they won't work, even if they're actually dds files, because the game only checks the extension when exporting.
Grimrock 1 dungeon
Grimrock 2 resources
I no longer answer scripting questions in private messages. Please ask in a forum topic or this Discord server.
Grimrock 2 resources
I no longer answer scripting questions in private messages. Please ask in a forum topic or this Discord server.
Re: [WIP] GrimTK GUI Framework
The files are in dds format and have the dds extension and are not importing over. I'm suspecting that they need to be in a specific directory for the import just as the portraits do. Im not sure if this is a steam only problem or not.
Re: [WIP] GrimTK GUI Framework
Can you at least provide the error message and console output for the crash?
Grimrock 1 dungeon
Grimrock 2 resources
I no longer answer scripting questions in private messages. Please ask in a forum topic or this Discord server.
Grimrock 2 resources
I no longer answer scripting questions in private messages. Please ask in a forum topic or this Discord server.
Re: [WIP] GrimTK GUI Framework
I don't receive an error message it just crashes to desktop. Where would I capture such a message to report back?
Re: [WIP] GrimTK GUI Framework
Run the Grimrock 2 executable file from the command prompt (Windows) or a terminal (Mac OS).
Grimrock 1 dungeon
Grimrock 2 resources
I no longer answer scripting questions in private messages. Please ask in a forum topic or this Discord server.
Grimrock 2 resources
I no longer answer scripting questions in private messages. Please ask in a forum topic or this Discord server.