Jump to content
Urban Vibravant

Two WinTextEdits for one Query

13 posts in this topic Last Reply

Highlighted Posts

Posted:
Last Online:  
 

Hey guys. Does anyone know how to set up two different working WinTextEdits?

This is as far as I've gotten. The only problem is, it won't save my edited text for the second one, and just uses the first in its place.

2nd-TextEdit_REC-ezgif.com-video-to-gif-converter.gif.978bd9d7c3efefaf8f6318d906f177e4.gif

Reason for this:

Not all subways are subway stations, some are just the entrance to a station.

If someone wanted the option to change both the building name and subway name, and in this example call the subway entrance of 200W40 "Bryant Park (Subway Station)" then they could.

200W40 actually has a subway entrance, and says "42 Street subway station" and not 40 Street

200W40-42-Street-Subway.jpg.17177f13326038d9fb83e28d9087a373.jpg

This might be superfluous, but I think it would be an interesting feature.

Lines_added.jpg.e94f1fcb889996f3ff999949e1328499.jpg

Share this post


Link to post
Share on other sites
Posted:
Last Online:  
 
35 minutes ago, Urban Vibravant said:

Does anyone know how to set up two different working WinTextEdits?

So you need two different hover over Texts for the same lot? I believe the only way would be to set it so the props are not queried the same as the building and then name a large prop for the subway portion to have the 2nd name you want to see.

It's been a hundred years since I last had my fingers under the hood for this sort of thing so take it as a possibility, but with a grain of salt. *;) 

  • Like 1

Chance favors the prepared mind. ― Louis Pasteur  
Remember, a few hours of trial and error can save you several minutes of looking at the README. -- I Am Devloper (on Twitter)

Clickable ---> The Best of Cori's Posts  (scroll down a wee bit there)    Something fun: MySimtropolis - Invitation to become a SimCity 4 MySim

Are you new here? Check out the Introduction and Guide to Simtropolis.

Share this post


Link to post
Share on other sites
Posted:
Last Online:  
 

@Urban Vibravant Btw, I decided to make this your own topic rather than taking over someone else's. *;) 

  • Like 1

Chance favors the prepared mind. ― Louis Pasteur  
Remember, a few hours of trial and error can save you several minutes of looking at the README. -- I Am Devloper (on Twitter)

Clickable ---> The Best of Cori's Posts  (scroll down a wee bit there)    Something fun: MySimtropolis - Invitation to become a SimCity 4 MySim

Are you new here? Check out the Introduction and Guide to Simtropolis.

Share this post


Link to post
Share on other sites
  • Original Poster
  • Posted:
    Last Online:  
     

    @CorinaMarie 

    36 minutes ago, CorinaMarie said:

    I decided to make this your own topic rather than taking over someone else's. *;)

    I apologize, I assumed it was for all custom query inquiries so thank you *:lol:

    42 minutes ago, CorinaMarie said:

    and then name a large prop for the subway portion to have the 2nd name you want to see.

    So if I understand you correctly, the subway prop would have a separate query window for if you click on the entrance, and it would show the subway stats, therefore it has a separate name. (Cool idea btw) But also it would only show the subway stats and same goes for the commercial side, only the building, not the subway.

    42 minutes ago, CorinaMarie said:

    It's been a hundred years since I last had my fingers under the hood for this sort of thing

    No intention of large demands or expectations from you lol, but I guess would you happen to remember from a past project if it's possible to direct one query's TextEdit to another query? I guess any way that two queries can talk to each other, I could probably figure it out from there.

    • Like 1

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     
    4 minutes ago, Urban Vibravant said:

    I apologize, I assumed it was for all custom query inquiries so thank you *:lol:

    No worries. That topic is a special project Kel's been working on for a long time. Since I've followed it from the start I knew that was his baby. And splitting out two posts to their own topic is three mouse clicks total (plus typing a topic title (which you can change to anything you like by editing the first post) so it's not much work for me).

     

    7 minutes ago, Urban Vibravant said:

    the subway prop would have a separate query window

    No, I believe the most we can do is it could have its own separate hover over text. There's no way for two complete (and different) query windows for one lot. *:( 

     

    9 minutes ago, Urban Vibravant said:

    I guess would you happen to remember from a past project if it's possible to direct one query's TextEdit to another query?

    I'm certain the query windows can't chat with each other in that way. However, info that can be stored in Lua variables could be made to display in one or the other query window, but I'm not sure that helps any.

    The only way for two full and separate query windows would be two separate lots which could be made to fit together so they look like one larger lot.

    • Like 2

    Chance favors the prepared mind. ― Louis Pasteur  
    Remember, a few hours of trial and error can save you several minutes of looking at the README. -- I Am Devloper (on Twitter)

    Clickable ---> The Best of Cori's Posts  (scroll down a wee bit there)    Something fun: MySimtropolis - Invitation to become a SimCity 4 MySim

    Are you new here? Check out the Introduction and Guide to Simtropolis.

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     

    New idea! *:idea: 

    What if we made it one Query for the whole building, but gave it the appearance of two separate floating queries side by side? Or even offset a wee bit one or both directions? Then all the commercial side would look commercial and the subway would have all the normal subway stuff. The close button for either would close both of them since that would just be a duplicated button and apply to the whole single popup panel.

    (It'd use transparency to make it look like two separate panels.)


    Chance favors the prepared mind. ― Louis Pasteur  
    Remember, a few hours of trial and error can save you several minutes of looking at the README. -- I Am Devloper (on Twitter)

    Clickable ---> The Best of Cori's Posts  (scroll down a wee bit there)    Something fun: MySimtropolis - Invitation to become a SimCity 4 MySim

    Are you new here? Check out the Introduction and Guide to Simtropolis.

    Share this post


    Link to post
    Share on other sites
  • Original Poster
  • Posted:
    Last Online:  
     

    @CorinaMarie I guess I don't understand how that's much different from what I've done in the gif above: One query window with "two locked" stat windows. As far as I understand, only one TextEdit per Query Window is allowed. I'm about to start looking in the direction of LUAs, but you're welcome to tell me I'd be wasting my time haha.

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     
    2 minutes ago, Urban Vibravant said:

    I guess I don't understand how that's much different from what I've done in the gif above: One query window with "two locked" stat windows.

    It's exactly the same, only completely different. *:P 

    Basically what I mean is we can give them the appearance of being two separate query windows if that would be visually appealing to you. Imagine your first one on the left then open transparency about an inch wide to its right (where the city shows thru) and then your bottom query to the right of that.

    Ofc, it still wouldn't let you name each one separately. Only one name for the Lot and that can be changed in the game for each lot.


    Chance favors the prepared mind. ― Louis Pasteur  
    Remember, a few hours of trial and error can save you several minutes of looking at the README. -- I Am Devloper (on Twitter)

    Clickable ---> The Best of Cori's Posts  (scroll down a wee bit there)    Something fun: MySimtropolis - Invitation to become a SimCity 4 MySim

    Are you new here? Check out the Introduction and Guide to Simtropolis.

    Share this post


    Link to post
    Share on other sites
  • Original Poster
  • Posted:
    Last Online:  
     
    15 minutes ago, CorinaMarie said:

    we can give them the appearance of being two separate query windows if that would be visually appealing to you.

    Unfortunately, it wouldn't..

    What I have noticed is you didn't say it wasn't possible with a LUA :)

    dumb-and-dumber-lloyd.gif

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     
    1 minute ago, Urban Vibravant said:

    What I have noticed is you didn't say it wasn't possible with a LUA :)

    I cannot absolutely say no because @Null 45 has created a DLL with a bunch of Lua extensions which I'm not able to test (and prolly can't for a year or so until RL things change).

    • Like 1

    Chance favors the prepared mind. ― Louis Pasteur  
    Remember, a few hours of trial and error can save you several minutes of looking at the README. -- I Am Devloper (on Twitter)

    Clickable ---> The Best of Cori's Posts  (scroll down a wee bit there)    Something fun: MySimtropolis - Invitation to become a SimCity 4 MySim

    Are you new here? Check out the Introduction and Guide to Simtropolis.

    Share this post


    Link to post
    Share on other sites
  • Original Poster
  • Posted:
    Last Online:  
     
    4 minutes ago, CorinaMarie said:

    @Null 45 has created a DLL with a bunch of Lua extensions

    I'll definitely look into it. I just wonder if there would be DLL dependencies or compatibility issues as are known with DLLs.

    8 minutes ago, CorinaMarie said:

    which I'm not able to test (and prolly can't for a year or so until RL things change).

    Totally understand. For me, bills definitely steal my batting time. ..sigh.

    • Like 1

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     
    4 hours ago, CorinaMarie said:

    I cannot absolutely say no because @Null 45 has created a DLL with a bunch of Lua extensions which I'm not able to test (and prolly can't for a year or so until RL things change).

    The Lua extensions DLL wouldn't cover something like this.

    7 hours ago, Urban Vibravant said:

    Not all subways are subway stations, some are just the entrance to a station.

    So basically a building that happens to have a built-in transit station?

    SC4 only supports one building per lot, so the WinTextEdit field is used for the main building. Internally the custom name property is stored as the item name. While my Query Tool UI Extensions DLL adds additional features to the query dialog, it is not set up for this kind of custom dialog editing.

    • Thanks 2

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
    Currently: Viewing Topic: Two WinTextEdits for one Query
     

    @Urban Vibravant, I'll try to help you.  Not only have I used that real subway station many times, I often went to Midtown Comics prior to COVID and have occasionally gone back with the kid in order to browse their extensive selection of toys on their second floor.  And your buildings are awesome so they deserve their own awesome query.

    I recall a thread where you were asking if a growable building could act as a subway.  Irrespective if that works or not (I'm not sure if it would), there's no reason why a query cannot display something that appears to be a secondary named item within.  I think the issue is that your secondary window for the subway station part of the query is using the "iid=IGZWinTextEdit id=0x00001000" property to display the name of the building twice, which because it's relying on a variable will always display what that variable is, no matter how many times.  The variable is 0x00001000, and that is the building name, and if you rename one it will revert back to the "correct" variable from the building exemplar.

    What might work is hard-coding that secondary name into your custom query so it displays what it's supposed to display.  It will be static, but it will appear as you want.  Similar coding was done in the secondary windows for the Census Repository, where the name of the building "Census Repository Vault" is shown, but then other elements below are hard-coded as LTEXT or plain text entries: "City Budget Overview", "Residential Capacity", "Commercial Job Supply", and "Industrial Job Supply."  Those cannot be edited, but they shouldn't be because the query should display things as they are.

    678337ce59b12_CensusRepositoryQueryExpan

    If you want the name to be editable, I'm not sure how to do that.  But certainly if you hard-code the secondary name into the query, it will display properly just as it does for the Census Repository.  

    Aside from that, your query is light-years ahead of anything I ever could've done.  It is a fantastic piece of art.  You are very, very skilled and frankly I am super impressed.  I'm also very glad to help you out because your buildings and your efforts are top-notch and above all, I love a good custom query (and hence, no need to split off this thread from the original but that's a minor matter).

    • Like 2

    Share this post


    Link to post
    Share on other sites

    Sign In or register to comment...

    To comment in reply, you must be a community member

    Sign In  

    Already have an account? Sign in here.

    Sign In Now

    Create an Account  

    Sign up to join our friendly community. It's easy!  

    Register a New Account


    ×

    Thank You for the Continued Support!

    Simtropolis depends on donations to fund site maintenance costs.
    Without your support, we just would not be in our 24th year online!  You really help make this a great community. *:thumb:

    But we still need your support to stay online. If you're able to, please consider a donation to help us stay up and running. This helps sustain a platform where we can share our community creations for years to come.

    Make a Donation, Get a Gift!

    Expand your city with the best from the Simtropolis Exchange.
    Make a Donation and get one or all three discs today!

    STEX Collections

    By way of a "Thank You" gift, we'd like to send you our STEX Collector's DVD. It's some of the best buildings, lots, maps and mods collected for you over the years. Check out the STEX Collections for more info.

    Each donation helps keep Simtropolis online, open and free!

    Thank you for reading and enjoy the site!

    More About STEX Collections