소스 검색

fix guiwindowCTRL callback
also set asset browser to use rows or columns depending on which dimension is longer

AzaezelX 1 년 전
부모
커밋
265ce8429b
2개의 변경된 파일11개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      Engine/source/gui/containers/guiWindowCtrl.cpp
  2. 10 0
      Templates/BaseGame/game/tools/assetBrowser/scripts/assetBrowser.tscript

+ 1 - 1
Engine/source/gui/containers/guiWindowCtrl.cpp

@@ -66,7 +66,7 @@ IMPLEMENT_CALLBACK( GuiWindowCtrl, onCollapse, void, (), (),
    "Called when the window is collapsed by clicking its title bar." );
 IMPLEMENT_CALLBACK( GuiWindowCtrl, onRestore, void, (), (),
    "Called when the window is restored from minimized, maximized, or collapsed state." );
-IMPLEMENT_CALLBACK(GuiWindowCtrl, onResize, void, (S32 posX, S32 posY, S32 width, S32 height), (0, 0, 0, 0),
+IMPLEMENT_CALLBACK(GuiWindowCtrl, onResize, void, (S32 posX, S32 posY, S32 width, S32 height), (posX, posY, width, height),
    "Called when the window is resized in a regular manner by mouse manipulation.");
 IMPLEMENT_CALLBACK(GuiWindowCtrl, onMouseDragged, void, (), (),
    "Called when the height has changed.");

+ 10 - 0
Templates/BaseGame/game/tools/assetBrowser/scripts/assetBrowser.tscript

@@ -2891,4 +2891,14 @@ function AssetBrowserWindow::releasePanel(%this)
    %this.resizing = false;
    
    EditorGui.updateSideBar();
+}
+
+function AssetBrowserWindow::onResize(%this, %posX, %posY, %width, %height)
+{
+    if (%width>%height)
+        AssetBrowser-->assetList.fillRowFirst = true;
+    else
+        AssetBrowser-->assetList.fillRowFirst = false;
+        
+    AssetBrowser.doRebuildAssetArray();
 }