About Store Forum Documentation Contact



Post Reply 
FontDefault.load()
Author Message
jagatai Offline
Member

Post: #1
FontDefault.load()
So i think im having one of those days, however how does one pass a Font UID to load, when .load() expects a string?

-J

LOL figured it out, COPY then Ctrl+V the FileID

-J
(This post was last modified: 07-03-2013 10:50 PM by jagatai.)
07-03-2013 10:45 PM
Find all posts by this user Quote this message in a reply
Esenthel Online
Administrator

Post: #2
RE: FontDefault.load()
There are so many ways you can do this:
Tutorial 01 - Start/4 - Using Resources
Code:
// Each resource in the project has its unique ID (UID).
   // You can check the ID of an element by right clicking on it, and selecting "Properties".
   // From there you can copy its "ID", or its "File ID" so it can be used in the codes.
   // To do this faster, you can use following methods:
   // -Drag and drop                 an element on the source code which will copy its      ID into mouse   position in the codes.
   // -Ctrl +         Right click on an element                    which will copy its      ID into current position in the codes.
   // -Ctrl + Shift + Right click on an element                    which will copy its File ID into current position in the codes.
   // -Ctrl + Shift + Space       to display list of project elements and select the one that you're interested in.

   // Let's draw an image from project resources, we need to use 'Images' cache,
   // to access an Image through its ID this way:
   Images(UID(1119600675, 1212460399, 80010661, 526665178))->drawFs(); // draw image full screen

   // If you'd like to investigate the project element by its ID, simply:
   // Copy the whole "UID(..)" text into "Find element" textline in the project view,
   // and desired element will get highlighted.
-Ctrl + Shift + Right click on an element which will copy its File ID into current position in the codes.
Also you can use EncodeFileName(UID(..)) to get the string.

However the best way is to do this at the start of Init()
Fonts.del();
FontDefault=Fonts(UID(..));
07-04-2013 12:15 PM
Find all posts by this user Quote this message in a reply
jagatai Offline
Member

Post: #3
RE: FontDefault.load()
Awesome, thanks Esenthel!
07-04-2013 07:33 PM
Find all posts by this user Quote this message in a reply
Post Reply