From 269c168f1d7f280ed171bb537b5c33fa6d6df174 Mon Sep 17 00:00:00 2001 From: ketmar Date: Sat, 30 Jul 2016 19:18:12 +0000 Subject: [PATCH] cosmetix FossilOrigin-Name: 6c0becc12835501416cc82b830b4ce0dc0bb2802321dd1bb2992d1c3c0413560 --- ewbillboard.d | 8 ++++++-- xreader.d | 21 ++++++++++----------- 2 files changed, 16 insertions(+), 13 deletions(-) diff --git a/ewbillboard.d b/ewbillboard.d index c95b073..7797714 100644 --- a/ewbillboard.d +++ b/ewbillboard.d @@ -234,11 +234,15 @@ void drawGalaxy (NVGContext vg) { planetBill = new PlanetInfoBillboard(vg, universe.currPlanet); } + vg.save(); + scope(exit) vg.restore; + vg.resetScissor; + vg.fontFaceId(uiFont); vg.textAlign(NVGAlign.Left|NVGAlign.Baseline); vg.fontSize(fsizeUI); - vg.beginFrame(GWidth, GHeight, 1); + //vg.beginFrame(GWidth, GHeight, 1); //vg.scissor(0, 0, GWidth, GHeight); //vg.resetTransform(); //vg.resetScissor; @@ -264,5 +268,5 @@ void drawGalaxy (NVGContext vg) { // show planet data planetBill.draw(vg); - vg.endFrame(); + //vg.endFrame(); } diff --git a/xreader.d b/xreader.d index aea8c39..c3d3c3a 100644 --- a/xreader.d +++ b/xreader.d @@ -748,9 +748,7 @@ void run (string bookFileName) { auto ln = laytext.line(lidx); foreach (ref LayWord w; laytext.lineWords(lidx)) { if (lastStyle != w.style) { - if (w.style.fontface != lastStyle.fontface) { - vg.fontFace(laytext.fontFace(w.style.fontface)); - } + if (w.style.fontface != lastStyle.fontface) vg.fontFace(laytext.fontFace(w.style.fontface)); vg.fontSize(w.style.fontsize); auto c = NVGColor(w.style.color); vg.fillColor(c); @@ -809,8 +807,8 @@ void run (string bookFileName) { vg.rect(0, 0, GWidth, GHeight); vg.fill(); } - vg.endFrame(); if (shipModel !is null) { + vg.endFrame(); float zz = shipModel.bbox[1].z-shipModel.bbox[0].z; zz += 10; lightsClear(); @@ -828,29 +826,29 @@ void run (string bookFileName) { drawModel(shipAngle, shipModel); vg.beginFrame(GWidth, GHeight, 1); drawShipName(); - vg.endFrame(); + //vg.endFrame(); } if (formatWorks == 0) { if (inMenu) { - vg.beginFrame(GWidth, GHeight, 1); + //vg.beginFrame(GWidth, GHeight, 1); //vg.scissor(0, 0, GWidth, GHeight); vg.resetScissor; currPopup.draw(); - vg.endFrame(); + //vg.endFrame(); } } if (fps !is null && fpsVisible) { - vg.beginFrame(GWidth, GHeight, 1); + //vg.beginFrame(GWidth, GHeight, 1); //vg.scissor(0, 0, GWidth, GHeight); vg.resetScissor; fps.render(vg, GWidth-fps.width-4, GHeight-fps.height-4); - vg.endFrame(); + //vg.endFrame(); } if (inGalaxyMap) drawGalaxy(vg); // mouse cursor if (curImg >= 0 && !mouseHidden) { int w, h; - vg.beginFrame(GWidth, GHeight, 1); + //vg.beginFrame(GWidth, GHeight, 1); vg.beginPath(); //vg.scissor(0, 0, GWidth, GHeight); vg.resetScissor; @@ -870,8 +868,9 @@ void run (string bookFileName) { vg.fill(); } */ - vg.endFrame(); + //vg.endFrame(); } + vg.endFrame(); }; void processThreads () { -- 2.11.4.GIT