SetRootDirPath sets the root directory path where resources are to be loaded from.
(rootDirPath string)
| 38 | |
| 39 | // SetRootDirPath sets the root directory path where resources are to be loaded from. |
| 40 | func (rm *ResourceManager) SetRootDirPath(rootDirPath string) error { |
| 41 | path, err := filepath.Abs(rootDirPath) |
| 42 | if err != nil { |
| 43 | return err |
| 44 | } |
| 45 | |
| 46 | rm.rootDirPath = path |
| 47 | |
| 48 | return nil |
| 49 | } |
| 50 | |
| 51 | // Bitmap loads a bitmap from file or resource identified by name, or an error if it could not be |
| 52 | // found. When bitmap is loaded, 96dpi is assumed. |