EQ2Interface.com
Search Downloads


Go Back   EQ2Interface > General Discussion > Request

Reply
Thread Tools Search this Thread Display Modes
  #1  
Unread 11-22-2011, 01:13 PM
Noviets Noviets is offline
A Sea Turtle
Interface Author - Click to view interfaces
 
Join Date: Mar 2008
Server: Antonia Bayle
Posts: 31
Question Ingame Editable and Saveable Notepad

DrumsUI has something similar to this (Functionality Wise) you can save Notes on items, which display in a Notes Window accessible by examining that item.
When you hit Save, it saves to an XML which is edited/added to the file depending if the item has notes already.

I would like to try to Copy this, and make it into a simple Notepad like feature, where the XML will be your Content, and Saving/editing the content will update the XML file.

It uses:
Code:
<?xml version="1.0" encoding="utf-8"?>
    <Button Name="ExamineLayout" OnPress="sXML=(drumsui_itemnotes.xml)&#xD;&#xA;map2_custom_poi_filename sXML&#xD;&#xA;map2_custom_poi_filename sXML&#xD;&#xA;map2_custom_poi_filename=drumsui_itemnotes.xml&#xD;&#xA;map2_custom_poi_filename=drumsui_itemnotes.xml&#xD;&#xA;&#xD;&#xA;Parent.MinimumSize=(535,326)&#xD;&#xA;Parent.MaximumSize=(535,326)&#xD;&#xA;Parent.DialogFrame.Size=(535,326)&#xD;&#xA;Parent.ExamineSaveSettings.visible=true&#xD;&#xA;Parent.ExamineResetSettings.visible=true&#xD;&#xA;Parent.ExamineText.visible=true&#xD;&#xA;Parent.TitleLabel.localtext=&apos;Item Note Editor&apos;&#xD;&#xA;Parent.PoiNameTextbox.text=Parent.CurrentOption.cmdName&#xD;&#xA;Parent.PoiDescLabel.text=&apos;Note:&apos;&#xD;&#xA;Parent.PoiNameTextbox.enabled=false&#xD;&#xA;Parent.PoiDesc.text=(Parent.CurrentOption.cmdString)" />
    <Button code1end=".PoiDescription&quot;=Parent.PoiDesc.text" code1start="&quot;Parent.Parent.DrumsUI_ItemNotes.POI.ItemNotes." code2end=".PoiDescription&quot;=Parent.PoiDesc.text" code2start="&quot;Parent.Parent.Parent.Custom.DrumsUI_ItemNotes.POI.ItemNotes." code3end=".PoiShowAlways&quot;=true" code3start="&quot;Parent.Parent.DrumsUI_ItemNotes.POI.ItemNotes." code4end=".PoiShowAlways&quot;=true" code4start="&quot;Parent.Parent.Parent.Custom.DrumsUI_ItemNotes.POI.ItemNotes." Location="105,175" Name="ExamineSaveSettings" OnPress="sCMD=(&apos;Parent.CurrentOption.cmdName&apos;)&#xD;&#xA;&#xD;&#xA;Parent.DoCommand.onpress=(code1Start ## sCMD ## code1End)&#xD;&#xA;Parent.DoCommand.visible=true&#xD;&#xA;Parent.DoCommand.onpress=(code2Start ## sCMD ## code2End)&#xD;&#xA;Parent.DoCommand.visible=true&#xD;&#xA;&#xD;&#xA;Parent.DoCommand.onpress=(code3Start ## sCMD ## code3End)&#xD;&#xA;Parent.DoCommand.visible=true&#xD;&#xA;Parent.DoCommand.onpress=(code4Start ## sCMD ## code4End)&#xD;&#xA;Parent.DoCommand.visible=true&#xD;&#xA;&#xD;&#xA;Parent.ButtonOK.press=true" ScrollExtent="105,38" Size="105,38" Style="/CommonElements.LargePushButton.data.style" Visible="false">Save</Button>
    <Button Location="221,175" Name="ExamineResetSettings" OnPress="Parent.PoiDesc.text=(Parent.CurrentOption.cmdString)" ScrollExtent="105,38" Size="105,38" Style="/CommonElements.LargePushButton.data.style" Tooltip="Undo any changes made (while this window has been open)" Visible="false">Reset</Button>
    <Page BackgroundOpacity="0.400" Location="15,213" Name="ExamineText" ScrollExtent="506,95" Size="506,95" Visible="false">
        <Text AbsorbsInput="false" Color="#F1F1F1" Font="/TextStyles.Normal.NormalStyle" Location="28,-4" Name="tips" PackSize="a,fixed" ScrollExtent="477,100" Size="477,100" TextAlignmentVertical="Center" TextColor="#FBF1D9">- Apostrophes and quotes are safe to use
- Recommended to stick to normal text characters
- Using more than one line is perfectly fine
- Do not attempt to edit an Item Note while already editing another</Text>
    </Page>
This is the GUI Window, I have no clue what the code does, maybe someone can help to explain it.

Just trying to find the functionality that it uses to Insert the data into a file. The information it uses to get the itemname and stuff can all be stripped out, as I would like to try and have an independant Notes Window.

Important Note:
I do NOT want to have to play in window mode, or use windows Notepad.
I do not want to have to open notepad or search for files to open and edit.
I would like to play the game in Full Screen, and still be able to write down notes in game. (No Pen and Paper jokes :P)

I'd like to get this done as soon as I can. I'd really appreciate anyone who can help make this happen.
Reply With Quote
  #2  
Unread 11-28-2011, 01:05 PM
Darqwood's Avatar
Darqwood Darqwood is offline
A Griffon
Interface Author - Click to view interfaces
 
Join Date: Aug 2005
Posts: 864
Post

I played with this idea a bit over the weekend and came up with a notes tab on the persona window (zipped attachment below). There are three note tabs for each character, and a "shared" tab accessible by all of your characters. As far as I know, the only way to get the functionality you are looking for is to use the POI system that Drumstixx uses for his settings, but there is an issue that you have to watch out for when switching between characters:

For example, log in with Character A and create/edit some notes, then switch to Character B and create/edit some notes. So far, everything works fine. But if you switch back to A again, you won't see any of the recent changes you made to Character A's notes. The changes will be saved, but you will only see A's notes as they were when you first logged in. You will need to log all the way out and back in, or do a /loadui to get the recent changes to appear on A. There is no way to actively refresh the POIs when you switch back and forth between characters.

This behavior is a bit squirrely and hard to support unless the user is aware of the limitations. In another thread it was suggested that an in-game book would work as a notepad of sorts -- I like that idea a lot better because the information goes back to the server when you save it.





__
Attached Files
File Type: zip darqui-persona-with-notes.zip (25.3 KB, 390 views)
Reply With Quote
  #3  
Unread 11-28-2011, 05:59 PM
Drumstix42's Avatar
Drumstix42 Drumstix42 is offline
A Griffon
Featured
 
Join Date: Oct 2004
Server: Antonia Bayle
Posts: 3,287
Default

I didn't look at your code yet, but there is one thing I remember that you should take note of when setting up the code for the edit button, and that is to make sure that when you're done editing, you have some kind of "save" button or trigger that will cause the normal EQ2map functionality to still work. From testing, you could not revert the current poi.xml file being edited from the POI edit window itself. It just wouldn't trigger, or trigger too soon, and save data in the wrong place.

The way I got around data saving for characters when switching was to save the data in 2 places, but I can't remember off hand if it works correctly when switching and then switching back. But you basically have the POI window save the info, then you actually set the data yourself with the XML code, like Parent.POI.Save.Data.Area.Poi.Description = "new text you want to save". The data won't actually be able to find the correct path to save to, but will create a sort of fake "variable" in the reference tree with Parent.POI.Save.Data.Area.Poi.Description being the name of the variable.

The second place I save it is just in a config window using the settings' names as variables. I would always have default values set there. Upon first login it checks the POI file, if data exists, it copies it over to the config window. If you're making the notes global, and not per-character, it gets a bit easier. To make the data refresh when changing characters, you just need to trigger some kinda code when the window pops up to fetch it from one of the two places.


All of this made easier if we could just save text to the UISettings XML file
__________________
"I'm afraid you're guilty of thought-crime. Don't bother getting the door, we'll let ourselves in..."
<Donate to DrumsUI> < [DrumsUI] Updater > < [DrumsUI] Full Interface> < Drumstix42 on Twitch.tv
>

Last edited by Drumstix42 : 11-28-2011 at 06:07 PM.
Reply With Quote
  #4  
Unread 11-29-2011, 03:52 PM
Darqwood's Avatar
Darqwood Darqwood is offline
A Griffon
Interface Author - Click to view interfaces
 
Join Date: Aug 2005
Posts: 864
Default

I agree, and it would not have to be a whole new system -- it could be as simple as adjusting the existing map2_add_poi routine to not require going through the popup_add_poi window. That one step would take away 90% of the extraneous code and frustration IMO. Map2 commands using simple name/value pairs:

map2_add_var filename pagename varname value
map2_get_var filename pagename varname
map2_delete_var filename pagename varname

So for example, a one-line command like:


map2_set_var "darqui_notes.xml" Parent.CharName.Text "Note1" Parent.Textbox1.Text


would translate into:

Code:

<?xml version="1.0" encoding="utf-8"?>
<Page Name="VAR">
    <Page Name="Baldaor">
        <Data Name="Note1" Value="This is Baldaor&apos;s note 1." />
    </Page>
    <Page Name="Slizzik">
        <Data Name="Note1" Value="This is Slizzik&apos;s note 1." />
        <Data Name="Note2" Value="This is Slizzik&apos;s note 2." />
    </Page>
</Page>

The game could easily set and unset the filename instead of relying on the author to put everything back where it belongs. Map2_get_var would read the variable back into the structure on-demand instead of relying on the <include>. Problem solved.


Maybe in EverQuest III....


__
Reply With Quote
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 07:36 PM.


Our Network
EQInterface | EQ2Interface | WoWInterface | LoTROInterface | ESOUI | MMOUI