Skip to content

Commit dc22afb

Browse files
committed
version 0.0.41 release
1 parent a905d82 commit dc22afb

File tree

2 files changed

+34
-6311
lines changed

2 files changed

+34
-6311
lines changed

PretextView.cpp

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
2020
SOFTWARE.
2121
*/
2222

23-
#define PretextView_Version "PretextView Version 0.0.41 dev"
23+
#define PretextView_Version "PretextView Version 0.0.41"
2424

2525
#include "Header.h"
2626

@@ -5937,21 +5937,27 @@ AboutWindowRun(struct nk_context *ctx, u32 show)
59375937
window->flags &= ~(nk_flags)NK_WINDOW_HIDDEN;
59385938
}
59395939

5940-
static u32 showThirdParty = 0;
5940+
enum windowMode {showAcknowledgements, showLicence, showThirdParty};
5941+
5942+
static windowMode mode = showAcknowledgements;
59415943

59425944
if (nk_begin_titled(ctx, "About", PretextView_Version, nk_rect(Screen_Scale.x * 50, Screen_Scale.y * 50, Screen_Scale.x * 870, Screen_Scale.y * 610),
59435945
NK_WINDOW_BORDER|NK_WINDOW_NO_SCROLLBAR|NK_WINDOW_MOVABLE|NK_WINDOW_TITLE|NK_WINDOW_CLOSABLE))
59445946
{
59455947
nk_menubar_begin(ctx);
59465948
{
5947-
nk_layout_row_dynamic(ctx, (s32)(Screen_Scale.y * 35.0f), 2);
5949+
nk_layout_row_dynamic(ctx, (s32)(Screen_Scale.y * 35.0f), 3);
5950+
if (nk_button_label(ctx, "Acknowledgements"))
5951+
{
5952+
mode = showAcknowledgements;
5953+
}
59485954
if (nk_button_label(ctx, "Licence"))
59495955
{
5950-
showThirdParty = 0;
5956+
mode = showLicence;
59515957
}
59525958
if (nk_button_label(ctx, "Third Party Software"))
59535959
{
5954-
showThirdParty = 1;
5960+
mode = showThirdParty;
59555961
}
59565962
}
59575963
nk_menubar_end(ctx);
@@ -5962,7 +5968,7 @@ AboutWindowRun(struct nk_context *ctx, u32 show)
59625968

59635969
nk_group_begin(ctx, "About_Content", 0);
59645970
{
5965-
if (showThirdParty)
5971+
if (mode == showThirdParty)
59665972
{
59675973
u08 text[] = R"text(PretextView was made possible thanks to the following third party libraries and
59685974
resources, click each entry to view its licence.)text";
@@ -5986,6 +5992,12 @@ resources, click each entry to view its licence.)text";
59865992
}
59875993
}
59885994
}
5995+
else if (mode == showAcknowledgements)
5996+
{
5997+
nk_layout_row_static(ctx, Screen_Scale.y * 500, (s32)(Screen_Scale.x * 820), 1);
5998+
s32 len = sizeof(Acknowledgements);
5999+
nk_edit_string(ctx, NK_EDIT_READ_ONLY | NK_EDIT_NO_CURSOR | NK_EDIT_SELECTABLE | NK_EDIT_MULTILINE, (char *)Acknowledgements, &len, len, 0);
6000+
}
59896001
else
59906002
{
59916003
nk_layout_row_static(ctx, Screen_Scale.y * 500, (s32)(Screen_Scale.x * 820), 1);

0 commit comments

Comments
 (0)