remove imgui_test_engine from editor namespace
This commit is contained in:
@@ -1,16 +1,15 @@
|
||||
#include "message_editor.h"
|
||||
|
||||
#include <absl/status/status.h>
|
||||
#include <absl/strings/str_format.h>
|
||||
#include <absl/strings/str_replace.h>
|
||||
#include <absl/strings/str_split.h>
|
||||
|
||||
#include <regex>
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
#include <unordered_map>
|
||||
#include <vector>
|
||||
|
||||
#include "absl/status/status.h"
|
||||
#include "absl/strings/str_format.h"
|
||||
#include "absl/strings/str_replace.h"
|
||||
#include "absl/strings/str_split.h"
|
||||
#include "app/core/common.h"
|
||||
#include "app/editor/utils/editor.h"
|
||||
#include "app/gfx/bitmap.h"
|
||||
@@ -525,8 +524,7 @@ string MessageEditor::ParseTextDataByte(uint8_t value) {
|
||||
}
|
||||
|
||||
void MessageEditor::DrawTileToPreview(int x, int y, int srcx, int srcy, int pal,
|
||||
bool mirror_x, bool mirror_y, int sizex,
|
||||
int sizey) {
|
||||
int sizex, int sizey) {
|
||||
int drawid = srcx + (srcy * 32);
|
||||
for (int yl = 0; yl < sizey * 8; yl++) {
|
||||
for (int xl = 0; xl < 4; xl++) {
|
||||
@@ -580,8 +578,7 @@ void MessageEditor::DrawCharacterToPreview(const std::vector<uint8_t>& text) {
|
||||
text_line++;
|
||||
}
|
||||
|
||||
DrawTileToPreview(text_pos, text_line * 16, srcx, srcy, 0, false, false,
|
||||
1, 2);
|
||||
DrawTileToPreview(text_pos, text_line * 16, srcx, srcy, 0, 1, 2);
|
||||
text_pos += width_array[value];
|
||||
} else if (value == kLine1) {
|
||||
text_pos = 0;
|
||||
|
||||
@@ -1,11 +1,6 @@
|
||||
#ifndef YAZE_APP_EDITOR_MESSAGE_EDITOR_H
|
||||
#define YAZE_APP_EDITOR_MESSAGE_EDITOR_H
|
||||
|
||||
#include <absl/status/status.h>
|
||||
#include <absl/strings/str_format.h>
|
||||
#include <absl/strings/str_replace.h>
|
||||
#include <absl/strings/str_split.h>
|
||||
|
||||
#include <iostream>
|
||||
#include <regex>
|
||||
#include <sstream>
|
||||
@@ -13,7 +8,10 @@
|
||||
#include <unordered_map>
|
||||
#include <vector>
|
||||
|
||||
#include "app/core/testable.h"
|
||||
#include "absl/status/status.h"
|
||||
#include "absl/strings/str_format.h"
|
||||
#include "absl/strings/str_replace.h"
|
||||
#include "absl/strings/str_split.h"
|
||||
#include "app/editor/message/message_data.h"
|
||||
#include "app/editor/utils/editor.h"
|
||||
#include "app/gfx/bitmap.h"
|
||||
@@ -185,9 +183,7 @@ static const std::unordered_map<uint8_t, wchar_t> CharEncoder = {
|
||||
static TextElement DictionaryElement =
|
||||
TextElement(0x80, DICTIONARYTOKEN, true, "Dictionary");
|
||||
|
||||
class MessageEditor : public Editor,
|
||||
public SharedRom,
|
||||
public core::GuiTestable {
|
||||
class MessageEditor : public Editor, public SharedRom {
|
||||
public:
|
||||
struct DictionaryEntry {
|
||||
uint8_t ID;
|
||||
@@ -242,7 +238,7 @@ class MessageEditor : public Editor,
|
||||
absl::Status Save();
|
||||
void Delete();
|
||||
void SelectAll();
|
||||
void RegisterTests(ImGuiTestEngine* e) override;
|
||||
// void RegisterTests(ImGuiTestEngine* e) override;
|
||||
|
||||
TextElement FindMatchingCommand(uint8_t byte);
|
||||
TextElement FindMatchingSpecial(uint8_t value);
|
||||
@@ -252,7 +248,6 @@ class MessageEditor : public Editor,
|
||||
static uint8_t FindDictionaryEntry(uint8_t value);
|
||||
static uint8_t FindMatchingCharacter(char value);
|
||||
void DrawTileToPreview(int x, int y, int srcx, int srcy, int pal,
|
||||
bool mirror_x = false, bool mirror_y = false,
|
||||
int sizex = 1, int sizey = 1);
|
||||
void DrawCharacterToPreview(char c);
|
||||
void DrawCharacterToPreview(const std::vector<uint8_t>& text);
|
||||
@@ -368,4 +363,4 @@ static std::vector<MessageEditor::DictionaryEntry> AllDictionaries;
|
||||
} // namespace app
|
||||
} // namespace yaze
|
||||
|
||||
#endif // YAZE_APP_EDITOR_MESSAGE_EDITOR_H
|
||||
#endif // YAZE_APP_EDITOR_MESSAGE_EDITOR_H
|
||||
|
||||
@@ -1,22 +1,7 @@
|
||||
#include "message_editor.h"
|
||||
|
||||
#include "app/core/testable.h"
|
||||
|
||||
namespace yaze {
|
||||
namespace app {
|
||||
namespace editor {
|
||||
|
||||
void MessageEditor::RegisterTests(ImGuiTestEngine* e) {
|
||||
test_engine = e;
|
||||
ImGuiTest* t = nullptr;
|
||||
|
||||
t = IM_REGISTER_TEST(e, "message_editor", "read_all_text_data");
|
||||
t->TestFunc = [](ImGuiTestContext* ctx) {
|
||||
ctx->SetRef("##YazeMain/##TabBar/Message");
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
} // namespace editor
|
||||
namespace editor {} // namespace editor
|
||||
} // namespace app
|
||||
} // namespace yaze
|
||||
|
||||
Reference in New Issue
Block a user