Skip to content
Permalink
Browse files

Tab Book Update

Previously the tab book was barely functional. Positioning the tabs to the right, left, or bottom did not work and there was no option to have the tabs draw without images. These changes fix that, but leave off support (for now) of image skinned tabs. It makes heavy use of the new border model.
  • Loading branch information...
greenfire27 committed Mar 5, 2019
1 parent 66b8d40 commit 50a31984d9fbccd880ce570b78e28be7972658f7
Showing with 407 additions and 328 deletions.
  1. BIN engine/compilers/VisualStudio 2017/.vs/Torque 2D/v15/Solution.VC.db
  2. BIN engine/compilers/VisualStudio 2017/.vs/Torque 2D/v15/Solution.VC.db-shm
  3. 0 engine/compilers/VisualStudio 2017/.vs/Torque 2D/v15/Solution.VC.db-wal
  4. BIN engine/compilers/VisualStudio 2017/Torque 2D.aps
  5. +5 −5 engine/compilers/VisualStudio 2017/Torque 2D.rc
  6. +1 −0 engine/compilers/VisualStudio 2017/Torque 2D.vcxproj
  7. +3 −0 engine/compilers/VisualStudio 2017/Torque 2D.vcxproj.filters
  8. +2 −2 engine/source/2d/gui/guiSceneObjectCtrl.cc
  9. +4 −4 engine/source/gui/buttons/guiButtonCtrl.cc
  10. +4 −4 engine/source/gui/buttons/guiCheckBoxCtrl.cc
  11. +2 −2 engine/source/gui/containers/guiFormCtrl.cc
  12. +1 −1 engine/source/gui/containers/guiRolloutCtrl.cc
  13. +145 −179 engine/source/gui/containers/guiTabBookCtrl.cc
  14. +6 −7 engine/source/gui/containers/guiTabBookCtrl.h
  15. +41 −0 engine/source/gui/containers/guiTabBookCtrl_ScriptBinding.h
  16. +3 −3 engine/source/gui/containers/guiWindowCtrl.cc
  17. +3 −3 engine/source/gui/guiConsoleTextCtrl.cc
  18. +111 −65 engine/source/gui/guiControl.cc
  19. +16 −4 engine/source/gui/guiControl.h
  20. +1 −1 engine/source/gui/guiListBoxCtrl.cc
  21. +8 −8 engine/source/gui/guiMLTextCtrl.cc
  22. +3 −3 engine/source/gui/guiMLTextCtrl.h
  23. +4 −4 engine/source/gui/guiPopUpCtrl.cc
  24. +3 −3 engine/source/gui/guiPopUpCtrlEx.cc
  25. +0 −5 engine/source/gui/guiTabPageCtrl.cc
  26. +0 −2 engine/source/gui/guiTabPageCtrl.h
  27. +2 −2 engine/source/gui/guiTextCtrl.cc
  28. +5 −5 engine/source/gui/guiTextEditCtrl.cc
  29. +22 −12 engine/source/gui/guiTypes.cc
  30. +12 −4 engine/source/gui/guiTypes.h
Binary file not shown.
Binary file not shown.
@@ -62,8 +62,8 @@ END
//

VS_VERSION_INFO VERSIONINFO
FILEVERSION 2,0,0,0
PRODUCTVERSION 2,0,0,0
FILEVERSION 4,0,0,0
PRODUCTVERSION 4,0,0,0
FILEFLAGSMASK 0x17L
#ifdef _DEBUG
FILEFLAGS 0x1L
@@ -80,12 +80,12 @@ BEGIN
BEGIN
VALUE "CompanyName", "GarageGames LLC"
VALUE "FileDescription", "Torque 2D MIT"
VALUE "FileVersion", "2, 0, 0, 0"
VALUE "FileVersion", "4, 0, 0, 0"
VALUE "InternalName", "Torque 2D"
VALUE "LegalCopyright", "Copyright (c) 2013 GarageGames, LLC"
VALUE "LegalCopyright", "Copyright (c) 2019 GarageGames, LLC"
VALUE "OriginalFilename", "Torque2D.exe"
VALUE "ProductName", "Torque 2D MIT"
VALUE "ProductVersion", "2, 0, 0, 0"
VALUE "ProductVersion", "4, 0, 0, 0"
END
END
BLOCK "VarFileInfo"
@@ -890,6 +890,7 @@
<ClInclude Include="..\..\source\graphics\TextureObject.h" />
<ClInclude Include="..\..\source\gui\buttons\guiCheckBoxCtrl_ScriptBinding.h" />
<ClInclude Include="..\..\source\gui\containers\guiGridCtrl.h" />
<ClInclude Include="..\..\source\gui\containers\guiTabBookCtrl_ScriptBinding.h" />
<ClInclude Include="..\..\source\gui\guiArrayCtrl.h" />
<ClInclude Include="..\..\source\gui\guiBackgroundCtrl.h" />
<ClInclude Include="..\..\source\gui\guiBitmapCtrl.h" />
@@ -3156,6 +3156,9 @@
<ClInclude Include="..\..\source\gui\buttons\guiCheckBoxCtrl_ScriptBinding.h">
<Filter>gui\buttons</Filter>
</ClInclude>
<ClInclude Include="..\..\source\gui\containers\guiTabBookCtrl_ScriptBinding.h">
<Filter>gui\containers</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<CustomBuild Include="..\..\source\math\mMath_ASM.asm">
@@ -468,10 +468,10 @@ void GuiSceneObjectCtrl::onRender(Point2I offset, const RectI& updateRect)

captionRect.inset(1, 1);
dglSetBitmapModulation( ColorI(0,0,0,255) );
renderJustifiedText(captionRect.point, captionRect.extent, mCaption);
renderText(captionRect.point, captionRect.extent, mCaption, mProfile);
captionRect.inset(1, 1);
dglSetBitmapModulation( mProfile->mFontColor );
renderJustifiedText(captionRect.point, captionRect.extent, mCaption);
renderText(captionRect.point, captionRect.extent, mCaption, mProfile);



@@ -253,7 +253,7 @@ void GuiButtonCtrl::onRender(Point2I offset, const RectI& updateRect)
currentState = GuiControlState::HighlightState;
}

RectI ctrlRect = applyMargins(offset, mBounds.extent, currentState);
RectI ctrlRect = applyMargins(offset, mBounds.extent, currentState, mProfile);
RectI boundsRect(offset, mBounds.extent);

if(mProfile->mBitmapName != NULL && mProfile->constructBitmapArray() >= 36)
@@ -275,9 +275,9 @@ void GuiButtonCtrl::onRender(Point2I offset, const RectI& updateRect)

//Render Text
dglSetBitmapModulation(mProfile->getFontColor(currentState));
RectI fillRect = applyBorders(ctrlRect.point, ctrlRect.extent, currentState);
RectI contentRect = applyPadding(fillRect.point, fillRect.extent, currentState);
renderJustifiedText(contentRect.point, contentRect.extent, mText);
RectI fillRect = applyBorders(ctrlRect.point, ctrlRect.extent, currentState, mProfile);
RectI contentRect = applyPadding(fillRect.point, fillRect.extent, currentState, mProfile);
renderText(contentRect.point, contentRect.extent, mText, mProfile);

//Render the childen
renderChildControls(contentRect.point, contentRect, updateRect);
@@ -78,9 +78,9 @@ void GuiCheckBoxCtrl::onRender(Point2I offset, const RectI &updateRect)
currentState = GuiControlState::HighlightState;
}

RectI ctrlRect = applyMargins(offset, mBounds.extent, currentState);
RectI fillRect = applyBorders(ctrlRect.point, ctrlRect.extent, currentState);
RectI contentRect = applyPadding(fillRect.point, fillRect.extent, currentState);
RectI ctrlRect = applyMargins(offset, mBounds.extent, currentState, mProfile);
RectI fillRect = applyBorders(ctrlRect.point, ctrlRect.extent, currentState, mProfile);
RectI contentRect = applyPadding(fillRect.point, fillRect.extent, currentState, mProfile);
RectI boxRect(contentRect.point + mBoxOffset, mBoxExtent);

//Contrain the Box Rect. It must fit in the content Rect.
@@ -134,7 +134,7 @@ void GuiCheckBoxCtrl::onRender(Point2I offset, const RectI &updateRect)

//Render Text
dglSetBitmapModulation(mProfile->getFontColor(currentState));
renderJustifiedText(textRect.point, textRect.extent, mText);
renderText(textRect.point, textRect.extent, mText, mProfile);

//Render the childen
renderChildControls(offset, contentRect, updateRect);
@@ -243,7 +243,7 @@ void GuiFormCtrl::onRender(Point2I offset, const RectI &updateRect)
if(size() <= 1)
{
dglSetBitmapModulation(ColorI(0,0,0));
renderJustifiedText(boundsRect.point, boundsRect.extent, "[none]");
renderText(boundsRect.point, boundsRect.extent, "[none]", mProfile);
}

S32 textWidth = 0;
@@ -286,7 +286,7 @@ void GuiFormCtrl::onRender(Point2I offset, const RectI &updateRect)
mProfile->mBitmapArrayRects[4]);

dglSetBitmapModulation((mMouseOver ? mProfile->mFontColorHL : mProfile->mFontColor));
renderJustifiedText(Point2I(mThumbSize.x, 0) + offset, Point2I(mBounds.extent.x - mThumbSize.x - mProfile->mBitmapArrayRects[4].extent.x, mThumbSize.y), (mUseSmallCaption ? mSmallCaption : mCaption) );
renderText(Point2I(mThumbSize.x, 0) + offset, Point2I(mBounds.extent.x - mThumbSize.x - mProfile->mBitmapArrayRects[4].extent.x, mThumbSize.y), (mUseSmallCaption ? mSmallCaption : mCaption), mProfile);

}

@@ -352,7 +352,7 @@ void GuiRolloutCtrl::onRender(Point2I offset, const RectI &updateRect)
dglGetBitmapModulation( &currColor );
Point2I textPosition = mHeader.point + offset + mProfile->mTextOffset;
dglSetBitmapModulation( mProfile->mFontColor );
renderJustifiedText( textPosition, mHeader.extent, mCaption );
renderText( textPosition, mHeader.extent, mCaption, mProfile);
dglSetBitmapModulation( currColor );

// If we're collapsed we contain the first child as our content
Oops, something went wrong.

0 comments on commit 50a3198

Please sign in to comment.
You can’t perform that action at this time.