Author Topic: [MODIFICATION] AGS v.3.3.2.0 Draconian Themed Code Editor  (Read 11330 times)

Re: [MODIFICATION] AGS v.3.3.2.0 Draconian Themed Code Editor
« Reply #20 on: 05 Feb 2015, 03:18 »
This really bugs me, whether is it alright to have these schemes hardcoded? And not just color numbers, there are even subclassed controls for particular theme (like DraconianComboBox).
My thinking / reasoning was that the editor should provide two default themes, a light and a dark one. However in retrospect the default light theme is probably enough, especially since it's built into the Windows Forms.

Even more, some of the GUI classes now have a behavior selection in them, depending on chosen theme. For example, here's an excrept from "SpriteSelector" class:
No this is not OK. It shouldn't be like this if it can be avoided. I have to admit this is the result of getting increasingly frustrated of not making some aspects of the implementation work as I wanted it to. I don't remember specifics but the conclusion is that it should be redone so that there are no if-sentences in the implementation. Also the entire function "LoadColorTheme()" that I call in various GUI code-behinds should probably be split up and moved in the GUI Designer code file instead. Makes more sense from an implementation perspective.

I understand this is just an experiment to bring the theme switching to AGS, but there's really no pressure for getting the feature ASAP; perhaps this all could be worked out more before merging into the main branch?

I do not do Editor design, but I would ask to consider those two ideas:
1) Reading theme from file (XML?); alternatively support plugin interface for custom theme class.
2) Hiding theme specific behavior under generalized interfaces.

Is this possible?
All of this sounds feasible I think, although it's a lot bigger task than I originally intended, so it will probably be a while before I find the time to take a look at it.

monkey0506

  • AGS Project Tracker Admins
  • Tasting the banhammer. Strangely, tastes like ham.
Re: [MODIFICATION] AGS v.3.3.2.0 Draconian Themed Code Editor
« Reply #21 on: 05 Feb 2015, 03:31 »
although it's a lot bigger task than I originally intended

Creating the multi-platform interface for the editor turned out to be a lot more work than I had originally anticipated too, but CW steered me in the right direction by not letting me take messy shortcuts (even if I promised to clean them up later). What he's said isn't a simple, quick fix, but it's worth doing the right way. ;) And don't worry if it takes time, that's why we're not paying you! :P
User was banned for this post.

jwalts37

    • I can help with making music
    •  
    • I can help with scripting
    •  
Re: [MODIFICATION] AGS v.3.3.2.0 Draconian Themed Code Editor
« Reply #22 on: 07 Apr 2015, 20:16 »
I actually did the same thing recently, except I had added an option to change themes from the preferences menu. The thing that bugged me was that whenever you switched it, the script had to be reopened in order for changes to take effect. I finally figured out how to "refresh" it real time. Its been so long since I was in there but if you'd like to get together and work on this feature or something ChamberOfFear, let me know. I was always too afraid to post my changes here for fear of all the exceptional programmers being like "THIS IS GOD AWFUL SHIT" even though I know they wouldnt. Let me know!
-Josh

jwalts37

    • I can help with making music
    •  
    • I can help with scripting
    •  
Re: [MODIFICATION] AGS v.3.3.2.0 Draconian Themed Code Editor
« Reply #23 on: 07 Apr 2015, 20:34 »
Also, the 3.3.3 version doesnt seem to be working.

Re: [MODIFICATION] AGS v.3.3.2.0 Draconian Themed Code Editor
« Reply #24 on: 07 Apr 2015, 22:45 »
I actually did the same thing recently, except I had added an option to change themes from the preferences menu.
Note sure what you mean, this option exists, at least in the later versions. Don't remember if had this option in the older ones.

Also, the 3.3.3 version doesnt seem to be working.
Please check that you changed the theme in preferences. I fairly certain the v3.3.3 should be working as that is the one I'm using myself.

Re: [MODIFICATION] AGS v.3.3.2.0 Draconian Themed Code Editor
« Reply #25 on: 13 Apr 2015, 19:43 »
1) Reading theme from file (XML?); alternatively support plugin interface for custom theme class.

How should I go about handling this? I imagine that having a default location on disk dedicated for said xml files would be convenient. Say there is a folder "Color Themes" in the AGS installation directory which contains xml files, each file is a theme that can be loaded into Preferences, and then be chosen by the user. Where on the disk would it be conventional to put these files?

Also, if I'm going to solve this with xml it would be convenient to have access to LINQ or lambda expressions which is currently not supported since the editor uses .NET 2.0. (Actually that would be convenient just in general.) I noticed there was a discussion some time ago about upgrading to .NET 3.5 but the discussion didn't seem to reach a conclusion http://www.adventuregamestudio.co.uk/forums/index.php?topic=50995.0
Could we do the upgrade?

I finally figured out how to "refresh" it real time.
This sounds interesting, do you have the code online somewhere for reading?

Crimson Wizard

  • Local Moderator
  • AGS Project Tracker Admins
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    •  
    • Lifetime Achievement Award Winner
    •  
    • Crimson Wizard worked on a game that was nominated for an AGS Award!
      Crimson Wizard worked on a game that won an AGS Award!
Re: [MODIFICATION] AGS v.3.3.2.0 Draconian Themed Code Editor
« Reply #26 on: 16 Apr 2015, 09:54 »
1) Reading theme from file (XML?); alternatively support plugin interface for custom theme class.

How should I go about handling this? I imagine that having a default location on disk dedicated for said xml files would be convenient. Say there is a folder "Color Themes" in the AGS installation directory which contains xml files, each file is a theme that can be loaded into Preferences, and then be chosen by the user. Where on the disk would it be conventional to put these files?
Just "Themes" maybe (?); it sounds shorter and more generic :).
Regarding the location... we may consider that in future there will be an integrated theme designer (or plugin); or anyway the user should be able to modify them or upload new ones. I think therefore it won't be convenient to place them in the installation folder, because a) user may have several versions installed, b) latest Windows does not like files modified in Program Files. Perhaps find a new location in %AppData%? We could move game and room templates there too later.
Are there any files that AGS saves to AppData already?


Also, if I'm going to solve this with xml it would be convenient to have access to LINQ or lambda expressions which is currently not supported since the editor uses .NET 2.0. (Actually that would be convenient just in general.) I noticed there was a discussion some time ago about upgrading to .NET 3.5 but the discussion didn't seem to reach a conclusion http://www.adventuregamestudio.co.uk/forums/index.php?topic=50995.0
Could we do the upgrade?

I recall trying that out by simply changing NET version in a project:
Well, changed all projects including native lib to 3.5, it compiles and runs, did not notice anything bad.
I'd say we could changing it and make test runs. I think it should be tested on WinXP to see if it still works. Additionally, we could do tests on Wine and whichever thing Mac users use to run Windows apps (Wineskin?); I heard number of users run AGS on Linux & Mac.
« Last Edit: 16 Apr 2015, 10:01 by Crimson Wizard »

Re: [MODIFICATION] AGS v.3.3.2.0 Draconian Themed Code Editor
« Reply #27 on: 16 Apr 2015, 16:48 »
Perhaps find a new location in %AppData%?
That works, thank you.

Are there any files that AGS saves to AppData already?
On my computer I found a file named Layout.xml. I think it contains savedata on the docking layout of the editor.

I'd say we could changing it and make test runs. I think it should be tested on WinXP to see if it still works. Additionally, we could do tests on Wine and whichever thing Mac users use to run Windows apps (Wineskin?); I heard number of users run AGS on Linux & Mac.
I don't really have access to WinXP or Mac, and is somewhat inexperienced in Linux, so I may not be that helpful in testing if it works. However it would be great if this upgrade got realized as .NET 3.5 has more convenient tools than .NET 2.0.

Monsieur OUXX

  • Cavefish
  • Mittens Vassal
  • Mittens Half Initiate
    • I can help with proof reading
    •  
    • I can help with translating
    •  
    • I can help with voice acting
    •  
Re: [MODIFICATION] AGS v.3.3.2.0 Draconian Themed Code Editor
« Reply #28 on: 20 Apr 2015, 09:32 »
Careful if you start using %AppData%. That's for custom settings, that are saved after the game's first execution (typically: the position of docking windows, in layout.xml). Big fancy apps like Photoshop will copy their default brushes there (at installation time), to demonstrate that they are all still custom in essence, but that's only for showing off.

The default themes, however, would probably be shipped along with AGS. Hence their location should be the Editor's folder (inside /Themes subfolder).

Maybe what I wrote above is utter bullshit ^ Please ignore it if it turns out I made a complete fool out of myself.

« Last Edit: 20 Apr 2015, 09:36 by Monsieur OUXX »
 

Re: [MODIFICATION] AGS v.3.3.2.0 Draconian Themed Code Editor
« Reply #29 on: 20 Apr 2015, 16:51 »
Well the one and only default theme, which I so far have just referred to as the Vanilla theme, comes from the code itself(Windows Forms), not xml-files. The custom themes works independently from that, so I don't think it should be a problem. In fact, the way you describe it makes %AppData% the perfect location to store these files if the implementation turns out as I have intended it.

jwalts37

    • I can help with making music
    •  
    • I can help with scripting
    •  
Re: [MODIFICATION] AGS v.3.3.2.0 Draconian Themed Code Editor
« Reply #30 on: 19 Jun 2015, 03:32 »
Haha I guess now Im confused. I had added an option in preferences to change the theme.

At the time I couldn't figure out how to refresh real-time so the current script had to be reopened. But I actually ended up figuring out how to redraw/fresh it. I dont remember this option being in any of the major releases. Is that what you meant?

Dave Gilbert

  • Mittens Vassal
  • AGS Baker
  • Hi. Our names are FRIGGING ADORABLE.
    • Lifetime Achievement Award Winner
    •  
    • Dave Gilbert worked on a game that was nominated for an AGS Award!
      Dave Gilbert worked on a game that won an AGS Award!
Re: [MODIFICATION] AGS v.3.3.2.0 Draconian Themed Code Editor
« Reply #31 on: 23 Mar 2017, 16:57 »
Sorry to necropost! Lately I've been getting annoyed by the light-blue text on the white background (in the dialog editor specifically) and was hoping there was a way to change the colors. Has there been any further attempts to merge this with the latest version of AGS?

Crimson Wizard

  • Local Moderator
  • AGS Project Tracker Admins
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    •  
    • Lifetime Achievement Award Winner
    •  
    • Crimson Wizard worked on a game that was nominated for an AGS Award!
      Crimson Wizard worked on a game that won an AGS Award!
Re: [MODIFICATION] AGS v.3.3.2.0 Draconian Themed Code Editor
« Reply #32 on: 23 Mar 2017, 20:07 »
Two years ago I was suggesting to improve the code, but since the development of Editor has since stopped, I guess there is not much sense to aim code beauty. So, yes, let's put this in.

Dave Gilbert

  • Mittens Vassal
  • AGS Baker
  • Hi. Our names are FRIGGING ADORABLE.
    • Lifetime Achievement Award Winner
    •  
    • Dave Gilbert worked on a game that was nominated for an AGS Award!
      Dave Gilbert worked on a game that won an AGS Award!
Re: [MODIFICATION] AGS v.3.3.2.0 Draconian Themed Code Editor
« Reply #33 on: 23 Mar 2017, 20:10 »
Sweet!

AnasAbdin

  • Peace, Love and AGS
Re: [MODIFICATION] AGS v.3.3.2.0 Draconian Themed Code Editor
« Reply #34 on: 19 Jul 2017, 21:25 »
Sorry to bump this, I'm using "v3.3.3, December 2014"..
is there a way I can get the dark theme with/without a patch that I don't know about? :-[
MY RETINAS GOT BLEACHED FROM THE WHITE BACKGROUND

Crimson Wizard

  • Local Moderator
  • AGS Project Tracker Admins
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    •  
    • Lifetime Achievement Award Winner
    •  
    • Crimson Wizard worked on a game that was nominated for an AGS Award!
      Crimson Wizard worked on a game that won an AGS Award!
Re: [MODIFICATION] AGS v.3.3.2.0 Draconian Themed Code Editor
« Reply #35 on: 08 Jan 2018, 22:21 »
IDK if we should continue in the same topic, but there is a new pull request by persn (aka ChamberOfFear) with the new version of this feature: https://github.com/adventuregamestudio/ags/pull/427

Crimson Wizard

  • Local Moderator
  • AGS Project Tracker Admins
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    •  
    • Lifetime Achievement Award Winner
    •  
    • Crimson Wizard worked on a game that was nominated for an AGS Award!
      Crimson Wizard worked on a game that won an AGS Award!
Re: [MODIFICATION] AGS v.3.3.2.0 Draconian Themed Code Editor
« Reply #36 on: 10 Jan 2018, 16:14 »
Compiled editor for those who'd like to test: https://www.dropbox.com/s/4peq0unk29grqrs/ags-editor-themes.zip?dl=0

WARNING: This is built over master branch, which is WIP code. I do not remember if AGS game format was changed there compared to 3.4.1. Maybe not, but make backups if you are opening your real game projects.

How to test: go to %USERPROFILE%/AppData/Local/AGS and manually create "Themes" folder there (there is a small bug in the editor, so you need to do that by hand).
Then, download this: https://github.com/adventuregamestudio/ags/files/1613027/VisualStudioDark.zip
Unpack and place the VisualStudioDark.json into the folder.

Start the Editor, open Preferences and change Color Themes option in "Editor Appearance" group.

Re: [MODIFICATION] AGS v.3.3.2.0 Draconian Themed Code Editor
« Reply #37 on: 15 Jan 2018, 12:14 »
Compiled editor for those who'd like to test: https://www.dropbox.com/s/4peq0unk29grqrs/ags-editor-themes.zip?dl=0

You should include "Newtonsoft.Json.dll" in the archive, or else no one but us, who hold the knowledge of gods, will be able to try it out.  :=

- Alan

Crimson Wizard

  • Local Moderator
  • AGS Project Tracker Admins
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    •  
    • Lifetime Achievement Award Winner
    •  
    • Crimson Wizard worked on a game that was nominated for an AGS Award!
      Crimson Wizard worked on a game that won an AGS Award!
Re: [MODIFICATION] AGS v.3.3.2.0 Draconian Themed Code Editor
« Reply #38 on: 15 Jan 2018, 13:06 »
Added.

Crimson Wizard

  • Local Moderator
  • AGS Project Tracker Admins
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    •  
    • Lifetime Achievement Award Winner
    •  
    • Crimson Wizard worked on a game that was nominated for an AGS Award!
      Crimson Wizard worked on a game that won an AGS Award!
Re: AGS v.3.4.1 Dark Themed Code Editor
« Reply #39 on: 22 Jan 2018, 15:48 »
Updated version from the latest source (with some fixes): https://www.dropbox.com/s/4peq0unk29grqrs/ags-editor-themes.zip?dl=0

Reminder: DO NOT SAVE YOUR ACTUAL GAME PROJECT in that editor (yet), because it is based on untested post-3.4.1 version.

How to:
Download this: https://github.com/adventuregamestudio/ags/files/1613027/VisualStudioDark.zip and unpack somewhere.
Open the Editor, go to File -> Preferences: Editor Appearance - Import Color Theme. Choose the theme file you unpacked. Make sure it is selected in the combo box. Press OK.
Now restart the Editor.

Pull request on github: https://github.com/adventuregamestudio/ags/pull/427
« Last Edit: 22 Jan 2018, 15:50 by Crimson Wizard »