bckobayashimaru.de

Bridge Commander Kobayashi Maru Project
It is currently Tue Jun 25, 2019 4:41 am

All times are UTC




Post new topic Reply to topic  [ 7 posts ] 
Author Message
PostPosted: Fri Jan 03, 2014 11:24 pm 
Offline
Cadet 2nd Year
Cadet 2nd Year

Joined: Fri Jan 03, 2014 10:33 pm
Posts: 30
Location: Eisenach, Germany
Hello friends,
since it has become quiet around " Bridge Commander " and rarely new mods coming out, I started to create my own mods.

This is fully intended , as I can Scripting in peace for several weeks now , without having to take on many new publications consideration . ;-)

My goal is to integrate all previous mods in a shared library . Because " Kobayshi Maru " is from the perspective of a skilled programmer pure chaos . Every modder has its own folder hierarchy , private libraries and their own methods of dealing with the GUI . This was not changed by KM2011 .

The first step towards unification of all technologies is a unified graphical interface . A clean structuring of menus with logical , content -accentuating arrangement of menus, buttons and displays.

For the reason I started doing all the buttons that change the properties of the phasers, torpedoes or tractor beams to remove from the top menu . This should then be installed in the weapons control display .

Which object methods can extend the GUI of the control display , I found out last night . The result of my sleepless night I have included as an attachment. This is an Autostart-Script for Foundation.

I have the weapons display and the control interface swapped in position. Then I doubled the height of the interface, to make room for more items. The problem now is how to create elements there, so that they are rendered in the Quick Battle game.

So far, the area remains empty or is at restart of the menu reset to default values​​.

So the question is:

How to extend this menu to usable items?

There are half a dozens of ready GUI libraries for creating buttons in the menu. Apparently there's nothing like that for changing the TacticalMenuHandler.


Attachments:
TacticalMenuFix.py [18.21 KiB]
Downloaded 303 times
Top
 Profile  
Reply with quote  
PostPosted: Sat Jan 04, 2014 8:33 am 
Offline
Chief Engineer
Chief Engineer
User avatar

Joined: Fri May 06, 2005 10:41 am
Posts: 2449
Location: Hamburg, Germany
Mark McWire wrote:
Because " Kobayshi Maru " is from the perspective of a skilled programmer pure chaos . Every modder has its own folder hierarchy , private libraries and their own methods of dealing with the GUI .

Why not? Every programmer uses the library he likes most. Its like having QT4, GTK and TK to choose from...
Nah, the thing is that everyone was happy enough when their code worked. There was not enough free time and patience left to make a good library out of it.
-
You are talking about that window where one can change torp type, phaser intensity, enable/disable clock and tractor, right?

Basically you just call AddChild() on App.TacWeaponsCtrl_GetTacWeaponsCtrl(), what is the problem you were hitting?

_________________
Shuttle Launching Framework carrier file creator

--
Whenever you find that you are on the side of the majority, it is time to reform.
-- Mark Twain


Top
 Profile  
Reply with quote  
PostPosted: Sat Jan 04, 2014 1:44 pm 
Offline
Cadet 2nd Year
Cadet 2nd Year

Joined: Fri Jan 03, 2014 10:33 pm
Posts: 30
Location: Eisenach, Germany
Defiant wrote:
Why not? Every programmer uses the library he likes most. Its like having QT4, GTK and TK to choose from...


An example:
I wanted to move the button for ejecting the warp core from the XO-menu to the engineering menu because my XO menu seems too overloaded. I have searched every single script in QBautostart and Autoload. Only to then determine that sneaker has deposited its menu buttons somewhere deep in his sub-directory in a script. In addition, he still uses its own GUI library and not fall back on the Engineer-library from QBautostart.

Those are the things that bother me personally.

Defiant wrote:
You are talking about that window where one can change torp type, phaser intensity, enable/disable clock and tractor, right?

Basically you just call AddChild() on App.TacWeaponsCtrl_GetTacWeaponsCtrl(), what is the problem you were hitting?


First: Right

Second:

The problem is that my buttons are not displayed. In addition, the phaser slidebar from Autoload/ReSet is replaced by the default button as soon as you ingame change the spaceship. (use transporter or shuttle launch framework)


Top
 Profile  
Reply with quote  
PostPosted: Sat Jan 04, 2014 5:45 pm 
Offline
Chief Engineer
Chief Engineer
User avatar

Joined: Fri May 06, 2005 10:41 am
Posts: 2449
Location: Hamburg, Germany
Mark McWire wrote:
Only to then determine that sneaker has deposited its menu buttons somewhere deep in his sub-directory in a script. In addition, he still uses its own GUI library and not fall back on the Engineer-library from QBautostart.

Thats because Sneakers mods predates my QBautostart. And since Sneaker is long gone nobody will touch this.

Mark McWire wrote:
The problem is that my buttons are not displayed. In addition, the phaser slidebar from Autoload/ReSet is replaced by the default button as soon as you ingame change the spaceship. (use transporter or shuttle launch framework)

Which button do you want to display in this window?
Also I can not reproduce the problem with the slider gone on transport.

_________________
Shuttle Launching Framework carrier file creator

--
Whenever you find that you are on the side of the majority, it is time to reform.
-- Mark Twain


Top
 Profile  
Reply with quote  
PostPosted: Sat Jan 04, 2014 6:04 pm 
Offline
Cadet 2nd Year
Cadet 2nd Year

Joined: Fri Jan 03, 2014 10:33 pm
Posts: 30
Location: Eisenach, Germany
Many Mods older than the QBautostart. But newer mods like Blind Fire, Second target or Thrusters work with their own menus.
Anecdote: I tried to modify your order script so that it is housed in the Hail menu. The nav menu is in fact quite overloaded with buttons. If I want to straighten out the strange indentation in the script "FleetUtils", I get an exception. If I import instead of "Lib.LibEngineering" the "Libs.LibEngineering" (with s), it works. There are no folder "Scripts / Libs". I do not understand this behavior.

@ problem
Hmm...

The following buttons I want to move:

Tractor modes
Phaser Settings (0/1) - the mod should come from you
Pulse Settings (0/1) - this also


Top
 Profile  
Reply with quote  
PostPosted: Sat Jan 04, 2014 6:48 pm 
Offline
Chief Engineer
Chief Engineer
User avatar

Joined: Fri May 06, 2005 10:41 am
Posts: 2449
Location: Hamburg, Germany
Thats because with Libs.LibEngineering you actually import scripts/Custom/QBautostart/Libs/LibEngineering.py.

The following four lines gave me a button in the window:
Code:
pEvent = App.TGIntEvent_Create()
pButtonHello = App.STButton_CreateW(App.TGString("Hello"), pEvent)
pTacWindow = App.TacWeaponsCtrl_GetTacWeaponsCtrl()
pTacWindow.AddChild(pButtonHello)

However it disappears after a few seconds, might be a redraw event.
You might want to check with reset.py

_________________
Shuttle Launching Framework carrier file creator

--
Whenever you find that you are on the side of the majority, it is time to reform.
-- Mark Twain


Top
 Profile  
Reply with quote  
PostPosted: Sat Jan 04, 2014 7:04 pm 
Offline
Cadet 2nd Year
Cadet 2nd Year

Joined: Fri Jan 03, 2014 10:33 pm
Posts: 30
Location: Eisenach, Germany
Thanks. I am working on.

Edit: The problem with phaser slidbar exist only in STBC without KM. I've used STBC with SDK, Foundation, FoundationTech and QBautostart without any new ships or systems for testing my mods.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 

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:  
cron
Powered by phpBB® Forum Software © phpBB Group