431a9c00a5
On Linux and macOS, using Clang to compile OpenStarbound produces about 400 MB worth of warnings during the build, making the compiler output unreadable and slowing the build down considerably. 99% of the warnings were unqualified uses of std::move and std::forward, which are now all properly qualified. Fixed a few other minor warnings about non-virtual destructors and some uses of std::move preventing copy elision on temporary objects. Most remaining warnings are now unused parameters.
55 lines
1.2 KiB
C++
55 lines
1.2 KiB
C++
#ifndef STAR_BASE_SCRIPT_PANE_HPP
|
|
#define STAR_BASE_SCRIPT_PANE_HPP
|
|
|
|
#include "StarPane.hpp"
|
|
#include "StarLuaComponents.hpp"
|
|
#include "StarGuiReader.hpp"
|
|
|
|
namespace Star {
|
|
|
|
STAR_CLASS(CanvasWidget);
|
|
STAR_CLASS(BaseScriptPane);
|
|
|
|
// A more 'raw' script pane that doesn't depend on a world being present.
|
|
// Requires a derived class to provide a Lua root.
|
|
// Should maybe move into windowing?
|
|
|
|
class BaseScriptPane : public Pane {
|
|
public:
|
|
BaseScriptPane(Json config);
|
|
|
|
virtual void show() override;
|
|
void displayed() override;
|
|
void dismissed() override;
|
|
|
|
void tick(float dt) override;
|
|
|
|
bool sendEvent(InputEvent const& event) override;
|
|
|
|
Json const& config() const;
|
|
Json const& rawConfig() const;
|
|
|
|
bool interactive() const override;
|
|
|
|
PanePtr createTooltip(Vec2I const& screenPosition) override;
|
|
Maybe<String> cursorOverride(Vec2I const& screenPosition) override;
|
|
protected:
|
|
virtual GuiReaderPtr reader() override;
|
|
Json m_config;
|
|
Json m_rawConfig;
|
|
|
|
GuiReaderPtr m_reader;
|
|
|
|
Map<CanvasWidgetPtr, String> m_canvasClickCallbacks;
|
|
Map<CanvasWidgetPtr, String> m_canvasKeyCallbacks;
|
|
|
|
bool m_interactive;
|
|
|
|
bool m_callbacksAdded;
|
|
LuaUpdatableComponent<LuaBaseComponent> m_script;
|
|
};
|
|
|
|
}
|
|
|
|
#endif
|