Merge pull request #959 from Azaezel/alpha41/guiiconBorderfix

fix GuiIconButtonCtrl not taking borderThickness entires
This commit is contained in:
Brian Roberts 2023-02-15 14:37:43 -06:00 committed by GitHub
commit 36771d9f0b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 22 additions and 6 deletions

View file

@ -247,8 +247,10 @@ void GuiIconButtonCtrl::renderButton( Point2I &offset, const RectI& updateRect )
} }
else else
{ {
drawer->drawRectFill(boundsRect, mProfile->mFillColorHL); if (mProfile->mBorder != 0)
drawer->drawRect(boundsRect, mProfile->mBorderColorHL); renderFilledBorder(boundsRect, mProfile->mBorderColorHL, mProfile->mFillColorHL, mProfile->mBorderThickness);
else
GFX->getDrawUtil()->drawRectFill(boundsRect, mProfile->mFillColorHL);
} }
} }
else else
@ -266,13 +268,17 @@ void GuiIconButtonCtrl::renderButton( Point2I &offset, const RectI& updateRect )
{ {
if (mActive) if (mActive)
{ {
drawer->drawRectFill(boundsRect, mProfile->mFillColor); if (mProfile->mBorder != 0)
drawer->drawRect(boundsRect, mProfile->mBorderColor); renderFilledBorder(boundsRect, mProfile->mBorderColor, mProfile->mFillColor, mProfile->mBorderThickness);
else
GFX->getDrawUtil()->drawRectFill(boundsRect, mProfile->mFillColor);
} }
else else
{ {
drawer->drawRectFill(boundsRect, mProfile->mFillColorNA); if (mProfile->mBorder != 0)
drawer->drawRect(boundsRect, mProfile->mBorderColorNA); renderFilledBorder(boundsRect, mProfile->mBorderColorNA, mProfile->mFillColorNA, mProfile->mBorderThickness);
else
GFX->getDrawUtil()->drawRectFill(boundsRect, mProfile->mFillColor);
} }
} }
} }

View file

@ -6,6 +6,7 @@ singleton GuiControlProfile(AssetBrowserPreviewImageAsset : ToolsGuiDefaultProfi
border = true; border = true;
borderColor = "230 126 0 255"; borderColor = "230 126 0 255";
borderColorNA = "230 126 0 255"; borderColorNA = "230 126 0 255";
borderThickness = 5;
}; };
singleton GuiControlProfile(AssetBrowserPreviewMaterialAsset : ToolsGuiDefaultProfile) singleton GuiControlProfile(AssetBrowserPreviewMaterialAsset : ToolsGuiDefaultProfile)
@ -16,6 +17,7 @@ singleton GuiControlProfile(AssetBrowserPreviewMaterialAsset : ToolsGuiDefaultPr
border = true; border = true;
borderColor = "0 100 0 255"; borderColor = "0 100 0 255";
borderColorNA = "0 100 0 255"; borderColorNA = "0 100 0 255";
borderThickness = 5;
}; };
singleton GuiControlProfile(AssetBrowserPreviewShapeAsset : ToolsGuiDefaultProfile) singleton GuiControlProfile(AssetBrowserPreviewShapeAsset : ToolsGuiDefaultProfile)
@ -26,6 +28,7 @@ singleton GuiControlProfile(AssetBrowserPreviewShapeAsset : ToolsGuiDefaultProfi
border = true; border = true;
borderColor = "0 0 200 255"; borderColor = "0 0 200 255";
borderColorNA = "0 0 200 255"; borderColorNA = "0 0 200 255";
borderThickness = 5;
}; };
singleton GuiControlProfile(AssetBrowserPreviewShapeAnimationAsset : ToolsGuiDefaultProfile) singleton GuiControlProfile(AssetBrowserPreviewShapeAnimationAsset : ToolsGuiDefaultProfile)
@ -36,6 +39,7 @@ singleton GuiControlProfile(AssetBrowserPreviewShapeAnimationAsset : ToolsGuiDef
border = true; border = true;
borderColor = "0 0 200 255"; borderColor = "0 0 200 255";
borderColorNA = "0 0 200 255"; borderColorNA = "0 0 200 255";
borderThickness = 5;
}; };
singleton GuiControlProfile(AssetBrowserPreviewSoundAsset : ToolsGuiDefaultProfile) singleton GuiControlProfile(AssetBrowserPreviewSoundAsset : ToolsGuiDefaultProfile)
@ -46,6 +50,7 @@ singleton GuiControlProfile(AssetBrowserPreviewSoundAsset : ToolsGuiDefaultProfi
border = true; border = true;
borderColor = "75 101 135 255"; borderColor = "75 101 135 255";
borderColorNA = "75 101 135 255"; borderColorNA = "75 101 135 255";
borderThickness = 5;
}; };
singleton GuiControlProfile(AssetBrowserPreviewTerrainAsset : ToolsGuiDefaultProfile) singleton GuiControlProfile(AssetBrowserPreviewTerrainAsset : ToolsGuiDefaultProfile)
@ -56,6 +61,7 @@ singleton GuiControlProfile(AssetBrowserPreviewTerrainAsset : ToolsGuiDefaultPro
border = true; border = true;
borderColor = "200 198 198 255"; borderColor = "200 198 198 255";
borderColorNA = "200 198 198 255"; borderColorNA = "200 198 198 255";
borderThickness = 5;
}; };
singleton GuiControlProfile(AssetBrowserPreviewTerrainMaterialAsset : ToolsGuiDefaultProfile) singleton GuiControlProfile(AssetBrowserPreviewTerrainMaterialAsset : ToolsGuiDefaultProfile)
@ -66,6 +72,7 @@ singleton GuiControlProfile(AssetBrowserPreviewTerrainMaterialAsset : ToolsGuiDe
border = true; border = true;
borderColor = "200 198 198 255"; borderColor = "200 198 198 255";
borderColorNA = "200 198 198 255"; borderColorNA = "200 198 198 255";
borderThickness = 5;
}; };
singleton GuiControlProfile(AssetBrowserPreviewStateMachineAsset : ToolsGuiDefaultProfile) singleton GuiControlProfile(AssetBrowserPreviewStateMachineAsset : ToolsGuiDefaultProfile)
@ -76,6 +83,7 @@ singleton GuiControlProfile(AssetBrowserPreviewStateMachineAsset : ToolsGuiDefau
border = true; border = true;
borderColor = "0 76 135 255"; borderColor = "0 76 135 255";
borderColorNA = "0 76 135 255"; borderColorNA = "0 76 135 255";
borderThickness = 5;
}; };
singleton GuiControlProfile(AssetBrowserPreviewGUIAsset : ToolsGuiDefaultProfile) singleton GuiControlProfile(AssetBrowserPreviewGUIAsset : ToolsGuiDefaultProfile)
@ -86,6 +94,7 @@ singleton GuiControlProfile(AssetBrowserPreviewGUIAsset : ToolsGuiDefaultProfile
border = true; border = true;
borderColor = "17 5 44 255"; borderColor = "17 5 44 255";
borderColorNA = "17 5 44 255"; borderColorNA = "17 5 44 255";
borderThickness = 5;
}; };
singleton GuiControlProfile(AssetBrowserPreviewLevelAsset : ToolsGuiDefaultProfile) singleton GuiControlProfile(AssetBrowserPreviewLevelAsset : ToolsGuiDefaultProfile)
@ -96,4 +105,5 @@ singleton GuiControlProfile(AssetBrowserPreviewLevelAsset : ToolsGuiDefaultProfi
border = true; border = true;
borderColor = "0 208 186 255"; borderColor = "0 208 186 255";
borderColorNA = "0 208 186 255"; borderColorNA = "0 208 186 255";
borderThickness = 5;
}; };