Tutorial on changing the MoI 3D interface
All  1  2-8

Previous
Next
 From:  chippwalters
7231.2 
Sorry. Still working on this. It will only work for SidePane.htm and then only if you put at the end of the head tag:

code:
<link rel="stylesheet" type="text/css" href="moi.css?v=1.1">


I need to find out WHERE the first instance of the stylesheet is referenced and put the above there, then I think it works for ALL parts. I'll straighten out the video when I get it all figured out.

Michael, is there an "index.htm" or "default.htm" where the stylesheet moi.css is originally called? Or is it in some code somewhere?
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
7231.3 In reply to 7231.2 
Hi Chipp - moi.css is implicitly injected into every HTML document that MoI loads, so it's not needed to specifically declare it anywhere like you normally would with a web browser. This has been the case since MoI v3 - in MoI v2.0 and earlier it was needed to declare it.

If you do declare it, the moi:// protocol handler returns nothing for a request of moi://ui/moi.css to avoid double instances of it since it's always automatically injected.

If you put a query string in the url like ?v=1.1 then I think it that will get loaded and then you will have a double set of style rules from both the automatic injected moi.css as well as the loaded one. But that probably won't do much harm.

If you are doing something like editing moi.css and reloading, make sure to set: DisableFileCaching=y inside moi.ini, that will turn off the file caching that normally happens and should make moi.css loaded fresh on every UI panel being created. By default (with DisableFileCaching=n) moi.css and any other text file that is loaded is cached in memory and future requests just grab it from memory rather than loading from disk again.

The automatic inclusion of moi.css was added in v3 to simplify writing the UI a little bit, so that you don't need to add it in manually which it otherwise would need to be on pretty much every .htm file (you should see that it's not declared on any of the standard UI files in v3), and it also simplifies the HTML parsing process since having it as an external style sheet triggers a somewhat more complex process of pausing the HTML parser while it asynchronously loads the style sheet and has a concept of a "pending but not loaded style sheet". The automatic injected version avoids some of this extra CSS loading processing from happening.

> Or is it in some code somewhere?

It's built in to the UI framework, the moi.css style sheet injection happens to every HTML document that MoI loads.

- Michael
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  chippwalters
7231.4 In reply to 7231.3 
Thanks. Yep, I sorta figured it out by reading through the other forum messages. So, to get this to work, I need to put a separate javascript REFRESH link AND style=moi.css?v=1.1 (temporarily) into the following files (so far....)

SidePane.htm
BrowserPane.htm
CommandBar.htm

Don't know, but there may be others..

I don't suppose there's any sort of 'mapping' chart of CSS to the UI anywhere? I looked around and all I found was:
http://moi3d.com/forum/get_attachment.php?webtag=MOI&hash=1c4564d9045eacee330f475f09d4cf17&filename=UI%20%20COLORS.jpg&inline

***for those following along. PUT the previously mentions style=moi.css?v=1.1 at the TOP of the head, not the bottom. You don't want to override the custom styles in the htm file.
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
7231.5 In reply to 7231.4 
Hi Chipp, yeah I see now I was wrong about just setting DisableFileCaching=y for getting the moi.css to reload - that will make it reload for any new UI panels that are created like if you open a dialog box up, but the regular moi.css style injection happens when a UI Panel is initialized when it is first created, and it won't retrigger on a document reload.

So something like what you describe there where you get the moi.css loaded as part of the document and reloaded when the document is reloaded should help.


> I don't suppose there's any sort of 'mapping' chart of CSS to the UI anywhere?

Sorry no I don't think there's anything like that currently available.

- Michael
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Daiber
7231.6 In reply to 7231.1 
Dear Chipp,

sorry i am new here,
and i am from germany.

I bought today Moi3d because
i was thinking Voronoi is working like your
video.

But now i find out i need a file.
But i am not a computer programmer.

I find out that i have download the zip from Max Smirnov
but how i install the zip that it works in Moi3d

Maybe you can help me or make a video like the other ones.

Thanks
Oliver
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Message 7231.7 deleted 10 Feb 2016 by ALBEHANY

Previous
 From:  Michael Gibson
7231.8 In reply to 7231.6 
Hi Oliver, re:

> I find out that i have download the zip from Max Smirnov
> but how i install the zip that it works in Moi3d

Just in case you didn't see it, this was answered on this other thread here:
http://moi3d.com/forum/index.php?webtag=MOI&msg=7177.19

- Michael
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged
 

Reply to All Reply to All

 

 
 
Show messages: All  1  2-8