Skip to content

Commit

Permalink
Traktor: Added RGBA toolbar icons to texture editor.
Browse files Browse the repository at this point in the history
  • Loading branch information
apistol78 committed Jun 17, 2024
1 parent 2b93c91 commit 1dd2927
Show file tree
Hide file tree
Showing 3 changed files with 130 additions and 5 deletions.
13 changes: 9 additions & 4 deletions code/Render/Editor/Texture/TextureAssetEditorPage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
#include "Ui/Application.h"
#include "Ui/Bitmap.h"
#include "Ui/Container.h"
#include "Ui/StyleBitmap.h"
#include "Ui/TableLayout.h"
#include "Ui/StatusBar/StatusBar.h"
#include "Ui/ToolBar/ToolBar.h"
Expand Down Expand Up @@ -55,10 +56,14 @@ bool TextureAssetEditorPage::create(ui::Container* parent)

Ref< ui::ToolBar > toolBar = new ui::ToolBar();
toolBar->create(container);
toolBar->addItem(new ui::ToolBarButton(L"R", ui::Command(L"Render.Texture.Editor.ToggleR"), ui::ToolBarButton::BsDefaultToggled));
toolBar->addItem(new ui::ToolBarButton(L"G", ui::Command(L"Render.Texture.Editor.ToggleG"), ui::ToolBarButton::BsDefaultToggled));
toolBar->addItem(new ui::ToolBarButton(L"B", ui::Command(L"Render.Texture.Editor.ToggleB"), ui::ToolBarButton::BsDefaultToggled));
toolBar->addItem(new ui::ToolBarButton(L"A", ui::Command(L"Render.Texture.Editor.ToggleA"), ui::ToolBarButton::BsDefaultToggled));
toolBar->addImage(new ui::StyleBitmap(L"Texture.RGBA", 0));
toolBar->addImage(new ui::StyleBitmap(L"Texture.RGBA", 1));
toolBar->addImage(new ui::StyleBitmap(L"Texture.RGBA", 2));
toolBar->addImage(new ui::StyleBitmap(L"Texture.RGBA", 3));
toolBar->addItem(new ui::ToolBarButton(L"R", 0, ui::Command(L"Render.Texture.Editor.ToggleR"), ui::ToolBarButton::BsDefaultToggled));
toolBar->addItem(new ui::ToolBarButton(L"G", 1, ui::Command(L"Render.Texture.Editor.ToggleG"), ui::ToolBarButton::BsDefaultToggled));
toolBar->addItem(new ui::ToolBarButton(L"B", 2, ui::Command(L"Render.Texture.Editor.ToggleB"), ui::ToolBarButton::BsDefaultToggled));
toolBar->addItem(new ui::ToolBarButton(L"A", 3, ui::Command(L"Render.Texture.Editor.ToggleA"), ui::ToolBarButton::BsDefaultToggled));

Ref< ui::Container > imageContainer = new ui::Container();
imageContainer->create(container, ui::WsNone, new ui::TableLayout(L"100%", L"100%,*", 0_ut, 0_ut));
Expand Down
111 changes: 111 additions & 0 deletions resources/runtime/themes/Shared/Images/Texture/RGBA.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 10 additions & 1 deletion resources/runtime/themes/Shared/StyleSheet.xss
Original file line number Diff line number Diff line change
Expand Up @@ -552,7 +552,11 @@
<first>Texture.PlusMinus</first>
<second>$(Images.Path)/Texture/PlusMinus.svg</second>
</item>

<item>
<first>Texture.RGBA</first>
<second>$(Images.Path)/Texture/RGBA.svg</second>
</item>

<!-- Theme editor -->
<item>
<first>ThemeEditor.Icon</first>
Expand Down Expand Up @@ -892,5 +896,10 @@
<first>traktor.script.Script</first>
<second>$(Images.Path)/Thumbnails/script_Script.svg</second>
</item>

<item>
<first>font-name</first>
<second>Noto Sans</second>
</item>
</values>
</object>

0 comments on commit 1dd2927

Please sign in to comment.