MoI discussion forum
MoI discussion forum

Full Version: shortcut menu

Show messages:  1-14  15-34  35-49

From: Phiro
8 Apr 2020   [#15] In reply to [#14]
The application is totally frozen.
Viewports don't move.
I must use the process manager to kill it.

Each time I call the script the process use 10Mb more memory.
When I launch MOI, process uses about 60Mb. After using the script 7 or 8 times, the process use 150Mb and is frozen.
From: Frenchy Pilou (PILOU)
8 Apr 2020   [#16]
OK :) I have changed display:none;..........in display:yes;....not sure that must be that but that works :)

<style>
/* Turn off text block under command button icon */
moi\:CommandButton > div {
display:yes;
}
</style>

Another thing here the French translation but how to make the English for be call in Options ?
Possible or not : so 2 versions that i enable or not manually ?

From: Michael Gibson
8 Apr 2020   [#17] In reply to [#15]
Hi Phiro,

re:
> The application is totally frozen.
> Viewports don't move.
> I must use the process manager to kill it.

The most likely thing is a video driver bug which is triggered by the viewport resizing.

First thing to check would be to get the latest video driver from the manufacturer's web site and see if that solves it.

- Michael
From: Michael Gibson
8 Apr 2020   [#18] In reply to [#16]
Hi Pilou,

re:
> Another thing here the French translation but how to make the English for be call in Options ?
> Possible or not : so 2 versions that i enable or not manually ?

It's possible to do this using <moi:Text> elements instead of hard coded text.

A <moi:Text> element will look up text from the string table of the current active language.

So for example with the first one you would put <moi:Text textid="Line"> in the text location.

That will then look up the entry with a left-side value of Line= inside the current Strings.txt string table, so that would come from EnglishStrings.txt if the current language is English, or FrenchStrings.txt if the current language is French.

- Michael
From: Frenchy Pilou (PILOU)
8 Apr 2020   [#19] In reply to [#18]
Absolutly perfect!

<moi:CommandButton icon="moi://ui/icons/LineIcon.png" command="line"><moi:Text textid="Line">Ligne</moi:CommandButton>



From: Frenchy Pilou (PILOU)
8 Apr 2020   [#20]
Hum hum :) (for beta 4)
Icon for pipe works fine (personal icon ;)
But text not so good...
I try to make the first line (10 icons)... French /English but not total success! :)
Some stay empty!
I don't believe i had made some type errors ???



http://moiscript.weebly.com/uploads/3/9/3/8/3938813/sidepane1.htm
From: feirui445
8 Apr 2020   [#21] In reply to [#4]
I forgot an icon. It's made by myself


Attachments:
Pipe.htm
Pipe.js

Image Attachments:
PipeIcon.png 


From: Michael Gibson
8 Apr 2020   [#22] In reply to [#19]
Hi Pilou,

re:
> <moi:CommandButton icon="moi://ui/icons/LineIcon.png" command="line"><moi:Text textid="Line">Ligne</moi:CommandButton>

Almost - it would be good to put a "self-closing" slash on the <moi:Text> and since it will supply the text you don't want any additional text in there.

So you would want it like this:
code:
<moi:CommandButton icon="moi://ui/icons/LineIcon.png" command="line"><moi:Text textid="Line" /></moi:CommandButton>


- Michael
From: feirui445
8 Apr 2020   [#23] In reply to [#3]
Thank you Michael
From: Michael Gibson
8 Apr 2020   [#24] In reply to [#20]
Hi Pilou,

> I try to make the first line (10 icons)... French /English but not total success! :)
> Some stay empty!
> I don't believe i had made some type errors ???

There's a few things - it would be good to have a close tag on the <moi:Text> elements, that could be either <moi:Text textid=""></moi:Text> or a shortcut way is <moi:Text textid=""/>

Also since the <moi:Text> element will have text inserted inside it, you don't want additional text in there next to it, it probably happened to work because with the missing close tag your extra text was a child of the <moi:Text> and got replaced when it inserted its looked-up text content.

Last thing is the textid="" attribute must exactly match a name in the Strings.txt file including upper/lower case. So for example you have textid="PolyLine" but the name of that entry in the strings.txt files is actually Polyline= . Because you have different capitalization it won't find it.

So for polyline you would want this:

code:
<td><moi:CommandButton icon="icons/PolylineIcon.png" command="polyline"><moi:Text textid="Polyline"/></moi:CommandButton></td>


- Michael
From: bemfarmer
8 Apr 2020   [#25] In reply to [#20]
Hi Pilou,

Your modifications do not quite follow Michael's posts. You have incorporated the French names, in addition to the English names.

Delete your French names, and the resulting names are looked up.
If your language is set to French, (in options tab), the French names appear.
With language set to English, English names appear.

- Brian

I've changed a few, so am not done...:-)
Will see if any more problems appear.
I see Michael posted first. Yeah I'm missing Polyline. Also Freeform not FreeForm. :-)
It is Polygon, not Polygons...

I do not see Helix and Conic...

The plural of menu is menus, in English.
Looks like it is menues in French :-)
From: Frenchy Pilou (PILOU)
8 Apr 2020   [#26]
Thanks for the additional infos! I will see if that works better :)

@ Beam :it's Menus in French ;)
Menue is existing too but it adjective for woman (Menu for man, Menues for women, Menus for men) like slim, thin, mince
From: Frenchy Pilou (PILOU)
9 Apr 2020   [#27]
Much better! All is quasi perfect
except for the last four Arc, Ellipse Plane "Boxes" who stay in English like the French "Boîtes" ???





From: Phiro
9 Apr 2020   [#28]
I think, you don't have to add names.
The id give wich label have to be seen, function of the langage.

 

En french...
Il ne faut pas mettre le titre de l'icone "en dur" dans le fichier, c'est l'ID qui indique au logiciel quelle titre il faut écrire et qui met le bon titre dans la bonne langue en fonction du paramètre de langue.

Comme c'est écrit dans l'exemple...
<moi:CommandButton icon="moi://ui/icons/LineIcon.png" command="line"><moi:Text textid="Line"></moi:CommandButton>

Le texte du textid=Line sera Line en anglais et Ligne en français et c'est le logiciel qui le placera automatiquement en fonction du paramètre de langage.
From: Michael Gibson
9 Apr 2020   [#29] In reply to [#27]
Hi Pilou, the bold text you show above there should be removed, it will be extra in addition to the <moi:Text> that is right next to it.

For those <moi:Text> that are not working, look in EnglishStrings.txt and do a search for the textid value that you are using.

For textid="Ellipses", if you search in EnglishStrings.txt you won't find any line for Ellipses=, but there is one for Ellipse without ending "s".

Same for Planes (should be "Plane") and Boxes (use "Box").

- Michael
From: Frenchy Pilou (PILOU)
9 Apr 2020   [#30] In reply to [#29]
Or that must say that i can also add some words in the English txt ?
Not too orthodox but...
Seem that works :)

Now I must make the rest! :)


That was a nightmare for me! :)



PS Remark that the French UI is smaller than the English one : that is a task :)
From: bemfarmer
9 Apr 2020   [#31]
Two of the Box entry methods are missing. Likewise Conic, Helix ...

Do users like this floating menu?

- Brian
From: Frenchy Pilou (PILOU)
9 Apr 2020   [#32] In reply to [#31]
Yes it's very useful when you have many monitors
and when you have only one screen
that reduce the Mouse's way for click a function!
From: feirui445
15 Apr 2020   [#33] In reply to [#29]
Hi Michael

Can you help me design a script:? I can press the shortcut key to open shortcut menu and press it again to close shortcut menu.Thanks!


script: /* Opens SidePane1 */ moi.ui.createDialog( 'moi://ui/SidePane1.htm' );
From: Michael Gibson
15 Apr 2020   [#34] In reply to [#33]
Hi hl,

re:
> Can you help me design a script:? I can press the shortcut key to open shortcut menu and
> press it again to close shortcut menu.Thanks!

In MoI v4 it is possible to implement OnKeyDownEvent() and OnKeyUpEvent() script functions on a dialog and when the dialog has focus MoI will look for those and call them. Those can override regular shortcut key handling.

It's used also by the new shortcut key definition dialog "ShortcutKeyDialog.htm" and there are comments in that file about how it works.

- Michael

Show messages:  1-14  15-34  35-49