Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix several missing palletbars #1344

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Templates/BaseGame/game/tools/convexEditor/main.tscript
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ function ConvexEditorPlugin::onActivated( %this )
%this.setGridSnap( EWorldEditor.UseGridSnap );

Parent::onActivated( %this );
EditorGui.SetStandardPalletBar();
}

function ConvexEditorPlugin::onDeactivated( %this )
Expand Down
1 change: 1 addition & 0 deletions Templates/BaseGame/game/tools/decalEditor/main.tscript
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ function DecalEditorPlugin::onActivated( %this )
//ShapeEdPropWindow.syncNodeDetails(-1);

Parent::onActivated(%this);
EditorGui.SetStandardPalletBar();
}

function DecalEditorPlugin::onDeactivated( %this )
Expand Down
3 changes: 2 additions & 1 deletion Templates/BaseGame/game/tools/forestEditor/main.tscript
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,8 @@ function ForestEditorPlugin::onActivated( %this )
}

%this.map.push();
Parent::onActivated(%this);
Parent::onActivated(%this);
EditorGui.SetStandardPalletBar();

ForestEditBrushTree.open( ForestBrushSet );
ForestEditMeshTree.open( ForestItemDataSet );
Expand Down
1 change: 1 addition & 0 deletions Templates/BaseGame/game/tools/navEditor/main.tscript
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@ function NavEditorPlugin::onActivated(%this)
NavEditorGui.onEditorActivated();

Parent::onActivated(%this);
EditorGui.SetStandardPalletBar();
}

function NavEditorPlugin::onDeactivated(%this)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1000,6 +1000,24 @@ function EditorGui::syncCameraGui( %this )
/// @name EditorPlugin Methods
/// @{

function EditorGui::SetStandardPalletBar()
{
//Clears the button pallete stack
EWToolsPaletteWindow.setStackCtrl(ToolsPaletteArray); //legacy ctrl adhereance
EWToolsPaletteWindow.clearButtons();

EWToolsPaletteWindow.setActionMap(WorldEditorInspectorPlugin.map);

//Adds a button to the pallete stack
//Name Icon Click Command Tooltip text Keybind
EWToolsPaletteWindow.addButton("Select", "ToolsModule:arrow_n_image", "EWorldEditorNoneModeBtn::onClick();", "", "Select Arrow", "1");
EWToolsPaletteWindow.addButton("Move", "ToolsModule:translate_n_image", "EWorldEditorMoveModeBtn::onClick();", "", "Move Selection", "2");
EWToolsPaletteWindow.addButton("Rotate", "ToolsModule:rotate_n_image", "EWorldEditorRotateModeBtn::onClick();", "", "Rotate Selection", "3");
EWToolsPaletteWindow.addButton("Scale", "ToolsModule:Scale_n_image", "EWorldEditorScaleModeBtn::onClick();", "", "Scale Selection", "4");

EWToolsPaletteWindow.refresh();
}

//------------------------------------------------------------------------------
// WorldEditorPlugin
//------------------------------------------------------------------------------
Expand Down Expand Up @@ -1038,6 +1056,8 @@ function WorldEditorPlugin::onActivated( %this )
SnapToBar-->objectGridSnapBtn.setStateOn( EWorldEditor.UseGridSnap );

Parent::onActivated(%this);

EditorGui.SetStandardPalletBar();
}

function WorldEditorPlugin::onDeactivated( %this )
Expand Down Expand Up @@ -1096,21 +1116,6 @@ function WorldEditorInspectorPlugin::onActivated( %this )
{
Parent::onActivated( %this );

//Clears the button pallete stack
EWToolsPaletteWindow.setStackCtrl(ToolsPaletteArray); //legacy ctrl adhereance
EWToolsPaletteWindow.clearButtons();

EWToolsPaletteWindow.setActionMap(WorldEditorInspectorPlugin.map);

//Adds a button to the pallete stack
//Name Icon Click Command Tooltip text Keybind
EWToolsPaletteWindow.addButton("Select", "ToolsModule:arrow_n_image", "EWorldEditorNoneModeBtn::onClick();", "", "Select Arrow", "1");
EWToolsPaletteWindow.addButton("Move", "ToolsModule:translate_n_image", "EWorldEditorMoveModeBtn::onClick();", "", "Move Selection", "2");
EWToolsPaletteWindow.addButton("Rotate", "ToolsModule:rotate_n_image", "EWorldEditorRotateModeBtn::onClick();", "", "Rotate Selection", "3");
EWToolsPaletteWindow.addButton("Scale", "ToolsModule:Scale_n_image", "EWorldEditorScaleModeBtn::onClick();", "", "Scale Selection", "4");

EWToolsPaletteWindow.refresh();

EditorGui-->InspectorWindow.setVisible( true );
EditorGui-->TreeWindow.setVisible( true );
EditorGui-->WorldEditorToolbar.setVisible( true );
Expand Down Expand Up @@ -1231,6 +1236,7 @@ function TerrainEditorPlugin::onWorldEditorStartup( %this )
function TerrainEditorPlugin::onActivated( %this )
{
Parent::onActivated( %this );
WorldEditorInspectorPlugin::onActivated( %this );

EditorGui.readTerrainEditorSettings();

Expand Down Expand Up @@ -1372,6 +1378,7 @@ function TerrainPainterPlugin::onWorldEditorStartup( %this )
function TerrainPainterPlugin::onActivated( %this )
{
Parent::onActivated( %this );
WorldEditorInspectorPlugin::onActivated( %this );

EditorGui.readTerrainEditorSettings();

Expand Down
Loading