Conditional hiding (control)
Sorry for the not-programmer language ahead!
Within the confines of a window-within-a-window I have a button that does this:
Code:
function onClickDown()
local nodeWin = window.getDatabaseNode();
local XP = nodeWin.getChild("skill_xp").getValue();
local XPpay = nodeWin.getChild("skill_xptolvl").getValue();
local XPnew = XP-XPpay;
nodeWin.getChild("skill_xp").setValue(XPnew);
end
function onClickRelease()
local nodeWin = window.getDatabaseNode();
local nSkill = nodeWin.getChild("skill_current").getValue();
local nSkillnew = nSkill+1;
nodeWin.getChild("skill_current").setValue(nSkillnew);
end
Works like a charm the way I have set the window up to serve the parent windowlist.
Now, I want to hide the button, making it accessible only if the current skill_xp value exceeds or equals the current skill_xptolvl value. But is that at all possible?