mirror of
https://bitbucket.org/grumdrig/pq-web.git
synced 2026-09-29 08:44:00 -06:00
Mottos and other support for keys
This commit is contained in:
@@ -814,7 +814,7 @@ function ExportCharSheet() {
|
|||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
function TMainForm_CharSheet() {
|
function CharSheet() {
|
||||||
var f = '';
|
var f = '';
|
||||||
function Wr(a) { f = f + a; }
|
function Wr(a) { f = f + a; }
|
||||||
function WrLn(a) { if (a != undefined) Wr(a); Wr("\r\n"); }
|
function WrLn(a) { if (a != undefined) Wr(a); Wr("\r\n"); }
|
||||||
@@ -1024,6 +1024,8 @@ function FormCreate() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
LoadCharacter();
|
LoadCharacter();
|
||||||
|
|
||||||
|
$(document).keypress(FormKeyDown);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -1210,29 +1212,34 @@ function GameSaveName() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function TMainForm_FormKeyDown() {
|
function InputBox(message, def) {
|
||||||
if ((FindWindow('TAppBuilder', nil) > 0) && (ssCtrl in Shift) && (ssShift in Shift) && (Key == ord('C'))) {
|
var i = prompt(message, def || '');
|
||||||
/*$IFDEF CHEATS*/
|
return (i !== null) ? i : def;
|
||||||
Cheats.Visible = ! Cheats.Visible;
|
}
|
||||||
/*$ENDIF*/
|
|
||||||
|
function FormKeyDown(e) {
|
||||||
|
if (e.which == 1) { // ^A
|
||||||
|
alert(CharSheet());
|
||||||
}
|
}
|
||||||
if ((ssCtrl in Shift) && (Key == ord('A'))) {
|
|
||||||
ShowMessage(CharSheet);
|
if (e.which == 13) { // ^M
|
||||||
|
game.motto = InputBox('Declare your motto!', game.motto);
|
||||||
|
// Brag('m');
|
||||||
|
// Navigate(GetHostAddr + 'name=' + UrlEncode(Get(Traits,'Name')));
|
||||||
}
|
}
|
||||||
if (!GetPasskey()) Exit; // no need for these things
|
|
||||||
if ((ssCtrl in Shift) && (Key == ord('B'))) {
|
if (!GetPasskey()) return; // no need for these things
|
||||||
Brag('b');
|
|
||||||
Navigate(GetHostAddr + 'name=' + UrlEncode(Get(Traits,'Name')));
|
if (e.which == 2) { // ^B
|
||||||
|
//Brag('b');
|
||||||
|
//Navigate(GetHostAddr + 'name=' + UrlEncode(Get(Traits,'Name')));
|
||||||
}
|
}
|
||||||
if ((ssCtrl in Shift) && (Key == ord('M'))) {
|
|
||||||
SetMotto(InputBox('Progress Quest', 'Declare your motto!', GetMotto));
|
if (e.which == 7) { // ^G
|
||||||
Brag('m');
|
game.guild = InputBox('Choose a guild.\r\rMake sure you undestand the guild rules before you join one. To learn more about guilds, visit http://progressquest.com/guilds.php', game.guild);
|
||||||
Navigate(GetHostAddr + 'name=' + UrlEncode(Get(Traits,'Name')));
|
// Guildify();
|
||||||
}
|
|
||||||
if ((ssCtrl in Shift) && (Key == ord('G'))) {
|
|
||||||
SetGuild(InputBox('Progress Quest', 'Choose a guild.\r\rMake sure you undestand the guild rules before you join one. To learn more about guilds, visit http://progressquest.com/guilds.php', GetGuild));
|
|
||||||
Guildify;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function Navigate(url) {
|
function Navigate(url) {
|
||||||
@@ -1316,17 +1323,3 @@ function TMainForm_Guildify() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function TMainForm_OnQueryEndSession() {
|
|
||||||
FReportSave = false;
|
|
||||||
FormClose(Self, Action);
|
|
||||||
ReplyMessage(-1);
|
|
||||||
}
|
|
||||||
|
|
||||||
function TMainForm_OnEndSession() {
|
|
||||||
if (Msg.wParam) {
|
|
||||||
FReportSave = false;
|
|
||||||
FormClose(Self, Action);
|
|
||||||
}
|
|
||||||
ReplyMessage(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|||||||
@@ -64,7 +64,10 @@ $(document).ready(function () {
|
|||||||
});
|
});
|
||||||
return dict || '';
|
return dict || '';
|
||||||
});
|
});
|
||||||
return $(brag);
|
brag = $(brag);
|
||||||
|
if (sheet.motto)
|
||||||
|
brag.find(".bs").text('"' + sheet.motto + '"');
|
||||||
|
return brag;
|
||||||
}
|
}
|
||||||
|
|
||||||
$("#clear").click(function () {
|
$("#clear").click(function () {
|
||||||
|
|||||||
Reference in New Issue
Block a user