Jump to content
The Dark Mod Forums

Itches, Glitches & Anything Else...


Recommended Posts

You would have to add the icon to each ToolItem individually - look at the "Draw AABB" toggle in radiant/ui/modelselector/ModelSelector.cpp which uses this method (however I have never used UIManager in anger so I cannot be totally sure the same technique will work).

Link to comment
Share on other sites

Ok, I just wanted to try it out, but it seems the new brushexport plugin is not compiling:

 

gplusplus -Wl,--kill-at -shared -o build\debug\brushexport.dll build\debug\contrib\brushexport\plugin.os -Lbuild\debug\libs -Llibs -llibxml2 -lz -liconv -lglew32 -lglu32 -lopengl32 -lgdi32 -lglib-2.0 -lgobject-2.0 -lgtk-win32-2.0 -lgdk-win32-2.0 -latk-1.0 -lpango-1.0 -lpangowin32-1.0 -lgdk_pixbuf-2.0 -Wl,--output-def,build\debug\brushexport.def
c:\programme\mingw\bin\..\lib\gcc\mingw32\3.4.2\..\..\..\..\mingw32\bin\ld.exe: cannot find -llibxml2
collect2: ld returned 1 exit status
scons: *** [build\debug\brushexport.dll] Error 1
scons: building terminated because of errors.

 

I tried to use "brushexport_env.useXML2()", but that didn't help. Is this just me?

Link to comment
Share on other sites

brushexport_lib = brushexport_env.SharedLibrary(target='brushexport', source=brushexport_lst, LIBPATH='libs')

 

Try removing the LIBPATH='libs' argument, it will be overriding any LIBPATH values that are added previously.

 

Merging this plugin was a temporary fix for the inability to export to OBJ, eventually I would like this to be part of the main program as with DoomEdit.

Link to comment
Share on other sites

Man, is there a way to make DarkRadiant linking any faster? It takes ages to link up the exe, I would be a lot faster if changing a single line would not entail three to four minutes of waiting.

Link to comment
Share on other sites

My goodness, I will try this, I tell you. I have a shiny ubuntu 6.06 i386 ISO lying on my table for exactly this very moment, now I just need to find another hard drive to throw it on (this one is too small for a dual-boot, I'm afraid.)

Link to comment
Share on other sites

I'm not afraid :). There was just no real excuse for me to switch over (till now). I know that Linux is powerful and I planned to try it out (more than just inserting a Live-CD) several times, but I always postponed this as I will certainly need some time to get everything set up the way I want it to be - I've always been too lazy/busy, but I'm still planning to switch over completely some day.

Link to comment
Share on other sites

:D I'm somehow feeling where this thread is leading to... I think I will be able to choose my distro myself. :)

 

Concerning the toolbar icons: it looks like there is light at the end of the tunnel; it seemed that I forgot to call a gtk_widget_show on the added icon, which is strange, because in ModelPreview.cpp there is not a single call to gtk_widget_show() whatsoever and it's obviously working without problems.

Link to comment
Share on other sites

Hey all,

 

Wondering if you guys can fix that texture smudging crash problem? With no autosave, its really bugging me when it goes into that texture smear, and crashes. There's no way to predict when it does it. Its annoying when you spend time fixing up soemthing on the map, only to lose it. Everytime it smears, it crashes.

 

[EDIT] Oh, I just found autosave does work. It just saves it in snapshot rather than as autosave.map... :) goodie, I got my work back :D

 

Venus

I have an eclectic YouTube channel making videos on a variety of games. Come and have look here:

https://www.youtube.com/c/NeonsStyleHD

 

Dark Mod Missions: Briarwood Manor - available here or in game

http://forums.thedarkmod.com/topic/18980-fan-mission-briarwood-manor-by-neonsstyle-first-mission-6082017-update-16/

 

 

Link to comment
Share on other sites

Hm, the autosave is working for me, I just checked. Can you provide a sample map with exact steps to reproduce the problem? Does this also occur on newly created maps?

 

edit: Just saw your edit. What the heck is snapshot? My file is named bonehoard.autosave.map, in the map folder.

Link to comment
Share on other sites

Hm, the autosave is working for me, I just checked. Can you provide a sample map with exact steps to reproduce the problem? Does this also occur on newly created maps?

 

edit: Just saw your edit. What the heck is snapshot? My file is named bonehoard.autosave.map, in the map folder.

 

well as I said earlier about autosave; when I first created my map, it saved an mapname.autosave.map, but after that it was never updated again. Then I changed my mapname, and an autosave has never been created for it. However, in the maps\snapshot folder, I have many snapshots entitled 'rivertown.1.00.map - 2.11.map).

 

As for the texture problem. When you use the surface editor or the ctrl-arrow nudge, and the texture smears like it does sometimes, it will crash immediately every time.

 

As for providing a map, sure just tell me exactly what you want. I don't know how to reproduce the autosave problem... it just doesn't do it... as for texture, just hit ctrl-arrow till the texture smears. It should crash.

 

Venus

I have an eclectic YouTube channel making videos on a variety of games. Come and have look here:

https://www.youtube.com/c/NeonsStyleHD

 

Dark Mod Missions: Briarwood Manor - available here or in game

http://forums.thedarkmod.com/topic/18980-fan-mission-briarwood-manor-by-neonsstyle-first-mission-6082017-update-16/

 

 

Link to comment
Share on other sites

Concerning the toolbar icons: it looks like there is light at the end of the tunnel; it seemed that I forgot to call a gtk_widget_show on the added icon, which is strange, because in ModelPreview.cpp there is not a single call to gtk_widget_show() whatsoever and it's obviously working without problems.

 

If you call gtk_widget_show_all() on a top-level widget it will automatically show any subwidgets. This is how I make dialog components visible, hence the lack of individual gtk_widget_show() calls - you may be able to do a show_all() on the toolbar itself which should make all of the icons visible provided they are parented first.

Link to comment
Share on other sites

If you call gtk_widget_show_all() on a top-level widget it will automatically show any subwidgets. This is how I make dialog components visible, hence the lack of individual gtk_widget_show() calls - you may be able to do a show_all() on the toolbar itself which should make all of the icons visible provided they are parented first.

Thanks, I found that one immediately after posting, as I thought there has to be a way around showing every single widget you create. At the moment I'm not progressing much, as my breaks are so short that I can compile just once or twice while eating till I have to leave home again.

Link to comment
Share on other sites

Ok, I was so close... all the code for loading the toolbar with GtkUIManager, assigning the actions and the right icons was done - and then I realised that GtkUIManager doesn't support ToggleButtons.

 

At least I could not find anything on this topic anywhere on the net. Yuck.

 

If it wasn't for the ToggleButtons, the solution using GtkUIManager would've been really smooth and elegant (just load the actions and connect them to the existing functions, then assign the icons), but there is no clean way to integrate the ToggleButton callbacks, except for a dirty workaround that would make the use of GtkUIManager pointless in the first place. (No wonder there is so little documentation on the use of GtkUIManager - it seems no one is using it).

 

So I'm afraid I will fall back to my first plan to write an own XML parser for the toolbars that can handle both ToolButtons and ToggleToolButtons.

Link to comment
Share on other sites

Wow, that sucks. It seemed like UIManager was perfect for the job based on its description, although looking at the PyGTK tutorial which refers to ItemFactory (the predecessor of UIManager) there is a warning note "ItemFactory does not support images in menus", so maybe it is indeed not as functional as it first appears.

Link to comment
Share on other sites

Yes, this GtkUIManager implementation seems rather incomplete in regard to what GTK+ is usually capable of. And there is nearly no documentation or example code on the net (except for the specs on gnome.org and the Python thing), which transforms coding into a series of trial & error.

 

I'm writing my own XML parser now, it's easier anyway. :-) I hope that I can finish this till the weekend.

Link to comment
Share on other sites

Okay, it is straight-forward right to the point where these callbacks are involved. The one who constructed this maze of callbacks and callers must've been either a genius or on drugs (or both).

 

I found that the radiant code for toggleButtons uses deprecated GTK-functions, and I somehow did not manage to re-use them (GTK tells me that it is not possible to mix deprecated and non-deprecated functions).

 

So I've been wading through all those typedefs and templates and classes that all seem to call themselves for over an hour now and it's still not quite clear to me. My goodness, two weeks of C++ and now this...

 

For the moment I'm stuck at this point: the toolbar is displayed and all the buttons are functioning, but the toggle buttons don't work as expected (it is possible to toggle mulitple buttons at a time, but it shouldn't).

Link to comment
Share on other sites

The problem is that you are rewriting something which is already entwined with legacy Radiant code, rather than adding an entirely new feature which does not require any interaction with the Radiant Template Crap .

 

You can always take an SVN diff of your changes, archive it and then work on something more localised if the rewrite seems to be getting too complex.

Link to comment
Share on other sites

Heh, I finally found a way to integrate my new toggle buttons with the existing callbacks, so the toolbar is fully working now.

 

Next steps are testing, documenting the changes and stripping the unused code. This won't take too long, so hopefully I can commit something this evening or tomorrow.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recent Status Updates

    • Petike the Taffer

      I've finally managed to log in to The Dark Mod Wiki. I'm back in the saddle and before the holidays start in full, I'll be adding a few new FM articles and doing other updates. Written in Stone is already done.
      · 0 replies
    • nbohr1more

      TDM 15th Anniversary Contest is now active! Please declare your participation: https://forums.thedarkmod.com/index.php?/topic/22413-the-dark-mod-15th-anniversary-contest-entry-thread/
       
      · 0 replies
    • JackFarmer

      @TheUnbeholden
      You cannot receive PMs. Could you please be so kind and check your mailbox if it is full (or maybe you switched off the function)?
      · 1 reply
    • OrbWeaver

      I like the new frob highlight but it would nice if it was less "flickery" while moving over objects (especially barred metal doors).
      · 4 replies
    • nbohr1more

      Please vote in the 15th Anniversary Contest Theme Poll
       
      · 0 replies
×
×
  • Create New...