init python: import math currentcode = "Guess Who's Back" def galeryImg(imgID): if persistent.gallerycode == currentcode: return imgID elif renpy.seen_image(imgID): return imgID else: return "/gui/locked.png" define nameByID = ["pr01", "pr02", "pr03", "pr04", "pr05", "pr06", "pr07", "pr08", "pr09", "pr10", "pr11", "pr12", "pr12b", "pr13", "pr14", "pr15", "pr16", "pr17", "pr18", "a1", "a2", "a3", "a4", "a4_5", "a5", "a6", "a7", "a8", "a9", "a10", "a11", "a12", "a13", "a14", "a15", "a16", "a17", "a18", "a19", "a20", "a21", "a22", "a23", "a24", "a25", "a26", "a27", "a28", "a29", "a30", "a31", "a32", "a33", "a34", "a35", "a36", "a37", "a38", "a39", "a40", "a41", "a42", "a43", "a44", "a45", "a46", "a47", "a48", "a49", "a50", "a51", "a52", "a53", "a54", "a55", "a56", "a57", "a58", "a59", "a60", "a61", "a62", "a63", "a64", "a65", "a66", "a67", "a68", "a69", "a70", "a71", "a72", "a73", "a74", "a75", "a76", "a77", "a78", "a79", "a80", "a81", "a82", "a83", "a84", "a85", "a86", "a87", "a88", "a89", "a90", "a91", "a92", "a93", "a94", "a95", "a96", "a97", "a98", "a99", "a100", "a101", "a102", "a103", "a104", "a105", "a106", "a107", "a108", "a109", "a110", "a111", "a112", "a113", "a114", "a115", "a116", "a117", "a118", "a119", "a120", "a121", "a122", "a123", "a124", "a125", "a126", "a127", "a128", "a129", "a130", "a131", "a132", "a133", "a134", "a135", "a135b", "a135c", "a136", "a137", "a138", "a139", "a140", "a141", "a142", "a143", "a144", "a145", "a146", "a146b", "a146c", "a147", "a147b", "a148", "a149", "a150", "a151", "a152", "a152b", "a153", "a154", "a155", "a156", "a157", "a158", "a159", "a160", "a160b", "a161", "a161b", "a162", "a163", "a164", "a164b", "a164c", "a165", "a166", "a166b", "a167", "a167b", "b1", "b2", "b3", "b4", "b5", "b6", "b7", "b8", "b9", "b10", "b11", "b12", "b13", "b14", "b15", "b15b", "b16", "b17", "b18", "b19", "b20", "b21", "b22", "b22b", "b23", "b24", "b25", "b25b", "b26", "b27", "b27b", "b27c", "b27d", "b28", "b29", "b30", "b31", "b32", "b33", "b34", "b35", "b36", "b37", "b37b", "b38", "b38b", "b39", "b39b", "b40", "b41", "b42", "b43", "b43b", "b43c", "b43d", "b44", "b45", "b46", "b47", "b48", "b48b", "b49", "b49b", "b50", "b51", "b52", "b53", "b53b", "b54", "b55", "b56", "b57", "b58", "b59", "b60", "b60b", "b61", "b62", "b62b", "b62c", "b63", "b63b", "b64", "b65", "b65b", "b65c", "b65d", "b66", "b67", "b67b", "b68", "b68b", "b69", "b69b", "b69c", "b69d", "b70", "b71", "b72", "b72b", "b72c", "b72d", "b73", "b74", "b75", "b76", "b77", "b78", "b79", "b80", "b81", "b82", "b83", "b84", "b85", "b85b", "b86", "b86b", "b87", "b88", "b89", "b90", "b91", "b92", "b93", "b94", "b95", "b96", "b97", "b98", "b98b", "b99", "b100", "b100b", "b100c", "b101", "b102", "b102b", "b103", "b104", "b105", "b106", "b107", "b108", "b108b", "b108c", "b108d", "b108e", "b109", "b109b", "b110", "b111", "b111b", "b111c", "b112", "b113", "b114", "b115", "b115b", "b115c", "b116", "b117", "b118", "b119", "b120", "b121", "b121b", "b121c", "b122", "b123", "b124", "b125", "b126", "b127", "b128", "b129", "c1", "c2", "c3", "c3b", "c4", "c5", "c6", "c7", "c7b", "c8", "c8b", "c8c", "c8d", "c9", "c10", "c11", "c12", "c13", "c14", "c15", "c16", "c17", "c18", "c18b", "c19", "c20", "c20b", "c20c", "c20d", "c21", "c21b", "c21c", "c21d", "c21e", "c22", "c24", "c24b", "c24c", "c25", "c25b", "c25c", "c25d", "c26", "c27", "c27b", "c28", "c29", "c29b", "c30", "c30b", "c30c", "c30d", "c31", "c32", "c33", "c34", "c34b", "c35", "c36", "c37", "c38", "c39", "c40", "c41", "c42", "c43", "c44", "c45", "c45b", "c46", "c47", "c47b", "c48", "c48b", "c49", "c50", "c51", "c52", "c53", "c54", "c55", "c56", "c57", "c58", "c59", "c60", "c61", "c61b", "c61c", "c61d", "c62", "c63", "c63b", "c64", "c65", "c66", "c67", "c68", "c69", "c70", "c70b", "c71", "c72", "c73", "c74", "c75", "c76", "c77", "c77b", "c78", "c79", "c79b", "c80", "c80b", "c80c", "c80d", "c80e", "c80f", "c81", "c81b", "c81c", "c81d", "c81e", "c81f", "c82", "c83", "c83b", "c84", "c85movie", "c86", "c87", "c88", "c89", "c90", "c91", "c92", "c92anim", "c93", "c94", "c95", "c96", "c97", "c97b", "c97c", "c97d", "c97e", "c97f", "c98", "c98b", "c99", "c100", "c101", "c102", "c103", "c104", "c105", "c106", "c107", "c108", "c109", "c109anim", "c110", "c111", "c111b", "c111c", "c112", "c113", "c113b", "c113c", "c113d", "c113e", "c113f", "c114", "c115", "c115b", "c115c", "c115d", "c115e", "c115f", "c116", "c117", "c117b", "c118", "c118b", "c119", "c120", "d1", "d2", "d3", "d4", "d5", "d6", "d7", "d8", "d9", "d10", "d10b", "d10c", "d10d", "d11", "d12", "d12b", "d13", "d14", "d15", "d16", "d17", "d18", "d19", "d20", "d21", "d22", "d23", "d24", "d25", "d26", "d26b", "d27", "d27b", "d27c", "d27d", "d28", "d29", "d30", "d30b", "d31", "d31b", "d31c", "d31d", "d32", "d33", "d33b", "d34", "d35", "d36", "d36b", "d37", "d38", "d39", "d40", "d41", "d42", "d43", "d44", "d45", "d45b", "d45c", "d45d", "d46", "d47", "d47b", "d47c", "d48", "d49", "d50", "d51", "d52", "d53", "d53b", "d53c", "d53d", "d54", "d55", "d56", "d57", "d58", "d58b", "d59", "d59b", "d60", "d61", "d61b", "d62", "d62b", "d62c", "d63", "d64", "d65", "d66", "d67", "d67b", "d67c", "d67d", "d68", "d68b", "d69", "d70", "d71", "d72", "d73", "d74", "d75", "d76", "d77", "d78", "d79", "d80", "d81", "d81b", "d82", "d82b", "d83", "d84", "d85", "d86", "d87", "d88", "d88b", "d89", "d89_2", "d90", "d91", "d92", "d93", "d94", "d95", "d96", "d97", "d98", "d99", "d100", "d101", "d101b", "d102", "d102b", "d102c", "d103", "d104", "d105", "d106", "d107", "d108", "d109", "d110", "d111", "d111b", "d112", "d113", "d113b", "d113c", "d113d", "d114", "d115", "d116", "d116b", "d117", "d118", "d119", "d120", "d120b", "d121", "e1", "e2", "e3", "e4", "e5", "e6", "e7", "e8", "e9", "e10", "e11", "e12", "e13", "e14", "e15", "e16", "e17", "e18", "e19", "e20", "e21", "e22", "e23", "e24", "e25", "e25b", "e26", "e27", "e28", "e29", "e30", "e30b", "e31", "e31b", "e32", "e32b", "e32c", "e33", "e34", "e34b", "e35", "e36", "e37", "e38", "e39", "e40", "e41", "e42", "e43", "e44", "e45", "e45b", "e46", "e47", "e47b", "e47c", "e48", "e48b", "e48c", "e48d", "e49", "e50", "e51", "e52", "e53", "e53b", "e53c", "e53d", "e54", "e55", "e56", "e56b", "e56c", "e56d", "e57", "e58", "e58b", "e59", "e59b", "e59c", "e59d", "e59e", "e59f", "e59g", "e59h", "e59i", "e60", "e60b", "e61", "e61b", "e61c", "e61d", "e62", "e63", "e64", "e64b", "e65", "e66", "e67", "e68", "e69", "e70", "e71", "e72", "e73", "e73b", "e74", "e75", "e76", "e77", "e78", "e78b", "e79", "e80", "e81", "e82", "e82b", "e83", "e84", "e85", "e86", "e87", "e88", "e89", "e90", "e91", "e92", "e93", "e94", "e95", "e96", "e97", "e98", "e98b", "e98c", "e99", "e100", "e101", "e102", "e103", "e104", "e105", "e106", "e107", "e108", "e108b", "e109", "e110", "e111", "e112", "e113", "e114", "e114b", "e115", "e116", "e117", "e118", "e119", "e120", "e121", "e122", "e123", "e123b", "e124", "e125", "e126", "e127", "f1", "f2", "f3", "f4", "f5b", "f5c", "f6", "f7", "f8", "f8b", "f9", "f9b", "f9c", "f10", "f11", "f12", "f13", "f13b", "f14", "f14b", "f14c", "f15", "f15b", "f16", "f17", "f18", "f18b", "f18c", "f18d", "f18e", "f19", "f19b", "f20", "f20b", "f21", "f22", "f23", "f24", "f25", "f26", "f26b", "f26c", "f27", "f28", "f28b", "f28c", "f28d", "f29", "f30", "f31", "f32", "f33", "f34", "f35", "f35b", "f35c", "f36", "f37", "f38", "f39", "f40", "f41", "f42", "f43", "f44", "f45", "f46", "f47", "f48", "f49", "f50", "f51", "f51b", "f52", "f53", "f54", "f55", "f56", "f57", "f58", "f59", "f59b", "f60", "f61", "f61b", "f62", "f63", "f63b", "f64", "f65", "f66", "f67", "f67b", "f68", "f69", "f70", "f70b", "f71", "f72", "f72b", "f73", "f73b", "f73c", "f73d", "f73e", "f74", "f75", "f76", "f76b", "f77", "f78", "f79", "f80", "f81", "f82", "f83", "f84", "f85", "f86", "f87", "f88", "f89", "f90", "f91", "f92", "f93", "f94", "f95", "f96", "f97", "f98", "f99", "f100", "f100b", "f101", "f101b", "f102", "f102b", "f103", "f104", "f104b", "f105", "f106", "f107", "f107b", "f108", "f109", "f110", "f111", "f112", "f113", "f114", "f115", "f116", "f117", "f118", "f119", "f119b", "f119c", "f119d", "f120", "f121", "f122", "g1", "g2", "g3", "g4", "g5", "g6", "g7", "g8", "g9", "g10", "g11", "g12", "g13", "g14", "g15", "g15b", "g15c", "g16", "g16b", "g16c", "g17", "g18", "g18b", "g18c", "g19", "g19b", "g19c", "g20", "g20b", "g20c", "g21", "g21b", "g22", "g22b", "g23", "g23b", "g23c", "g23d", "g24", "g24b", "g25", "g25b", "g26", "g26b", "g26c", "g27", "g27b", "g28", "g28b", "g28c", "g28d", "g29", "g29b", "g30", "g31", "g32", "g32b", "g32c", "g32d", "g32e", "g33", "g33b", "g33c", "g33d", "g34", "g35", "g35b", "g35c", "g36", "g37", "g38", "g39", "g39b", "g39c", "g39d", "g39e", "g40", "g41", "g42", "g43", "g43b", "g43c", "g43d", "g43e", "g43f", "g44", "g45", "g46", "g47", "g48", "g49", "g50", "g51", "g51b", "g52", "g53", "g54", "g55", "g56", "g57", "g58", "g59", "g60", "g61", "g61b", "g62", "g62b", "g62c", "g63", "g64", "g65", "g66", "g67", "g68", "g69", "g70", "g71", "g72", "g73", "g73b", "g73c", "g73d", "g74", "g74b", "g75", "g76", "g77", "g78", "g79", "g80", "g81", "g82", "g83", "g83b", "g84", "g85", "g85b", "g86", "g87", "g87b", "g88", "g89", "g89b", "g90", "g91", "g91b", "g92", "g93", "g94", "g95", "g96", "g96b", "g96c", "g97", "g98", "g99", "g100", "g101", "g102", "g102b", "g102c", "g102d", "g102e", "g103", "g104", "g105", "g106", "g106b", "g107", "g107b", "g107c", "g108", "g109", "g109b", "g109c", "g109d", "g110", "g111", "g112", "g112b", "g113", "g114", "g115", "g116", "g117", "g118", "g119", "g119b", "g119c", "g119d", "g120", "g120b", "g121", "g121b", "g121c", "h1", "h1b", "h1c", "h1d", "h1e", "h2", "h2b", "h2anim", "h2banim" "h3", "h3b", "h3c", "h4", "h4b", "h5", "h5anim", "h5b", "h5banim", "h6", "h7", "h7anim", "h7banim", "h8", "h9", "h10", "h11", "h11b", "h11c", "h11d", "h12", "h12b", "h13", "h13anim", "h13banim", "h14", "h14b", "h14c", "h14d", "h14e", "h14f", "h15", "h15anim", "h15b", "h15c", "h16", "h16_2", "h16b", "h17", "h17_5anim", "h17_5banim", "h17anim", "h17banim", "h18", "h18b", "h19", "h19b", "h19c", "h19d", "h19e", "h19f", "h19g", "h19h", "h20", "h20b", "h21", "h22", "h23", "h24", "h24b", "h24aanim", "h24banim", "h24canim" "h24danim", "h25", "h26", "h27", "h28", "h29", "h29banim", "h30", "h31", "h32", "h32b", "h32c", "h32d", "h32e", "h32f", "h32g", "h33", "h33b", "h33c", "h34", "h35", "h35b", "h36", "h36b", "h37", "h37b", "h38", "h38b", "h39", "h40", "h41", "h42", "h43", "h44", "h44b", "h45", "h45b", "h45c", "h45d", "h45e", "h45f", "h46", "h46b", "h47", "h47b", "h48", "h49", "h49b", "h49c", "h49d", "h50", "h51", "h51b", "h51c", "h52", "h52b", "h53", "h53anim", "h54", "h55", "h55anim", "h56", "h56b", "h56anim", "h57", "h58", "h59", "h59banim" "h60", "h60b", "h60c", "h61", "h61b", "h62", "h62anim", "h62banim", "h63", "h64", "h64b", "h64c", "h65", "h66", "h67", "h68", "h68b", "h68c", "h69", "h70", "h70b", "h71", "h71b", "h72", "h72b", "h73", "h74", "h74b", "h74c", "h74d", "h74e", "h74f", "h74g", "h74h", "h74i", "h74j", "h74k", "h75", "h75b", "h75c", "h76", "h76b", "h76c", "h77", "h78", "h79", "h80", "h81", "h82", "h82_5anim", "h82anim", "h82banim", "h83", "h84", "h84anim", "h85", "h85b", "h86", "h86b", "h86c", "h86d", "h87", "h87anim", "h88", "h88anim", "h89", "h89b", "h90", "h91", "h92", "h93", "h93anim", "h94", "h94anim", "h95", "h95anim", "h95b", "h95c", "h95d", "h95e", "h96", "h97", "h98", "h98anim", "h98banim", "h99", "h100", "h101", "h101anim", "h101banim", "h102", "h102b", "h103", "h104", "h105", "h105b", "h105c", "h106", "h107", "h108", "h108b", "h108c", "h109", "h109b", "h110", "h110b", "h111", "h112", "h112b", "h113", "h114", "h114b", "h114c", "h114d", "h115", "h116", "h116anim", "h117", "h117anim", "h117b", "h117banim", "h118", "h118anim", "h118b", "h118banim", "h118extra1_img", "h118extra1", "h118extra2_img", "h118extra2", "h118extra3_img", "h118extra3", "h119", "h120", "h120b", "h121", "h121b", "h122", "h122b", "h123", "h123b", "h124", "h124b", "h125", "h125b", "h126", "h127", "h128", "h129", "h130", "h131", "h131_2", "h132", "h133", "h133b", "h133c", "h133d", "h133e", "h133f", "h134", "h135", "h136", "h137", "h138", "h138b", "h138c", "h138d", "h139", "h139b", "h140", "h140b", "h141", "h141b", "h142", "h143", "h143b", "h143c", "h143d", "h144", "h145", "h145b", "h146", "h146b", "h147", "h147b", "h148", "h148b", "h149", "h149b", "h150", "h150b", "h150c", "h150d", "h150e", "h150f", "h150g", "h151", "h151b", "h151c", "h151d", "h152", "h152b", "h152c", "h153", "h153b", "h153c", "h153d", "h153e", "h153f", "h153g", "h154", "h155", "h155b", "h155c", "h155d", "h155e", "h155f", "h156", "h156b", "h156c", "h156d", "h156e", "h156f", "h157", "h157b", "h157c", "h157d", "h158", "h158b", "h159", "h159b", "h160", "h160b", "h160c", "h160d", "h161", "h161b", "h161c", "h161d", "h161e", "h161f", "h162", "h162b", "h162c", "h162d", "h162e", "h162f", "h162g", "h162h", "h162i", "h162j", "h162k", "h163", "h163b", "h164", "h164b", "h164c", "h164d", "h164e", "h164f", "h165", "h165b", "h166", "h166b", "h167" ] init 3: transform btnzoom: zoom 0.2 transform btnzoom2: zoom 0.1 transform btnzoom3: zoom 1.2 default gridSize = 9 #The gallery is a grid of 3 by 3 images, so this has to be 9, if you want to change the grid size you'll have to change the "grid" value and the gridSize value accordingly. default page = 0 #The default value for the page the user is on. If there are more than 9(gridsize) images this scipt will automatically add more pages default pageImageCount = "" #A placeholder variable, more on that later #placeholder image image my_image: "locked.png" with dissolve #main gallery menu screen gallery(): style_prefix "gallery" tag menu default page = 0 if main_menu: add "/gui/main_menu.png" add "/images/gui/blackened.png" grid 3 3: for i in range(page*gridSize,(page+1)*gridSize): if i < len(nameByID): imagebutton: idle galeryImg(nameByID[i]) action Show("g_image_full", my_image=nameByID[i]) if persistent.gallerycode != currentcode: sensitive renpy.seen_image(nameByID[i]) at btnzoom else: imagebutton: idle im.Alpha("/gui/hide.png",0) at btnzoom $ pageImageCount = nameByID use changePages screen g_image_full(my_image): style_prefix "special" modal True add my_image xalign 0.5 yalign 0.5 imagebutton: idle "/gui/hide.png" hover "/gui/hide.png" action [ Hide("g_image_full") ] screen changePages: $ currentpage = page+1 python: lastpage = math.ceil(len(pageImageCount)/9) - 1 lastpagetext = lastpage + 2 textbutton "Page: [currentpage]/[lastpagetext]" xalign 0.5 yalign .05 action NullAction() text_outlines [ (0, "#333", 2, 2) ] style_prefix "special" if len(pageImageCount) > (page+1)*gridSize: imagebutton: idle "/gui/right.png" hover "/gui/right_hover.png" action SetScreenVariable("page", page+1) xalign .92 yalign .5 #yfill True #xfill True at btnzoom2 imagebutton: idle "/gui/right_hard.png" hover "/gui/right_hard_hover.png" if (page + 11) * 9 > len(pageImageCount): action SetScreenVariable("page", lastpage) else: action SetScreenVariable("page", page+10) xalign .9999 yalign .5 #yfill True #xfill True at btnzoom2 if page > 0: imagebutton: idle "/gui/left.png" hover "/gui/left_hover.png" action SetScreenVariable("page", page-1) xalign .07 yalign .5 #yfill True at btnzoom2 imagebutton: idle "/gui/left_hard.png" hover "/gui/left_hard_hover.png" if (page - 10) < 0: action SetScreenVariable("page", 0) else: action SetScreenVariable("page", page-10) xalign 0 yalign .5 #yfill True #xfill True at btnzoom2 textbutton "Unlock Gallery" action Call("UnlockingGallery") xalign 0.5 yalign 0.93 text_outlines [ (0, "#333", 2, 2) ] style_prefix "special" textbutton "Return" action [ Return() ] xalign 0.5 yalign .98 text_outlines [ (0, "#333", 2, 2) ] style_prefix "special" label UnlockingGallery: show blackened default persistent.gallerycode = "" $ ui.text("Please enter the code: (Info KoGa3: Guess Who's Back)", xalign=0.5, yalign=0.4) $ ui.input('', xalign=0.5, yalign=0.5) $ persistent.gallerycode = ui.interact() if currentcode != persistent.gallerycode: centered "Wrong code" else: centered "Gallery unlocked" call screen gallery style gallery_grid: spacing 50 xpos .5 ypos .5 xanchor .5 yanchor .5 xmaximum 200 style special_text: outlines [ (absolute(3), "#bbb", absolute(1), absolute(1)) ] style galleryint_vbox is vbox style galleryint: xfill True yfill True style galleryint_vbox: xalign .5 yalign .5 style galleryint_text_button: yanchor .5 xalign .5 style galleryint_button is default: properties gui.button_properties("choice_button") style galleryint_button_text is default: properties gui.button_text_properties("choice_button") style galleryint_button is button: xalign 0.5 style galleryint_button_text is button_text: size 60 color "#333" hover_color "#ccc"