Iris2.de

Iris2-Forum
It is currently Sat Oct 24, 2020 5:06 pm

All times are UTC




Post new topic Reply to topic  [ 19 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: Journal
PostPosted: Mon Dec 10, 2007 10:57 pm 
Offline

Joined: Wed Oct 24, 2007 1:50 pm
Posts: 5
hi,

this is my first post, so hi guys :>

Im keeping track of this project for some time now, and hoping that i can use this someday on vetus-mundus my homeshard.

last weekend i startet to learn lua, so im not realy familiar with this language, but programming in generally i do for about 8 years now.

by now i picked the not really working ingame journal to enhance the textwrapping and scrolling.

my current state is:
- word wrapping works fine
- auto scrolling the lines up when new text arrives as well
- the scrollbar has the logic, but not connected to the textfield
- minimizing to the small icon works, and on hotkey it is restored to last position

i run into some bugs/erros which took a lot of time :>

1: i dont get any mousepicking working on the minimized journal icon, so something might be erronous in the GetWidgetUnderCursos() function, or at least the events arent executet for this widget.

2: i tried to resize the journal dialog to the last dimension state, but always get nil pointer exceptions when calling one of these functions: DialogResize, SetDimension, ResizeMaximized

3: which are the icons for the up/down scrolling?

if anyone has some code enhancements or feedback im glad to hear :>


greets
cheek


Top
 Profile  
 
 Post subject:
PostPosted: Mon Dec 10, 2007 11:19 pm 
Offline
iris2-developer
User avatar

Joined: Tue Apr 18, 2006 10:28 pm
Posts: 823
Location: Munich, Bavaria, Germany
hi and welcome =)

glad to see you working on the code.
Sorry, our gui system is rather messy at the moment.
about GetWidgetUnderMouse :

1: please try
widget.mbIgnoreMouseOver = false with your icon, it might be ignored by default otherwise.

2: can't tell without looking at the code (did you forgot to post a link or attachment ?)

3: i'm not quite sure what you mean here,
the xml code for the journal dialog is here : data/gfm/journal.gfm

all in all i don't really like the uo journal dialog,
so instead of implementing it directly, what do you think about making something rather different and more useful.
i was thinking about two (transparent) boxes at the bottom of the screen, one for chat messages, and one for system messages (you apply bandages, a bird, you did xyz)
that can be scrolled back independently.
I think that would make it much easier to avoid missing anything in chat when many system messages appear (combat, mining, grinding...)

btw, hagish and me and a few friends also recently started to play on vetus mundus, very cool shard =)
I play with the original client most of the time so far, but i'm eager to get iris to a more usable state.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Dec 11, 2007 10:50 am 
Offline

Joined: Wed Oct 24, 2007 1:50 pm
Posts: 5
k the mbIgnoreMouseOver = false works fine :>

i was thinking about grouping the messages as well.
either one window for each "channel" or just system and rest.

ive no idea how this works by now, but i will take a look at the code for the standard chatline.

but thats something for the weekend :>

i used the contribution upload page for my patch yesterday, but here is the updated version of the same one on rapidshare.

http://rapidshare.com/files/75796686/jo ... h.zip.html

what about the commented block on top of the file:

Code:
function RegisterJournalEntryType (name) _G["kEntryType_"..name] = name end

-- TODO : maybe  gEntryTypeHandler.Chat = function (type,arr) return {r,g,b},sprintf("",arr[1],arr[2]) end
RegisterJournalEntryType("Chat")
.....


is this working in someway? if so it would be quite usefull when preselecting the input and grouping by source/channel.

the last questions i have, is there any possibility to use more than one color inside the textwidget?
and what for what are the fields in SetColours, i played around with some of the params but only setting the first one changes the font color, param 2-4 doesnt change anything

greets
cheek


Top
 Profile  
 
 Post subject:
PostPosted: Tue Dec 11, 2007 1:16 pm 
Offline
iris2-developer
User avatar

Joined: Tue Apr 18, 2006 10:28 pm
Posts: 823
Location: Munich, Bavaria, Germany
the current chat-text that is fading out is in lugre/lua/lib.fadelines.lua

i think it would be better if at least the bottom-most lines would stay without fading out. (not important right now, just a note)

about the commented out stuff : that is a relic from the beginnings of the journal code, it wasn't finished.
Also things like pickup item etc don't really appear in the original uo journal. (might be nice though)

here are all places where JournalAddText is called :

Code:
data/lua/net.other.lua:401:   JournalAddText(text_charname,plaintext)
data/lua/net.other.lua:430:   JournalAddText(text_charname,plaintext)
data/lua/net.other.lua:475:   JournalAddText(unitext_name,unitext_message)
data/lua/obj/obj.player.lua:77:   JournalAddText("","Be the peace with you!")
data/lua/obj/obj.player.lua:83:   JournalAddText("","You go into War!")


the ones in net.other.lua are most interesting, those come directly from the network-packet handlers, and contain lots of info (text font, color...) that isn't fully used yet.

also the kPacket_Localized_Text one sends a textid which is looked up in the "cliloc" (localization, e.g. different languages) file, and substituted with parameters, this might be interesting to detect certain events, but isn't that important right now, i just wanted to mention it.

we currently ignore the font parameter completely, we don't use the uo fonts for text display.
"unitext_hue" in kPacket_Text_Unicode is probably the same as text_color in the other two packets (just inconsistent naming).

uo has a "hueing" system, a hue is basically a color-palette used to change the colors of a given image, but most hues have one primary color and the palette is just all shades of that color until black.
in this case you can retrieve the r,g,b value of the primary color using
local r,g,b = gHueLoader:GetColor(hueid - 1,31) -- get first color.
I'm not sure if the -1 is needed or not, just try and see =)

About more than one color in a textwidget : no, not implemented yet. It would also be nice to change font, text-size and boldness inside text, and maybe even include images, and support unicode as well, so i guess the most flexible way of doing that is using RTT to render the text once to a texture and then use the widget to just display it.
We haven't gotten round to implement that yet =)

EDIT : i just tried to enable attachments in this forum software, but i failed misearbly =\


Top
 Profile  
 
 Post subject:
PostPosted: Tue Dec 11, 2007 2:22 pm 
Offline
iris2-developer
User avatar

Joined: Mon Aug 09, 2004 12:20 pm
Posts: 1431
@cheek: hi and welcome. glad to see you in this forum and working on the code.

i like the tabbed interface from WoW/GW or hellgate very much. One Tab - One Source/channel.

regards


Top
 Profile  
 
 Post subject:
PostPosted: Tue Dec 11, 2007 2:32 pm 
Offline
iris2-developer
User avatar

Joined: Tue Apr 18, 2006 10:28 pm
Posts: 823
Location: Munich, Bavaria, Germany
the problem with tabs is that you don't see everything simultaneously.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Dec 11, 2007 3:00 pm 
Offline
iris2-developer
User avatar

Joined: Tue Apr 18, 2006 10:28 pm
Posts: 823
Location: Munich, Bavaria, Germany
i just tried the patch from rapidshare, but it seems to be broken : Image


Top
 Profile  
 
 Post subject:
PostPosted: Tue Dec 11, 2007 3:11 pm 
Offline
iris2-developer
User avatar

Joined: Mon Aug 09, 2004 12:20 pm
Posts: 1431
Yeah...but if you can configure or disable the tabs, it should be ok.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Dec 11, 2007 10:58 pm 
Offline

Joined: Wed Oct 24, 2007 1:50 pm
Posts: 5
ghoulsblade this one works, at least on my system.
im running iris on p4 3ghz and nvidia 5700, winxp.

Did you extract the hole archive into your data directory?

-------


http://rapidshare.com/files/75934209/iris_luna_modlow.png.html

In the paperdoll, between the name and the skill title need to be an linebreak.
Inside tooltip insured items should be bold but only the bold tags are shown <b>insured</b> blessed is ok, not bold and no tags. dunno if its just missing.

Above player between the name and skill title an linebreak would be nice as well.

--------------

The green frame in the right corner would be my prefered position for the journal.
Vertical the channel names, with some transparency.
Inside the rect the active channel text.
If its possible make the background transparent and instead use a filter something like this which makes the rect diffuse, or reduce coloring like in the picture. So you can still see whats going on behind as well having readable text inside.

Another nice to have feature would be like texttrigger which highlights the chan if it is noch the active one, like other chattools.
If the tabbedpane is working this should be no problem.


You mentioned that you would prefere all in one textchan, i think this is just an configuration point .
An advantage might be that you dont have to use hotkeys in which chan you want to write, you just type inside the active one, but can still write with the known abbreviations to the other channels.
Switching channels maybe combined with the mousewheel and a hotkey (ctrl+mouseup/down?)

Another nice feature might be, clicking on an name in the chat would open the privmsg window. Dont know if i can match mousepoint to chatline and then to word to look the word up in the playerlist or just try dummy messaging and the "no player found dialog" shows up.

------

Is there any example code inside the project where u used tabbedpanes?
If not any source where to start looking?
Do you use any kind of gui system till now, e.g. for creating custom dialogs.
In first just for non interactive menus but maybe in future replace the standard uo dialogs or at least pimp the resolution of the grafics *g*

The last one is dbl clicking on widgets not enabled?


greets
cheek


Top
 Profile  
 
 Post subject:
PostPosted: Wed Dec 12, 2007 1:45 am 
Offline
iris2-developer
User avatar

Joined: Tue Apr 18, 2006 10:28 pm
Posts: 823
Location: Munich, Bavaria, Germany
hi, just started coding on something so my code is a bit messed up, sience, could you maybe try the journal patch ?
maybe i can try again tomorrow or so..

about tooltip : no support for bold or font-color yet.
the most flexible way to do this would be to add some RTT stuff as mentioned above, but that's a bunch of work, so we'll postpone it for a while =)

about textchannel : i rather meant two seperate chatboxes instead of all in one box.

gui systems : we looked at a few gui systems, but didn't find anything flexible enough for our needs (uo-dialogs like paperdoll with bitmask hit-detection, right-click menus, parsable from old iris .gfm files, automatic layout features for things like mainmenu constructed at runtime, lua binding, supporting the uo hue's without rewriting the entire gui-system from scratch...), so we started writing our own guicode. Most of it is in lib.guimaker.lua.
It is rather lowlevel and has grown a bit messy over time.
Also the existing ogre 2d-overlay system upon which we built seems to be intended only for rather simple gui applications and has some rather bad limitations (zorder limited).
A few examples for custom gui stuff would be in lib.mainmenu.lua.

About the newline and other suggestions/feature-requests : please make tickets in our bugtracker for them, i'm having serious performance problems on my main laptop, so working on ingame stuff has become a real pain for me. I'm busy redesigning some fundamental render-code to make performance more acceptable first.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Dec 12, 2007 11:03 am 
Offline
iris2-developer
User avatar

Joined: Mon Aug 09, 2004 12:20 pm
Posts: 1431
To create Gumps without using the the lowlevel li.guimaker.lua Varan has developed the gui.gumpmanager.lua.

It's only used gui.quit.lua for now. So if you wanna create Gumps instead of the "normal" Iris gui (like mainmenu), you can take this.

But i don't really know if it's already finish, but the system is like RunUO (UO Server Emulator) creates Gumps. It's really easy to use.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Dec 12, 2007 11:17 am 
Offline
iris2-developer
User avatar

Joined: Tue Apr 18, 2006 10:28 pm
Posts: 823
Location: Munich, Bavaria, Germany
since varan probably isn't going to finish that "new" gui system, i'd advise against it. Also i have my doubts if it is really easier to use.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Dec 12, 2007 12:46 pm 
Offline
iris2-developer
User avatar

Joined: Mon Aug 09, 2004 12:20 pm
Posts: 1431
Mh yes, i have to took a look into it. But for real Gumps it's easier to use i think. If it's to unfinished, of couse we should remove it.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Dec 12, 2007 3:07 pm 
Offline
iris2-developer
User avatar

Joined: Mon Aug 09, 2004 12:20 pm
Posts: 1431
i exchanged your files. Journals seems to work, but scrolling not. I get the following error:

Code:
bugreport:pcall error in NotifyListener,LugreStep,
,..//data/lua/lib.journal.lua:251: attempt to perform arithmetic on global `gJournalScrollStartY' (a nil value)
stack traceback:
   ..//data/lua/lib.journal.lua:251: in function <..//data/lua/lib.journal.lua:244>
   (tail call): ?
   (tail call): ?
   [C]: in function `xpcall'
   ..//lugre/lua/lib.util.lua:82: in function `lugrepcall'
   ..//lugre/lua/lib.listener.lua:41: in function `NotifyListener'
   ..//lugre/lua/lugre.lua:88: in function `LugreStep'
   ..//data/lua/main.lua:328: in function `MainStep'
   ..//data/lua/main.lua:292: in function `Main',5


gJournalScrollStartY is not initialized anywhere.

I also don't see the minimized Journal Icon. Please think of people using 640x480 or 800x600pixel and window mode.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Dec 12, 2007 3:52 pm 
Offline

Joined: Wed Oct 24, 2007 1:50 pm
Posts: 5
i got same problem, sry, messed something up when merging 2 versions.

http://rapidshare.com/files/76078165/lib.journal.lua.html

i uploaded the updated version, scrolling doesn work for now, just moving the slider. one problem i got was every time i lost the widget i also lost focus and sliding doesn work anymore, is there someway to block the mouse on the center of the widget until mouseUp? o looked into the input code and if im right the only implemented mouseevent is the mousedown. if you move the mouse slowly it works.

textscrolling i wanted to test on weekend, i just have to think about managing the rows, cause text which needs wrapping needs more lines.
I think the best way would be to lock the scroller with the bottom line, an is disabled if rowcount < maxVisibleLines

greets
cheek


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 19 posts ]  Go to page 1, 2  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group