Skip to content
Browse files

Added accesskey tags to the next/prev buttons in dialog (for ease-of-…

…use). They're mapped to [Alt+A] and [Alt+D] by default but can be changed in QGen.

Modified the conditional logic in $objsel to allow for substring matches (instead of strict string equality) so the it will recognize the button HTML (which has been expanded to include an additional set of anchor tags).
  • Loading branch information...
1 parent 055a6c1 commit 69a69684c7dacc2ffff6b52d8d5c43d9a043bb6d @stuntcock committed
View
14 src/$objsel.txt
@@ -21,8 +21,8 @@ IF selobj = '@':
GT curloc
END
-
-IF selobj = '<img src = "content\pic\buttons\forward_button.png">':
+!adapted for accesskey
+IF instr($selobj, '<img src = "content\pic\buttons\forward_button.png">'):
IF txt < txt_count:
txt += 1
killobj
@@ -38,14 +38,14 @@ IF selobj = '<img src = "content\pic\buttons\forward_button.png">':
GT curloc
END
-IF selobj = '<img src = "content\pic\buttons\back_button.png">':
+IF instr($selobj, '<img src = "content\pic\buttons\back_button.png">'):
txt -= 1
killobj
unsel
GT curloc
END
-IF selobj = '<img src = "content\pic\buttons\demo_forward_button.png">':
+IF instr($selobj, '<img src = "content\pic\buttons\demo_forward_button.png">'):
IF txt < txt_count:
txt += 1
killobj
@@ -61,14 +61,14 @@ IF selobj = '<img src = "content\pic\buttons\demo_forward_button.png">':
GT curloc
END
-IF selobj = '<img src = "content\pic\buttons\demo_back_button.png">':
+IF instr($selobj, '<img src = "content\pic\buttons\demo_back_button.png">'):
txt -= 1
killobj
unsel
GT curloc
END
-IF selobj = '<img src = "content\pic\buttons\demo_forward.png">':
+IF instr($selobj, '<img src = "content\pic\buttons\demo_forward.png">'):
IF txt < txt_count:
txt += 1
killobj
@@ -81,7 +81,7 @@ IF selobj = '<img src = "content\pic\buttons\demo_forward.png">':
GT curloc
END
-IF selobj = '<img src = "content\pic\buttons\auk_fwrd.png">':
+IF instr($selobj, '<img src = "content\pic\buttons\auk_fwrd.png">'):
killobj
unsel
GT 'slave_auction_pass'
View
2 src/end_day_screen.txt
@@ -358,6 +358,6 @@ END
*p '<div id = "interaction_stat_bar"><<$info_bar>></div>'
-addobj '<img src = "content\pic\buttons\forward_button.png">'
+addobj '<a accesskey="d" href="obj:0"><img src = "content\pic\buttons\forward_button.png"></a>'
--- end_day_screen ---------------------------------
View
2 src/hero_creation.txt
@@ -44,7 +44,7 @@ $master_ava_color = $clear_ava_path[hero_choice]
*p '<div id = "title_scroll_text_right"><center>Free points
<<hero_points>>
-<a href = "EXEC: dynamic $scroll_ava_back & gt curloc"><img src = "content\pic\buttons\back_button.png"></a> APPEARANCE <a href = "EXEC: dynamic $scroll_ava & gt curloc"><img src = "content\pic\buttons\forward_button.png"></a>
+<a accesskey="a" href = "EXEC: dynamic $scroll_ava_back & gt curloc"><img src = "content\pic\buttons\back_button.png"></a> APPEARANCE <a accesskey="d" href = "EXEC: dynamic $scroll_ava & gt curloc"><img src = "content\pic\buttons\forward_button.png"></a>
</center>
</div>'
View
4 src/hero_description.txt
@@ -41,7 +41,7 @@ $secondary_stt += '<<$master_fetish[master_fetish]>><br>'
*p '<div id = "confirm_box"><a href = ''EXEC: dynamic $name_and_start''><img src = "content\pic\buttons\approve_small.png"></a></div>'
-*p '<div id = "scroll_forward"><a href = ''EXEC: dynamic $scroll_heroes''><img src = "content\pic\buttons\forward_button.png"></a></div>'
-*p '<div id = "scroll_back"><a href = ''EXEC: dynamic $scroll_heroes_back''><img src = "content\pic\buttons\back_button.png"></a></div>'
+*p '<div id = "scroll_forward"><a accesskey="d" href = ''EXEC: dynamic $scroll_heroes''><img src = "content\pic\buttons\forward_button.png"></a></div>'
+*p '<div id = "scroll_back"><a accesskey="a" href = ''EXEC: dynamic $scroll_heroes_back''><img src = "content\pic\buttons\back_button.png"></a></div>'
--- hero_description ---------------------------------
View
4 src/interaction_screen.txt
@@ -109,11 +109,11 @@ END
if sound_on = 1: play 'content\snd\<<$play_sound[txt]>>.mp3', sound_volume
if txt > 1:
- addobj '<img src = "content\pic\buttons\back_button.png">'
+ addobj '<a accesskey="a" href="obj:0"><img src = "content\pic\buttons\back_button.png"></a>'
else
addobj '<img src = "content\pic\buttons\noback_button.png">'
END
-addobj '<img src = "content\pic\buttons\forward_button.png">'
+addobj '<a accesskey="d" href="obj:1"><img src = "content\pic\buttons\forward_button.png"></a>'
--- interaction_screen ---------------------------------
View
4 src/interaction_screen_city.txt
@@ -87,11 +87,11 @@ END
if sound_on = 1: play 'content\snd\<<$play_sound[txt]>>.mp3', sound_volume
if txt > 1:
- addobj '<img src = "content\pic\buttons\back_button.png">'
+ addobj '<a accesskey="a" href="obj:0"><img src = "content\pic\buttons\back_button.png"></a>'
else
addobj '<img src = "content\pic\buttons\noback_button.png">'
END
-addobj '<img src = "content\pic\buttons\forward_button.png">'
+addobj '<a accesskey="d" href="obj:1"><img src = "content\pic\buttons\forward_button.png"></a>'
--- interaction_screen_city ---------------------------------

0 comments on commit 69a6968

Please sign in to comment.
Something went wrong with that request. Please try again.