mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-05-16 22:02:58 -06:00
52 lines
961 B
C++
52 lines
961 B
C++
#ifndef _cyclic_cyclic_h
|
|
#define _cyclic_cyclic_h
|
|
#include <time.h>
|
|
#include <stdlib.h>
|
|
|
|
#include <CtrlLib/CtrlLib.h>
|
|
|
|
using namespace Upp;
|
|
|
|
#define LAYOUTFILE <cyclic/cyclic.lay>
|
|
#include <CtrlCore/lay.h>
|
|
|
|
class cyclic_space : public TopWindow {
|
|
public:
|
|
typedef cyclic_space CLASSNAME;
|
|
cyclic_space();
|
|
virtual void Paint(Draw& w);
|
|
virtual void LeftDown(Point, dword);
|
|
virtual bool Key(dword key, int count) {
|
|
if (key == K_SPACE) {
|
|
for(int i=0;i<1000;i++)
|
|
{
|
|
step();
|
|
}
|
|
return true;
|
|
}
|
|
return false;
|
|
}
|
|
void step();
|
|
void reset(int cn);
|
|
void change(int num, Color ncs[16]);
|
|
void calculate();
|
|
int fd[640][480];
|
|
Color col[16];
|
|
int n;
|
|
};
|
|
|
|
class cyclic : public WithcyclicLayout<TopWindow> {
|
|
public:
|
|
typedef cyclic CLASSNAME;
|
|
cyclic();
|
|
void Click();
|
|
void Setcols(Color pc[16]);
|
|
private:
|
|
ColorPusher cols[16];
|
|
Color dc[16];
|
|
Label lbl[16];
|
|
};
|
|
cyclic_space par;
|
|
|
|
#endif
|
|
|