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 - Majicpanda

Pages: [1] 2 3
1
NGUI 3 Support / HP Bar for monsters disappears at 10%
« on: July 13, 2014, 12:45:10 PM »
I have a Monster prefab with a section for name, hp bar, and level.  To get the health bar to show proper size I had to change the scale of the parent with the UISlider on it to .1/.1/1.0 scale so that I could leave the background and foreground sprites at their normal 50x8 size.

The problem with this is about 10% health the bar simply disappears I would assume because of the weird scaling.  I have a completely separate UI in the game that shows your party and normal scaling and all those health bars work as they should.. it's only these "world" objects I spawn in game which I have nested some UI into.

The parent for all the UI elements has a UIPanel on it... is something being done incorrectly here to cause the need to scale things very oddly?  I had to set the name and level for the monster to scale 1 also where normally it would be about 10.

Edit: I'm assuming the scale issue is due to not having the widgets under any kind of UIRoot? Not sure how to address it if so.. everything works fine in game if you simply toss widgets under normal GameObjects.. it just requires odd scaling.

Thanks.

2
NGUI 3 Support / Enter key works on disabled buttons..
« on: July 09, 2014, 09:45:04 AM »
I just got a bug report about being able to hit Enter to trigger buttons which was a huge surprise since I didn't code in the Enter button.  I went looking and found your submit and cancel key code... this could be useful but it all a sudden is making me rethink all the code I have in the entire game because I limit things by UI disables, not code (my fault I know).

The main problem I have with this is it allows hitting Enter for a button that is marked isEnabled=false.  Is there any way to prevent this from working on disabled objects?

3
NGUI 3 Support / OnTooltip after clicking a button
« on: May 24, 2014, 05:20:52 PM »
When using OnTooltip and clicking a button that has the script on it, the tooltip goes away and doesn't show back up.  I've got skill tooltips for an RPG using this system so I don't want the tooltip to go away at all while hovering the button.  Is there any way to make a tooltip not go away when clicking on a button?

4
NGUI 3 Support / Fixed position UI Design
« on: April 20, 2014, 12:21:40 PM »
Going to open with this image from a game I saw...
http://media1.gameinformer.com/filestorage/CommunityServer.Components.SiteFiles/imagefeed/featured/red-hook/DarkestDungeon03.jpg

We had this same concept in mind when trying to design a bottom UI to our game where the world is above and the ui is below.  From the looks of it, do you need to design for 4:3 res which is your lowest ratio in order to make it compatible across all?

I know you could anchor and do some things to make a more modular design, but ours is very fixed just like theirs where any movement would cause it to not work.

So.. with our pixel game the UIRoot is man,min,max of 166 144 244 and I think this means literally nothing since the game runs at min 720p res, so technically we're at a fixed size?  Would it require fixedSize as the option to get something like this?

Here's a very rough sketch of the beginnings of ours where I've "blocked off" the sides to make sure we design within the 16:10 constraints since we're allowing widescreen only.  I'm just unsure what to tell our artist to design the UI in.  That's the main issue.  The image says 390x80 in the engine right now, so they just need to design to that spec?
http://i60.tinypic.com/65qq8g.png

Thanks in advance.

5
NGUI 3 Support / Use of Update() to track a party's info.
« on: April 19, 2014, 12:28:10 AM »
I'm wondering what the performance issues are if you use Update() on a class that you define say a public Party myParty which is simply a List<T> of members in your party.

Update would be updating the healthbar slider to always be up to date opposed to the current model I have of directly informing the party UI any time health is changed.  I tried using an event delegate system and wasn't happy with it, but it seems like there's some performance hits by updating widgets in Update like this.  Can you confirm that?

6
NGUI 3 Support / More dynamic buttons?
« on: March 19, 2014, 12:26:49 AM »
I'm trying to create a button system in the game where there's just a slight brightness on hover and the only good way I can see to do this is to tint all the buttons down to 200 200 200 255 as example and on hover do 255 255 255 255.  Is this the best solution since there's no way to do a complete image change on hover option?  I don't see any other way to do a highlight option like Diablo 3 where you're not really just going from color to color like you do in Starlink (which I assume you just have white buttons and adjust RGB in game).

7
NGUI 3 Support / Use UITooltip's screen bounds functionality?
« on: March 14, 2014, 03:19:48 PM »
Is there any help in how to go about taking say a custom Prefab with a set of widgets on it and utilizing the UITooltip's way of ensuring the pop up is confined within the game window and also at the spot that the mouse is when the tooltip is called?

The background for my item tooltip is always the same size because it's very custom like Diablo 3 with images etc, so I would think this would be easier than even your UITooltip system that dynamically changes the tooltip size based on contents.  Just not sure how to extract the pieces out that I need.

8
NGUI 3 Support / Scroll View Lag?
« on: February 27, 2014, 08:22:55 PM »
This is potentially my fault due to poor design, but I have a scroll view that holds an inventory system.  The inventory can hold up to 100 items, so what Ive done is create 100 prefab instances that can contain all of the slots and the ones I don't need I make completely inactive.  When scrolling the list it lags horribly unless I delete all the way down to about 20 items.

Is there something with scroll lists that I might need to look for when containing a large number of prefabs within?

9
NGUI 3 Support / Handling Key input based on current open window?
« on: February 12, 2014, 12:15:25 PM »
How do you manage a complex UI where hitting 1 could mean execute skill 1 if you're in combat or it could also mean select party 1 if you're in a party menu?  I have a really complex UI game and I also need to get the focused window so that ESC closes out the most recently opened window, so I assume I'll have to add a hasFocus bool to my CloseWindow script that is checking for ESC and manage a List<> of all the windows that are open....

If there's an easier way I'd love to know.

10
NGUI 3 Support / Dynamic Localization Possible?
« on: February 03, 2014, 02:36:24 PM »
I have a game where the .text of labels is generated from a long string with several blanks and then the blanks are filled with random words chosen by a generator.

I also have many other strings in the game that are randomly generated based on what is going on at the time.

How do you create the localization file for something like this when there's no key/value pair which seems to be how the localization works?

11
NGUI 3 Support / Don't think I can convert project to new NGUI
« on: January 22, 2014, 11:01:29 PM »
Our game uses a size 8 pixel font and a UI size of 144 to create a pixel perfect size UI to meet our tk2d size pixel perfect world.  Upon trying to update to the new NGUI I ran into a major problem with the font.  The old system allowed you to change the "font size" from 5 to 6 for example which gave me the size I wanted in the inspector transform.

The new system seems to "snap" my font size in really large increments when I use the height option.  Not sure why this is occuring, but I imagine it's because of the tiny font size I use?  On screen changing the height by 1 is just way too big of a change in font size, so I have no way to correctly size the font.

12
NGUI 3 Support / Draggable Panel map with zoom feature?
« on: January 22, 2014, 10:54:38 PM »
I have a world map in 2d which has a draggable panel on it.  Everything works great, you can grab it and drag it around and it correctly stops at a bounds I specify.

What I want to do is implement a zoom feature.  There are tons of items that are clickable as a child of the map.  Resizing the UIRoot to double size creates the "zoom" out I want.  How do you accomplish this in code?  Also, if I double the res it makes it so there's a bunch of extra room to drag around to which I didn't account for.  The pink area needs to collapse to meet the zoomed out effect... is this possible?

13
NGUI 3 Support / Change font mid design?
« on: December 05, 2013, 01:04:39 PM »
Is there anything to help with changing out a font mid design?  Say I have widgets with font size 10 and the new font is either bold or just makes it so everything needs to be size 8 instead to look the "same"..

Is the only way to fix this to write an editor extension and get all UILabels in the entire hierarchy and hope for the best with an 80% Mathf.CeilTOInt(x,y) change of every single UILabel?

14
NGUI 3 Support / Spring Panel World Map?
« on: November 27, 2013, 08:19:18 PM »
I have a large map with lots of points of interest im wanting to use springpanel to center onto the current object.

How do i go about doing it with the following hierarchy?
-Panel (uidraggable) + (SpringPanel) + (Soft Clipping)
-- UISprite (World Map)
-- Empty GO
--- Town 1
--- Town 2
--- Dungeon 1

In code I want to center on Town 1, how do you get the position to pass to the SpringPanel? Do I need to structure this differently?

15
Like the topic states.. I'm enabling a panel and in the same method block setting some buttons isEnabled true or false based on some criteria, but the thing I'm seeing is the color of the background flashes from enabled to disabled color for a nanosecond as the panel comes enabled.  This makes sense, but it looks terrible visually..

Any better way to do this or prevent it?

Pages: [1] 2 3