| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 19eb7c2 commit a3136ab
2 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -580,6 +580,7 @@ protected void beginDraw(boolean clear0) { | |||
| 580 | 580 | } | |
| 581 | 581 | ||
| 582 | 582 | ||
| 583 | + int labelTex = -1; | ||
| 583 | 584 | protected void endDraw(boolean clear0) { | |
| 584 | 585 | if (fboLayerInUse) { | |
| 585 | 586 | syncBackTexture(); | |
@@ -596,6 +597,21 @@ protected void endDraw(boolean clear0) { | |||
| 596 | 597 | clearDepth(1); | |
| 597 | 598 | clearColor(r, g, b, a); | |
| 598 | 599 | clear(COLOR_BUFFER_BIT | DEPTH_BUFFER_BIT); | |
| 600 | + | ||
| 601 | + if (labelTex == -1) { | ||
| 602 | + // labelTex = new Texture(pg); | ||
| 603 | + // labelTex.init(100, 50, | ||
| 604 | + // glColorTex.get(backTex), TEXTURE_2D, RGBA, | ||
| 605 | + // fboWidth, fboHeight, NEAREST, NEAREST, | ||
| 606 | + // CLAMP_TO_EDGE, CLAMP_TO_EDGE); | ||
| 607 | + } | ||
| 608 | + | ||
| 609 | + // Don't use presentMode offset! | ||
| 610 | + // drawTexture2D(labelTex, int texW, int texH, int scrW, int scrH, | ||
| 611 | + // int texX0, int texY0, int texX1, int texY1, | ||
| 612 | + // int scrX0, int scrY0, int scrX1, int scrY1); | ||
| 613 | + | ||
| 614 | + | ||
| 599 | 615 | } else { | |
| 600 | 616 | clearDepth(1); | |
| 601 | 617 | clearColor(0, 0, 0, 0); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -426,8 +426,6 @@ public void mousePressed(java.awt.event.MouseEvent e) { | |||
| 426 | 426 | label.setLocation(20, screenRect.height - labelSize.height - 20); | |
| 427 | 427 | } | |
| 428 | 428 | */ | |
| 429 | - | ||
| 430 | - | ||
| 431 | 429 | } | |
| 432 | 430 | ||
| 433 | 431 | @Override | |
@@ -1007,6 +1005,15 @@ public void run() { | |||
| 1007 | 1005 | } | |
| 1008 | 1006 | } else if (pressed) { | |
| 1009 | 1007 | action = MouseEvent.RELEASE; | |
| 1008 | + | ||
| 1009 | + if (presentMode) { | ||
| 1010 | + if (20 < Mouse.getX() && Mouse.getX() < 20 + 100 && | ||
| 1011 | + 20 < Mouse.getY() && Mouse.getY() < 20 + 50) { | ||
| 1012 | + System.err.println("clicked on exit button"); | ||
| 1013 | + sketch.exit(); | ||
| 1014 | + } | ||
| 1015 | + } | ||
| 1016 | + | ||
| 1010 | 1017 | pressed = false; | |
| 1011 | 1018 | } else { | |
| 1012 | 1019 | action = MouseEvent.MOVE; | |
| Back | FazBrowse Home | New Git URL |
0 commit comments