|
@@ -1,106 +0,0 @@
|
|
|
-#include <Datei.h>
|
|
|
-#include <DateiSystem.h>
|
|
|
-#include <Fenster.h>
|
|
|
-#include <GraphicsApi.h>
|
|
|
-#include <JsonEditor.h>
|
|
|
-#include <Logging.h>
|
|
|
-#include <main.h>
|
|
|
-#include <MausEreignis.h>
|
|
|
-#include <RenderThread.h>
|
|
|
-#include <Schrift.h>
|
|
|
-#include <TastaturEreignis.h>
|
|
|
-#include <UIInitialization.h>
|
|
|
-#include <XML.h>
|
|
|
-
|
|
|
-using namespace Framework;
|
|
|
-
|
|
|
-int KSGStart Framework::Start(Startparam p)
|
|
|
-{
|
|
|
- Logging::LoggingChannel* logger
|
|
|
- = new Logging::OutputDebugStringLoggingChannel();
|
|
|
- logger->setFormat(Logging::LoggingFormatBuilder()
|
|
|
- .datetime("h:i:s")
|
|
|
- .level(false)
|
|
|
- .text(": ")
|
|
|
- .build());
|
|
|
- Logging::zLoggingHandler()->addChannel(logger);
|
|
|
-
|
|
|
- WFenster fenster;
|
|
|
- WNDCLASS wc = Framework::F_Normal(p.hinst);
|
|
|
- wc.lpszClassName = "Config Editor";
|
|
|
- fenster.erstellen(WS_OVERLAPPEDWINDOW, wc);
|
|
|
- fenster.setBounds(Punkt(100, 100), Punkt(1100, 1100));
|
|
|
-
|
|
|
- fenster.setAnzeigeModus(SW_SHOWNORMAL);
|
|
|
- fenster.setVSchließAktion([&fenster](void* p, void* f) {
|
|
|
- StopNachrichtenSchleife(fenster.getFensterHandle());
|
|
|
- });
|
|
|
- fenster.setMausAktion(_ret1ME);
|
|
|
- fenster.setTastaturAktion(_ret1TE);
|
|
|
- Bildschirm3D screen(
|
|
|
- dynamic_cast<WFenster*>(fenster.getThis()), new DirectX11());
|
|
|
- screen.setHandleUserInputsOnTick(1);
|
|
|
- fenster.setBildschirm(dynamic_cast<Bildschirm*>(screen.getThis()));
|
|
|
- screen.setFillFarbe(0);
|
|
|
- screen.setTestRend(1);
|
|
|
-
|
|
|
- LTDSDatei dat;
|
|
|
- dat.setPfad(new Text("data/schriften/ksgs.ltds"));
|
|
|
- dat.leseDaten();
|
|
|
- Schrift* schrift = dat.ladeSchrift();
|
|
|
-
|
|
|
- JSON::JsonEditor* editor
|
|
|
- = new JSON::JsonEditor(Framework::defaultUI(schrift, &screen));
|
|
|
- editor->setPosition(0, 0);
|
|
|
- editor->setSize(1080, 1050);
|
|
|
- editor->setStyle(ZeichnungHintergrund::Style::Hintergrund
|
|
|
- | ZeichnungHintergrund::Style::Sichtbar
|
|
|
- | ZeichnungHintergrund::Style::Erlaubt);
|
|
|
- editor->setHintergrundFarbe(0xFF000000);
|
|
|
- editor->setFont(dynamic_cast<Schrift*>(schrift->getThis()));
|
|
|
- editor->setMausEreignis(_ret1ME);
|
|
|
- editor->setTastaturEreignis(_ret1TE);
|
|
|
-
|
|
|
- Datei v("../Windows Version/data/syntax/class DimensionGenerator.xml");
|
|
|
- v.open(Datei::Style::lesen);
|
|
|
- int size = (int)v.getSize();
|
|
|
- char* buffer = new char[size + 1];
|
|
|
- v.lese(buffer, size);
|
|
|
- buffer[size] = 0;
|
|
|
- v.close();
|
|
|
- XML::Element* xml = new XML::Element(buffer);
|
|
|
- delete[] buffer;
|
|
|
- JSON::Validator::JSONValidator* validator
|
|
|
- = JSON::Validator::JSONValidator::buildForArray()
|
|
|
- ->addAcceptedTypeInArray(
|
|
|
- new Framework::JSON::Validator::JSONValidator(xml))
|
|
|
- ->finishArray();
|
|
|
- editor->setValidator(validator);
|
|
|
-
|
|
|
- Datei d("../Windows Version/data/generator/overworld.json");
|
|
|
- // Datei d("C:/Users/kolja/Downloads/train_0/train_0.iml");
|
|
|
- // Datei d("C:/Users/kolja/Downloads/train_0/neu 36.txt");
|
|
|
- d.open(Datei::Style::lesen);
|
|
|
- size = (int)d.getSize();
|
|
|
- buffer = new char[size + 1];
|
|
|
- d.lese(buffer, size);
|
|
|
- buffer[size] = 0;
|
|
|
- d.close();
|
|
|
-
|
|
|
- editor->setContent(buffer);
|
|
|
- // editor->setContent("{\"price_usd\": \"üöä\",\"test\":{},\"\":[]}");
|
|
|
- delete[] buffer;
|
|
|
- screen.addMember(editor);
|
|
|
-
|
|
|
- RenderTh rTh;
|
|
|
- rTh.setMaxFps(60);
|
|
|
- rTh.setQuiet(1);
|
|
|
- rTh.setBildschirm(dynamic_cast<Bildschirm*>(screen.getThis()));
|
|
|
-
|
|
|
- rTh.beginn();
|
|
|
- StartNachrichtenSchleife();
|
|
|
- rTh.beenden();
|
|
|
- schrift->release();
|
|
|
-
|
|
|
- return 0;
|
|
|
-}
|