Skip to content

Commit

Permalink
tidying
Browse files Browse the repository at this point in the history
  • Loading branch information
efroemling committed Dec 29, 2024
1 parent 68be5d3 commit dec66af
Show file tree
Hide file tree
Showing 9 changed files with 45 additions and 40 deletions.
48 changes: 24 additions & 24 deletions .efrocachemap

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
### 1.7.37 (build 22147, api 9, 2024-12-28)
### 1.7.37 (build 22148, api 9, 2024-12-28)
- Bumping api version to 9. As you'll see below, there's some UI changes that
will require a bit of work for any UI mods to adapt to. If your mods don't
touch UI stuff at all you can simply bump your api version and call it a day.
Expand Down
1 change: 1 addition & 0 deletions src/assets/ba_data/python/baclassic/_appmode.py
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,7 @@ def _root_ui_menu_press(self) -> None:
ui.clear_main_window()
return

# Otherwise
push_back_press()

def _root_ui_account_press(self) -> None:
Expand Down
2 changes: 1 addition & 1 deletion src/assets/ba_data/python/baenv.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@

# Build number and version of the ballistica binary we expect to be
# using.
TARGET_BALLISTICA_BUILD = 22147
TARGET_BALLISTICA_BUILD = 22148
TARGET_BALLISTICA_VERSION = '1.7.37'


Expand Down
4 changes: 3 additions & 1 deletion src/assets/ba_data/python/bascenev1lib/activity/coopscore.py
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,9 @@ def show_ui(self) -> None:
return

rootc = self._root_ui = bui.containerwidget(
size=(0, 0), transition='in_right'
size=(0, 0),
transition='in_right',
toolbar_visibility='no_menu_minimal',
)

h_offs = 7.0
Expand Down
2 changes: 1 addition & 1 deletion src/ballistica/shared/ballistica.cc
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ auto main(int argc, char** argv) -> int {
namespace ballistica {

// These are set automatically via script; don't modify them here.
const int kEngineBuildNumber = 22147;
const int kEngineBuildNumber = 22148;
const char* kEngineVersion = "1.7.37";
const int kEngineApiVersion = 9;

Expand Down
3 changes: 3 additions & 0 deletions src/ballistica/ui_v1/python/methods/python_methods_ui_v1.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1370,6 +1370,8 @@ static auto PyContainerWidget(PyObject* self, PyObject* args, PyObject* keywds)
val = Widget::ToolbarVisibility::kInherit;
} else if (sval == "get_tokens") {
val = Widget::ToolbarVisibility::kGetTokens;
} else if (sval == "no_menu_minimal") {
val = Widget::ToolbarVisibility::kNoMenuMinimal;
} else {
throw Exception("Invalid toolbar_visibility: '" + sval + "'.",
PyExcType::kValue);
Expand Down Expand Up @@ -1432,6 +1434,7 @@ static PyMethodDef PyContainerWidgetDef = {
" 'menu_in_game',\n"
" 'menu_tokens',\n"
" 'get_tokens',\n"
" 'no_menu_minimal',\n"
" 'inherit',\n"
" ] | None = None,\n"
" on_select_call: Callable[[], None] | None = None,\n"
Expand Down
6 changes: 2 additions & 4 deletions src/ballistica/ui_v1/widget/root_widget.cc
Original file line number Diff line number Diff line change
Expand Up @@ -548,14 +548,11 @@ void RootWidget::Setup() {
AddMeter_(MeterType_::kLevel, 0.0f, 1.0f, 1.0f, 1.0f, false, "");
AddMeter_(MeterType_::kTrophy, 0.0f, 1.0f, 1.0f, 1.0f, false, "");

// Menu button (only shows up when we're not in a menu).
// FIXME - this should never be visible on TV or VR UI modes
{
ButtonDef_ b;
b.h_align = 1.0f;
b.v_align = VAlign_::kTop;
b.width = b.height = 65.0f;
// b.x = -36.0f;
b.y = b.height * -0.48f;
b.img = "menuButton";
b.call = UIV1Python::ObjID::kRootUIMenuButtonPressCall;
Expand Down Expand Up @@ -599,7 +596,8 @@ void RootWidget::Setup() {
| static_cast<uint32_t>(Widget::ToolbarVisibility::kMenuFullNoBack)
| static_cast<uint32_t>(Widget::ToolbarVisibility::kMenuFullRoot)
| static_cast<uint32_t>(Widget::ToolbarVisibility::kGetTokens)
| static_cast<uint32_t>(Widget::ToolbarVisibility::kMenuTokens));
| static_cast<uint32_t>(Widget::ToolbarVisibility::kMenuTokens)
| static_cast<uint32_t>(Widget::ToolbarVisibility::kNoMenuMinimal));
b.pre_buffer = 5.0f;
b.enable_sound = false;
squad_button_ = AddButton_(b);
Expand Down
17 changes: 9 additions & 8 deletions src/ballistica/ui_v1/widget/widget.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,20 @@ class Widget : public Object {
/// the entire set of visibilities they apply to.
enum class ToolbarVisibility : uint16_t {
kInherit = 0, // For popups and whatnot - leave toolbar as-is.
kMenuMinimal = 1, // Squad and back buttons.
kMenuMinimalNoBack = 2, // Squad button only.
kMenuStore = 4, // Squad, level, and soft currency buttons.
kMenuStoreNoBack = 8, // Squad, level, and soft currency buttons.
kMenuReduced = 16, // Squad, account, inbox, settings, back.
kMenuReducedNoBack = 32, // Squad, account, inbox, settings.
kMenuMinimal = 1, // Menu, squad, back.
kMenuMinimalNoBack = 2, // Menu, squad.
kMenuStore = 4, // Menu, squad, level, and soft currency.
kMenuStoreNoBack = 8, // Menu, squad, level, and soft currency.
kMenuReduced = 16, // Menu, squad, account, inbox, settings, back.
kMenuReducedNoBack = 32, // Menu, squad, account, inbox, settings.
kMenuFull = 64, // Everything.
kMenuFullNoBack = 128, // Everything.
kMenuFullNoBack = 128, // Everything minus back.
kMenuFullRoot = 256, // Obsolete.
kInGame = 512, // Menu, squad.
kGetTokens = 1024, // Squad, tokens without plus.
kMenuInGame = 2048, // Squad, settings.
kMenuTokens = 4096 // Squad, tokens.
kMenuTokens = 4096, // Squad, tokens.
kNoMenuMinimal = 8192, // Squad.
};

Widget();
Expand Down

0 comments on commit dec66af

Please sign in to comment.