mirror of
https://github.com/Jusctsch5/ironsphererpg.git
synced 2026-01-19 19:44:45 +00:00
Taking everything obtained from http://ironsphererpg2.webs.com/ and dumping it in a git repo
96 lines
2 KiB
Plaintext
96 lines
2 KiB
Plaintext
//--- OBJECT WRITE BEGIN ---
|
|
new GuiControl(TerraformerGui) {
|
|
profile = "GuiDefaultProfile";
|
|
horizSizing = "right";
|
|
vertSizing = "bottom";
|
|
position = "0 0";
|
|
extent = "640 480";
|
|
minExtent = "8 8";
|
|
visible = "True";
|
|
setFirstResponder = "True";
|
|
modal = "True";
|
|
helpTag = "0";
|
|
};
|
|
|
|
new GuiControl(TerraformerToolbarBackgroundGui) {
|
|
profile = "EditorContentProfile";
|
|
horizSizing = "width";
|
|
vertSizing = "bottom";
|
|
position = "0 0";
|
|
extent = "640 30";
|
|
minExtent = "8 8";
|
|
visible = "1";
|
|
setFirstResponder = "0";
|
|
modal = "0";
|
|
helpTag = "0";
|
|
};
|
|
|
|
//--- OBJECT WRITE END ---
|
|
|
|
function TerraformerGui::getPrefs(%this)
|
|
{
|
|
%this.currentView = getPrefSetting($pref::Terraformer::currentView, "HeightfieldView");
|
|
}
|
|
|
|
function TerraformerGui::setPrefs(%this)
|
|
{
|
|
$pref::Terraformer::currentView = %this.currentView;
|
|
}
|
|
|
|
function TerraformerGui::init(%this)
|
|
{
|
|
%this.getPrefs();
|
|
|
|
//
|
|
if(!isObject("terraformer"))
|
|
{
|
|
echo("making a terraformer");
|
|
new Terraformer("terraformer");
|
|
$SelectedOperation = -1;
|
|
$NextOperationId = 1;
|
|
$HeightfieldDirtyRow = -1;
|
|
}
|
|
|
|
TerraformerHeightfieldGui.init();
|
|
TerraformerTextureGui.init();
|
|
}
|
|
|
|
function TerraformerGui::onWake(%this)
|
|
{
|
|
if(!isObject("editor"))
|
|
%this.init();
|
|
|
|
%this.setView(%this.currentView);
|
|
}
|
|
|
|
function TerraformerGui::onSleep(%this)
|
|
{
|
|
%this.setPrefs();
|
|
}
|
|
|
|
function TerraformerGui::setView(%this, %view)
|
|
{
|
|
// clear
|
|
while(%this.getCount())
|
|
%this.remove(%this.getObject(0));
|
|
|
|
//
|
|
switch$(%view)
|
|
{
|
|
case "HeightfieldView":
|
|
%this.add(TerraformerHeightfieldGui);
|
|
TerraformerHeightfieldGui.refresh();
|
|
|
|
case "TextureView":
|
|
%this.add(TerraformerTextureGui);
|
|
TerraformerTextureGui.refresh();
|
|
|
|
default:
|
|
error("TerraformerGui::setView: invalid view '" @ %view @ "'");
|
|
return;
|
|
}
|
|
|
|
%this.add(TerraformerToolbarBackgroundGui);
|
|
%this.currentView = %view;
|
|
}
|