v1.4.4
This commit is contained in:
commit
9c94d113d3
10260 changed files with 1237388 additions and 0 deletions
48
source/frontend/StarWireInterface.hpp
Normal file
48
source/frontend/StarWireInterface.hpp
Normal file
|
@ -0,0 +1,48 @@
|
|||
#ifndef STAR_WIRE_INTERFACE_HPP
|
||||
#define STAR_WIRE_INTERFACE_HPP
|
||||
|
||||
#include "StarPane.hpp"
|
||||
#include "StarWiring.hpp"
|
||||
|
||||
namespace Star {
|
||||
|
||||
STAR_CLASS(WorldClient);
|
||||
STAR_CLASS(WorldPainter);
|
||||
STAR_CLASS(Player);
|
||||
STAR_CLASS(WirePane);
|
||||
|
||||
class WirePane : public Pane, public WireConnector {
|
||||
public:
|
||||
WirePane(WorldClientPtr worldClient, PlayerPtr player, WorldPainterPtr worldPainter);
|
||||
virtual ~WirePane() {}
|
||||
|
||||
virtual void update() override;
|
||||
virtual bool sendEvent(InputEvent const& event) override;
|
||||
|
||||
virtual SwingResult swing(WorldGeometry const& geometry, Vec2F position, FireMode mode) override;
|
||||
virtual bool connecting() override;
|
||||
|
||||
virtual void reset();
|
||||
|
||||
protected:
|
||||
void renderImpl() override;
|
||||
|
||||
private:
|
||||
void renderWire(Vec2F from, Vec2F to, Color baseColor);
|
||||
|
||||
WorldClientPtr m_worldClient;
|
||||
PlayerPtr m_player;
|
||||
WorldPainterPtr m_worldPainter;
|
||||
Vec2I m_mousePos;
|
||||
bool m_connecting;
|
||||
WireDirection m_sourceDirection;
|
||||
WireConnection m_sourceConnector;
|
||||
|
||||
Vec2F m_insize;
|
||||
Vec2F m_outsize;
|
||||
Vec2F m_nodesize;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
Loading…
Add table
Add a link
Reference in a new issue