
I could probably write a bugproof function (if mouseItem then return) of some sort, but well.
If anybody has a tip, most welcome. Thanks.
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.
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
Code: Select all
onPickUpItem = function(self, item)
if guiExpScript.script.getGuiWindows() then
return false
end
Code: Select all
local dialogue = {
lockParty = true,
pages = {... ... ...
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