[Ohrrpgce] SVN: james/8356 Run embedtext on map name when it is automatically displayed when you fi

James Paige Bob at hamsterrepublic.com
Fri Jan 27 17:32:30 PST 2017


I agree enthusiastically with all of this :)

On Friday, January 27, 2017, Ralph Versteegen <teeemcee at gmail.com> wrote:

>
> On 28 January 2017 at 13:10, Ralph Versteegen <teeemcee at gmail.com
> <javascript:_e(%7B%7D,'cvml','teeemcee at gmail.com');>> wrote:
>
>> We ought to support embedded codes in *all* visible strings. Conceivably
>> even hero names! "${H0}'s dog". Most significantly, text slices should
>> support them. Do you think anyone has ever displayed ${...} codes in
>> slices? We could just add a backcompat bitset for it. Also, we should add a
>> way to escape the ${...} codes; I was thinking of $${...} to display as
>> ${...}. The rule could simply be "replace $${ with ${ and don't search the
>> result for ${...} codes".  Then $${...} can be escaped to $$${...}, etc.
>>
>> Also, I decided that it's best not to use ${...} codes for markup
>> supported by printstr such as color and font. ${...} should be exclusively
>> for inserting a string variable in the text, as in many programming
>> languages. Instead I was thinking of using #{...}, or maybe quite different
>> syntax which has (optional) closing tags, like $[col45]...$[/col], since
>> closing tags really are needed (right now I'm using -1 to mean 'restore
>> previous'). Other tag names could include colbg, pal, spc (no closing tag),
>> font, indent, indentr, and even link=.
>>
>
> Plus also no-argument $[b], $[i], $[h] tags, which switch to the
> bold/italic/highlight font.
> Actually, maybe we can just use [b], [col45], etc, or <b>, <col45>... and
> add a backcompat bit to enable them, and use a $ prefix to escape them
>
>>
>> Finally, I would like ${...} to also be interpreted directly by HSpeak to
>> embed values in strings (use the name of some variable that's in-scope).
>> It's the easiest way to build a string. You should still have a choice
>> whether the codes are expanded immediately at point of use in the script,
>> or left and expanded each tick that they are displayed (in a textslice or
>> elsewhere), so that they can continually update. (Currently textboxes
>> expand all codes when first displayed, which I would like to change to
>> each-tick. A back-compat bitset will probably be needed) This choice could
>> be made in the same way as Python 3.6 and FB, by adding a prefix to the
>> string literal: FB has !"..." and Python 3.6 allows arbitrary embedded
>> expressions like f"{name} said {getExpression(42)}".
>> An obvious choice might be to use a $ prefix, but maybe $"foo" looks too
>> similar to $0="foo",
>>
>> On 26 January 2017 at 10:38, <subversion at hamsterrepublic.com
>> <javascript:_e(%7B%7D,'cvml','subversion at hamsterrepublic.com');>> wrote:
>>
>>> james
>>> 2017-01-25 13:38:04 -0800 (Wed, 25 Jan 2017)
>>> 89
>>> Run embedtext on map name when it is automatically displayed when you
>>> first enter a map.
>>> ---
>>> U   wip/game.bas
>>> U   wip/whatsnew.txt
>>> _______________________________________________
>>> Ohrrpgce mailing list
>>> ohrrpgce at lists.motherhamster.org
>>> <javascript:_e(%7B%7D,'cvml','ohrrpgce at lists.motherhamster.org');>
>>> http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org
>>>
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.motherhamster.org/pipermail/ohrrpgce-motherhamster.org/attachments/20170127/82ee867e/attachment-0001.htm>


More information about the Ohrrpgce mailing list