add/remove icons in editor
This commit is contained in:
@@ -4,6 +4,8 @@
|
||||
|
||||
#include "app/core/platform/file_dialog.h"
|
||||
#include "app/gui/widgets.h"
|
||||
#include "app/gui/input.h"
|
||||
#include "app/gui/icons.h"
|
||||
#include "core/constants.h"
|
||||
|
||||
namespace yaze {
|
||||
@@ -223,7 +225,7 @@ void AssemblyEditor::DrawFileTabView() {
|
||||
static int next_tab_id = 0;
|
||||
|
||||
if (ImGui::BeginTabBar("AssemblyFileTabBar", ImGuiTabBarFlags_None)) {
|
||||
if (ImGui::TabItemButton("+", ImGuiTabItemFlags_None)) {
|
||||
if (ImGui::TabItemButton(ICON_MD_ADD, ImGuiTabItemFlags_None)) {
|
||||
if (std::find(active_files_.begin(), active_files_.end(),
|
||||
current_file_id_) != active_files_.end()) {
|
||||
// Room is already open
|
||||
|
||||
@@ -420,7 +420,7 @@ void DungeonEditor::DrawDungeonTabView() {
|
||||
static int next_tab_id = 0;
|
||||
|
||||
if (ImGui::BeginTabBar("MyTabBar", kDungeonTabBarFlags)) {
|
||||
if (ImGui::TabItemButton("+", kDungeonTabFlags)) {
|
||||
if (ImGui::TabItemButton(ICON_MD_ADD, kDungeonTabFlags)) {
|
||||
if (std::find(active_rooms_.begin(), active_rooms_.end(),
|
||||
current_room_id_) != active_rooms_.end()) {
|
||||
// Room is already open
|
||||
|
||||
@@ -231,7 +231,7 @@ absl::Status GraphicsEditor::UpdateGfxTabView() {
|
||||
|
||||
if (ImGui::BeginTabBar("##GfxEditTabBar", kGfxEditTabBarFlags)) {
|
||||
if (ImGui::TabItemButton(
|
||||
"+", ImGuiTabItemFlags_Trailing | ImGuiTabItemFlags_NoTooltip)) {
|
||||
ICON_MD_ADD, ImGuiTabItemFlags_Trailing | ImGuiTabItemFlags_NoTooltip)) {
|
||||
open_sheets_.insert(next_tab_id++);
|
||||
}
|
||||
|
||||
|
||||
@@ -313,7 +313,7 @@ void MasterEditor::ManageActiveEditors() {
|
||||
}
|
||||
}
|
||||
|
||||
if (ImGui::TabItemButton("+", ImGuiTabItemFlags_Trailing)) {
|
||||
if (ImGui::TabItemButton(ICON_MD_ADD, ImGuiTabItemFlags_Trailing)) {
|
||||
show_add_editor = true;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#include "sprite_editor.h"
|
||||
|
||||
#include <gui/icons.h>
|
||||
#include <gui/input.h>
|
||||
|
||||
namespace yaze {
|
||||
@@ -37,7 +38,7 @@ absl::Status SpriteEditor::Update() {
|
||||
static int next_tab_id = 0;
|
||||
|
||||
if (ImGui::BeginTabBar("SpriteTabBar", kSpriteTabBarFlags)) {
|
||||
if (ImGui::TabItemButton("+", kSpriteTabBarFlags)) {
|
||||
if (ImGui::TabItemButton(ICON_MD_ADD, kSpriteTabBarFlags)) {
|
||||
if (std::find(active_sprites_.begin(), active_sprites_.end(),
|
||||
current_sprite_id_) != active_sprites_.end()) {
|
||||
// Room is already open
|
||||
|
||||
Reference in New Issue
Block a user