调整目录结构
This commit is contained in:
@@ -1,13 +1,13 @@
|
||||
#include <iostream>
|
||||
|
||||
#include "mirage.h"
|
||||
#include "window/mwindow.h"
|
||||
#include "font/font_system.h"
|
||||
#include "style/mirage_style.h"
|
||||
#include "widget/widget_new.h"
|
||||
#include "widget/compound_widget/mbutton.h"
|
||||
#include "widget/leaf_widget/mtext_block.h"
|
||||
#include "widget/panel_widget/mbox.h"
|
||||
#include "widget/widget_new.h"
|
||||
#include "window/mwindow.h"
|
||||
|
||||
#include "utf8.h"
|
||||
#include "misc/log_util.h"
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
project(mirage_app)
|
||||
|
||||
set(SRC_FILES)
|
||||
retrieve_files(${CMAKE_CURRENT_SOURCE_DIR} SRC_FILES)
|
||||
retrieve_files(${CMAKE_CURRENT_SOURCE_DIR}/src SRC_FILES)
|
||||
add_library(${PROJECT_NAME} STATIC ${SRC_FILES})
|
||||
|
||||
target_include_directories(${PROJECT_NAME} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
target_include_directories(${PROJECT_NAME} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/src)
|
||||
target_link_libraries(${PROJECT_NAME} PUBLIC mirage_core mirage_widget mirage_render)
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
#include <memory>
|
||||
#include <unordered_map>
|
||||
|
||||
#include "interface/font_interface.h"
|
||||
#include "texture/atlas/texture2d_atlas.h"
|
||||
|
||||
class font_face_interface;
|
||||
|
||||
@@ -125,7 +125,7 @@ public:
|
||||
}
|
||||
|
||||
auto operator[](auto... in_slot) {
|
||||
for (const auto& slot: { in_slot... }) { add_slot(slot); }
|
||||
for (const auto& slot : { in_slot... }) { add_slot(slot); }
|
||||
return this->shared_from_this();
|
||||
}
|
||||
private:
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#pragma once
|
||||
#include <optional>
|
||||
|
||||
#define SLOT_ME() auto& me() { return static_cast<T&>(*this) }
|
||||
#define SLOT_ME() (auto& me() { return static_cast<T&>(*this) })
|
||||
|
||||
#define SLOT_ATTRIBUTE(type, name) \
|
||||
public: \
|
||||
|
||||
@@ -28,7 +28,7 @@ struct mwidget_decl {
|
||||
mwidget_decl& operator=(const mwidget_decl&) = delete;
|
||||
|
||||
template<typename ...Args>
|
||||
auto operator[](Args&&... in_args) {
|
||||
[[nodiscard]] auto operator[](Args&&... in_args) {
|
||||
return std::static_pointer_cast<WidgetType>((*widget_)[std::forward<Args>(in_args)...]);
|
||||
}
|
||||
auto& setup(const construct_args& in_args) {
|
||||
|
||||
Reference in New Issue
Block a user