Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Topics - amaranth

Pages: [1]
NGUI 3 Support / How to get screen position between two words in UILabel?
« on: December 31, 2013, 09:03:40 PM »
I'm trying to figure out how to build a string with images in it. I have everything working, except that I don't know how to get my image to show up in the right place.

The string: "Open your journal to see your quests."

The question: I need to insert an image between "your" and "journal". I believe I need to get the screen coordinates between these two words, but I'm not sure how to do this.

NGUI 3 Support / Alternative to panel to fade-out multiple widgets?
« on: August 25, 2013, 11:01:41 PM »
I have a drag panel with quests in it. Each quest has a bunch of widgets to represent different things (buttons, icons, text). When the player completes a quest, I want the quest to fade out before it is removed. I tried adding a panel for each quest, but when I did this, my quests wouldn't clip. Anyone have an idea for an easy way to fade out a group of widgets w/o using a panel?

NGUI 3 Support / Localization: PlayerPrefs gets wrong language
« on: August 02, 2013, 12:16:10 PM »
For some reason, my game always defaults to French, even though the starting language is English. It seems like the problem starts when I use this line:

currentLanguage = PlayerPrefs.GetString("Language", startingLanguage);

When I use this line, startingLanguage is "English" but the currentLanguage returned is "French". I also noticed that after I use this code, startingLanguage changes to "French". Any one know what's going on?

public class Localization : MonoBehaviour
  1.         void Awake ()
  2.         {
  3.                 if (mInstance == null)
  4.                 {
  5.                         ...
  7.                         print ("start language: " + startingLanguage);
  9.                         currentLanguage = PlayerPrefs.GetString("Language", startingLanguage);
  11.                         print ("start language: " + startingLanguage);
  12.                         print ("current language: " + currentLanguage);
  14.                         ...
  15.                 }
  16.         }

Print Results:
start language: English
start language: French
current language: French

NGUI 3 Support / BetterList error after upgrade on Sept 21
« on: September 29, 2012, 11:14:55 PM »
Just updated to the latest version. After update, I got this error:

Assets/NGUI/Examples/Scripts/InventorySystem 2/Editor/ElementInspector.cs(185,54): error CS0029: Cannot implicitly convert type `BetterList<string>' to `System.Collections.Generic.List<string>'

Is there an easy fix?

NGUI 3 Support / UIDraggablePanel > Can have panel w/in panel?
« on: September 12, 2012, 07:10:28 PM »
Is it possible to put a panel under a panel that contains UIDraggablePanel script? When I do this, the contents of the child panel won't disappear when I scroll the menu.

Here's my setup in the Hierarchy Tab:

-Game Object A: UIPanel + UIDraggablePanel Script
---Game Object B: UIDrag Panel Contents
------Game Object C: Image
------Game Object D: UIPanel
----------Game Object E: Text

Here's the problem:
Game Object E does not hide when you move the panel up and down. If I move it directly under Game Object B, it hides like it should.

I'm working on two inspector scripts that let the designer (a) create a list of states in one inspector, then (b) populate these states in another inspector where weapons are created. 

From your sample inventory scripts (awesome!!!), I see how to do this using an enum, but since my list of states is created through the inspector and can change w/o going into the scripts, I'm not sure what to use. Any hints?

NGUI 3 Support / display variables in labels?
« on: July 05, 2012, 07:58:19 PM »
Anyone know how I would do the following? I'd like to display the following type of string in a label:

Mix [ingredient 1], [ingredient 2], and [ingredient 3] in a [container type] and stir with a spoon [amt] times.

Should I be using something other than a label for this? I saw the option to change text color, but I'm not sure how to do anything more advanced. Thanks!

NGUI 3 Support / Raycast doesn't find button
« on: June 14, 2012, 11:39:20 AM »
I've scoured the forums, but I've not figured out this problem. The button works fine when I interact with it, but it won't take take raycasts from my main camera. (I need the camera to notify the game manager when the button is clicked so that game objects behind the button are ignored)

-Raycast Hit Triggers is ON in the Physics Manager
-My Main Camera (Orthographic) has the UICamera script attached to it
-My button and its panel are on a layer called GUI
-My button's UI Camera has culling mask and Event Receiver Mask set to GUI
-My button has a box collider with the trigger ON

Am I missing an additional setting?

Pages: [1]