I figured it was a better and more logical idea to add local serveroptions at the same place that all other options were located, so I wrote up some code that allows you to do that.
PHP Code:
//#CLIENTSIDE
const SERVERNAME = "Maloria"; // Change this to your likings.
function onCreated()
if (OptDialogWindow2D.visible)
setInitialData();
function OptDialogWindow2D.onShow()
{
if (!isObject(OptionTabs))
setInitialData();
updateSelectedTab();
if (OptDialogTab.rows[1].text != SERVERNAME) {
this.originalSize = { 444, 404 }; // Default dimensions of OptDialogWindow2D
OptDialogWindow2D.resize(OptDialogWindow2D.x, OptDialogWindow2D.y, this.originalSize[0] + 47, this.originalSize[1]);
OptDialogTab.insertRow(1, 4, SERVERNAME);
}
new GuiControl("OptServerPane2D") {
this.profile = GuiOptPaneProfile;
this.x = OptGeneralPane2D.x;
this.y = OptGeneralPane2D.y;
this.width = OptGeneralPane2D.width;
this.height = OptGeneralPane2D.height;
this.visible = false;
OptDialogWindow2D.addControl(this);
// Add subsequent GUI controls here
}
OptDialogTab.setSelectedRow(0);
}
function OptDialogTab.onSelect(temp.id, temp.text, temp.row)
{
if (temp.text == SERVERNAME) {
temp.lastSelectedTabName = getSelectedTabText();
OptionTabs.(@temp.lastSelectedTabName).hide();
OptServerPane2D.show();
}
else if (OptServerPane2D.visible)
OptServerPane2D.hide();
updateSelectedTab();
}
function setInitialData()
{
this.tabs = new TStaticVar("OptionTabs");
OptionTabs.General = OptGeneralPane2D;
OptionTabs.Sound = OptAudioPane2D;
OptionTabs.Keys = OptControlsPane2D;
OptionTabs.Capture = OptCapturePane2D;
}
function updateSelectedTab()
this.selectedTab = OptDialogTab.getselectedrow();
function getSelectedTabID()
return this.selectedTab;
function getSelectedTabText()
return OptDialogTab.rows[getSelectedTabID()].text;
Each time that the F3 menu is opened, it clears tabs. This is a great thing, because it means your custom tabs won't remain upon changing servers. The only change that will remain until your game client is restarted, is that the windows width is slightly increased when the new tab is added. This could likely be easily fixed if the script on Login would be updated by Stefan/Skyld/Tig to reset the windows dimensions each time it's opened.
Enjoy