![]() |
GuiTextCtrl inside of GuiTextListEntry?
While creating (or at least trying to >_<) the trading system for Valikorlia, I realized that I wasn't accounting for duplicate items. So, I had the idea of having a text control at the bottom right-hand corner of the item's icon. However, I haven't had much luck.
I've tried creating a GuiTextCtrl inside the GuiTextListEntry, but it doesn't work. I've also tried creating it outside of the GuiTextListEntry, and it still doesn't work. Each time I try to create a GuiTextCtrl inside of this particular loop, it breaks and no rows are added at all. Below is the chunk of code I'm dealing with. Note that temp.i is declared at the start of the function. PHP Code:
|
GuiTextListEntry's aren't actual real GUI objects but are just standard objects the contain information for another GUI object (in this case, a GuiTextListCtrl).
My suggestion: Create a second GuiTextListCtrl on top of your first one with the same x,y,w,h and with active set to false (0). You may need to edit the profile of that text list ctrl to edit font sizes and such but you should eventually be able to display what you want and since active is false, the gui is treated as if it isn't there when you click. |
I thought I told you to create the GuiTextCtrl objects inside the GuiTextListCtrl then find where to draw the text from the entries. If you can't create those inside the GuiTextListCtrl then the obvious thing to do is just create them after it.
Don't listen to Zero :p |
Quote:
My way is way cooler :) |
Quote:
|
Zeros Way: GuiTextListCtrl + # of GuiTextListEntry
My Way: # of GuiTextCtrl Though I expect the GuiTextCtrl to take more total memory, the computer can handle it. And I'm Dylan's boss anyways. Edit: Dear Idiot, don't create it inside the GuiTextListCtrl, create them after the control so it draws over it. |
I tried. Zero's idea is better, in my opinion. Besides, it's easier to deal with rows. If I did what you suggested, I'd have to remove the text control once the user chooses the item (thus, moving the item's row to another text-list control), then move all other text controls' y values; in order to move the y values, I'd have to figure out which text controls are below the selected item's row. Using another text-list control seems much simpler.
|
Making things look nice isn't always easy. Don't be lazy.
|
The two ideas have the same result. One's easier. I'm choosing that one. :) Unless you have some idea that's easier.
|
All times are GMT +2. The time now is 01:27 PM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.