Blockland Forums > Modification Help
GUI Functions
jes00:
Could people just state all the GUI functions you know and how many/what vars there are?
The list
-onWake(%this)
How does the onSelect function work? I called it and it says the function does not exist.
Slicksilver:
Jes, there's a method called dump. It exists for all objects. Go make an object, name it arglblargl, and call arglblargl.dump(); It's exactly what you're doing here plus it explains what they do and how to use them.
Nexus:
--- Quote from: jes00 on February 19, 2012, 03:24:50 PM ---
How does the onSelect function work? I called it and it says the function does not exist.
--- End quote ---
It works with a text list control
from Client_Buildbot/client.cs
--- Code: ---function buildbot_filelist::onselect()
{
if($buildbot::doubleclick)
{
if(getsimtime() - $buildbotfileclick < 500)
{
buildbot_open();
$buildbotfileclick = 0;
return 1;
}
$buildbotfileclick = getsimtime();
return 0;
}
buildbot_open();
return 1;
}
function buildbot_open()
{
if((%row = buildbot_filelist.getselectedid()) >= 0)
{
$buildbotpath = $buildbotpath @ getfield(buildbot_filelist.getrowtextbyid(%row), 1);
buildbot_refresh($buildbotpath);
return 1;
}
return 0;
}
--- End code ---
looking back at this, it doesn't look like I accounted for clicking on two different options in rapid succession. I should fix that.
jes00:
--- Quote from: Nexus on February 20, 2012, 03:55:48 PM ---It works with a text list control
from Client_Buildbot/client.cs
--- Code: ---function buildbot_filelist::onselect()
{
if($buildbot::doubleclick)
{
if(getsimtime() - $buildbotfileclick < 500)
{
buildbot_open();
$buildbotfileclick = 0;
return 1;
}
$buildbotfileclick = getsimtime();
return 0;
}
buildbot_open();
return 1;
}
function buildbot_open()
{
if((%row = buildbot_filelist.getselectedid()) >= 0)
{
$buildbotpath = $buildbotpath @ getfield(buildbot_filelist.getrowtextbyid(%row), 1);
buildbot_refresh($buildbotpath);
return 1;
}
return 0;
}
--- End code ---
looking back at this, it doesn't look like I accounted for clicking on two different options in rapid succession. I should fix that.
--- End quote ---
Add-Ons/Client_Friends/Packages.cs (28): Unknown command onSelect.
Port:
--- Quote from: jes00 on February 21, 2012, 07:17:54 AM ---Add-Ons/Client_Friends/Packages.cs (28): Unknown command onSelect.
--- End quote ---
You can't call the command to cause an effect unless it's already defined for that control. What are you trying to do?