Code: Select all
var pagename = guide.getCurrPage();
On the image, I'll see if I can implement via code, as you suggested.
Moderator: 1885
Code: Select all
var pagename = guide.getCurrPage();
Code: Select all
<Page id="Dorm_Jasmin8">
<Text>
<span>vG1HeaderText</span>
<p class="model">Now edge for me!</p>
<span>DebugInfo</span>
</Text>
<Image id="_error" />
<javascript>
<![CDATA[
function pageLoad() {
var vPageName = guide.getCurrPage();
overRide.setAudio("audio/_edge.mp3", "", "", "", "", "", "", "");
overRide.image = "media/dorm/jasmin/17.jpg";
overRide.addButton("Dorm_Jasmin9", "Edged", "", "", "fUserEdged(25)", "");
overRide.addButton("pgError", "I Came", "", "", "fCheckForCum(vPageName)", "");
fUpdateHeaderText();
fUpdateDebugInfo();
}
]]>
</javascript>
</Page>
Code: Select all
function fCheckForCum(vPage) {
var rightHTML = "";
rightHTML += "<p class=\"warning\">Stop!</p>";
rightHTML += "<p class=\"model\">Did you cum?</p>";
rightHTML += "<p class=\"model\">Or was that an accident</p>";
overRide.setHtml(rightHTML);
overRide.setAudio("audio/effect_bell.mp3", "", "", "", "", "", "", "");
overRide.addButton(vPage, "No", "", "", "", "", "");
overRide.addButton("GameOverCum", "Yes", "", "", "", "", "");
}
overRide can only be used in pageLoad to set the initial values when a page is loaded.bobhill wrote: ↑Wed Sep 12, 2018 1:11 pm philo - I'm having trouble determining how to change the text and buttons in JS and can't find anything in the wiki or any examples in code.
Here's my primary page:
If they hit the "I Came" button, then the fCheckForCum function is run, which is not working as expected. I want to change the right panel text, remove the two buttons from the prior page and display the two new buttons. I tried both setHTML and setRIghtHTML.Code: Select all
<Page id="Dorm_Jasmin8"> <Text> <span>vG1HeaderText</span> <p class="model">Now edge for me!</p> <span>DebugInfo</span> </Text> <Image id="_error" /> <javascript> <![CDATA[ function pageLoad() { var vPageName = guide.getCurrPage(); overRide.setAudio("audio/_edge.mp3", "", "", "", "", "", "", ""); overRide.image = "media/dorm/jasmin/17.jpg"; overRide.addButton("Dorm_Jasmin9", "Edged", "", "", "fUserEdged(25)", ""); overRide.addButton("pgError", "I Came", "", "", "fCheckForCum(vPageName)", ""); fUpdateHeaderText(); fUpdateDebugInfo(); } ]]> </javascript> </Page>
Code: Select all
function fCheckForCum(vPage) { var rightHTML = ""; rightHTML += "<p class=\"warning\">Stop!</p>"; rightHTML += "<p class=\"model\">Did you cum?</p>"; rightHTML += "<p class=\"model\">Or was that an accident</p>"; overRide.setHtml(rightHTML); overRide.setAudio("audio/effect_bell.mp3", "", "", "", "", "", "", ""); overRide.addButton(vPage, "No", "", "", "", "", ""); overRide.addButton("GameOverCum", "Yes", "", "", "", "", ""); }
I can't think of an easy way other than to change the program to add it.lawman5297 wrote: ↑Tue Oct 02, 2018 1:45 pm Is there a way that I can add an option perhaps to the application preferences for a repeat button? This would be used mainly with my personal "Estim Tower" version. I could add this as a button to every page but my XML is huge. I know when you turn on debug you have the delay button that advances to the next page. Can a repeat button be done in much the same manner? I am not very well versed in java but I can follow instructions. I have built my XML with the variable audio option which works great and makes it even more interesting. THX!!!
philo, Could you use the onclick property of a XML button to call a global JS that would load the current page (into a variable?) and then reload that page when the button is clicked? This way I could just insert the button on each page without the need to edit each one. What would the code for this be if it is possible?philo wrote: ↑Wed Oct 03, 2018 5:52 pm
I can't think of an easy way other than to change the program to add it.
The delay button was put in to make testing easier and is very specific code.
You could have global javascript that adds a button, then call it from every page load, but that isn't really any easier than adding the button to each page.
Using something like notepad++ and doing a search and replace to add the button to all pages would probably be what I would do if I needed to add a button to all pages.
The easiest way is to go to a dummy page and the use the page load on that page to go back to the previous one.lawman5297 wrote: ↑Wed Oct 03, 2018 7:23 pm philo, Could you use the onclick property of a XML button to call a global JS that would load the current page (into a variable?) and then reload that page when the button is clicked? This way I could just insert the button on each page without the need to edit each one. What would the code for this be if it is possible?
Code: Select all
<Page id="start">
<Text>
<div>
<div>Page 1</div>
<span>count</span>
</div>
</Text>
<Button target="Reload">Reload</Button>
<Button target="Page2">Continue</Button>
<javascript><![CDATA[
function pageLoad() {
var count = 0 + scriptVars.get("count");
scriptVars.put("count", count);
}
]]></javascript>
</Page>
<Page id="Page2">
<Text>
<div>
<div>Page 2</div>
<span>count</span>
</div>
</Text>
<Button target="Reload">Reload</Button>
<Button target="Page3">Continue</Button>
</Page>
<Page id="Page3">
<Text>
<div>
<div>Page 3</div>
<span>count</span>
</div>
</Text>
<Button target="Reload">Reload</Button>
<Button target="start">Continue</Button>
</Page>
<Page id="Reload">
<Text>
</Text>
<javascript><![CDATA[
function pageLoad() {
var count = scriptVars.get("count") + 1;
scriptVars.put("count", count);
overRide.setPage(guide.getPrevPage());
}
]]></javascript>
</Page>
Yes you can pass a directory and a file name inlawman5297 wrote: ↑Fri Oct 05, 2018 4:43 pm Now I have another "How to" question for you. The only file I use is Estim Tower. Is there a way I can make this start each time GuideMe is started? In other words have it auto start and bypass choosing it? THX!
Code: Select all
start .\jre\bin\javaw.exe -Xms1152m -Xmx1152m -cp .\;.\GuideMe_lib -jar GuideMe.jar %1 %2
start .\jre\bin\javaw.exe -Xms1152m -Xmx1152m -cp .\;.\GuideMe_lib -jar GuideMe.jar Y:\TM\HQ\ "Gisele Part 2 TM.xml"
Code: Select all
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<Tease id="37610" scriptVersion="v0.1">
<Title>Lottery of Abstinence<Title>
<Url>https://milovana.com/webteases/showtease.php?id=37610</Url>
<Author id="101186">
<Name>SpiritualMigrant</Name>
<Url>https://milovana.com/forum/memberlist.php?mode=viewprofile&u=101186</Url>
</Author>
<MediaDirectory>Lottery of Abstinence - SpiritualMigrant</MediaDirectory>
<Settings>
<AutoSetPageWhenSeen>false</AutoSetPageWhenSeen>
<PageSound>false</PageSound>
<ForceStartPage>false</ForceStartPage>
</Settings>
<Pages>
<Page id="page01">
<Text>
<p>Hello stroker boy! Today, we're going to play a game where you highly risk to lose the right to cum for days, weeks or even months! Sounds fun, doesn't it?</p>
<p>First of all, I want you to choose a difficulty:</p>
<p><Font Color="Green">Weak mode</Font>: for pathetic losers who can't even imagine the idea of not wanking for a few hours (basically, this tease becomes a casual lottery game)</p>
<p><Font Color="Yellow">Normal mode</Font>: for average guys who are able not to stroke for a few days. If your chastity goes over 2 weeks, set it to 2 weeks instead.</p>
<p><Font Color="Red">Hardcore mode</Font>: for chastity confirmed strokers. If your chastity goes over 1 month, set it to 1 month instead. Still I advice you to choose this one if you hesitate.</p>
<p>Choose wisely: you'll not be able to change your mind during the tease. You'll need to obey accordingly to the difficulty you chose here.</p>
<p>There is no turning back!</p>
</Text>
<Image id="page01.jpg"/>
</Page>
</Pages>
</Tease>
I wanted to create(or at least try since it's mt first time with GuideMe) an offline version of Lottery of Abstinence.
Thanks Ambossli. I'll look into it.
Users browsing this forum: No registered users and 19 guests