Skip to content

Commit

Permalink
docs and options
Browse files Browse the repository at this point in the history
  • Loading branch information
Dregu committed Jun 3, 2024
1 parent 1d44b48 commit f2e4c7c
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 6 deletions.
21 changes: 19 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,13 @@ Build with cmake or get the [Autobuild](https://github.com/Dregu/maxwell/release
- Please go away if you haven't finished the game
- Edit most things in player inventory in real time
- Input any coordinates to warp
- Right click minimap to warp
- Right click anywhere on screen to teleport
- Reveal whole minimap ingame
- Minimap
- Right click to warp to rooms
- Reveal whole minimap ingame
- Warp to other dimensions
- Show other dimension outlines
- Track wheel position
- Godmode
- Noclip without cring
- Save anywhere
Expand All @@ -35,3 +39,16 @@ Build with cmake or get the [Autobuild](https://github.com/Dregu/maxwell/release
- Play in b&w gameboy mode
- Hide the game hud
- Take unobstructed screenshots for mapping
- Pause and frame advance
- Ctrl+Tab to toggle
- Tab to skip one frame
- Rudimentary runtime level editor
- Change water level
- Middle click to pick tile from room
- Left click to place tile
- Static tiles will update instantly, dynamic tiles need a room reload
- Very WIP
- Bunny sequencer
- Plays the flute automatically based on pixels on the mural
- Blues and reds are half notes, beiges full notes
- Take out the flute to play your song while in the room
15 changes: 13 additions & 2 deletions ui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -537,8 +537,6 @@ void UI::DrawOptions() {
if (ImGui::SliderInt("Window scale", &windowScale, 1, 10, "%dx")) {
ScaleWindow();
}
// ImGui::InputFloat2("Display", &io.DisplaySize.x, "%.0f",
// ImGuiInputTextFlags_ReadOnly);
ImGui::SliderFloat("Alpha", &ImGui::GetStyle().Alpha, 0.2f, 1.0f, "%.1f");
if (Button("Save settings"))
SaveINI();
Expand Down Expand Up @@ -998,6 +996,7 @@ void UI::Windows() {
if (window->detached)
continue;
inMenu = true;
ImGui::SetNextWindowViewport(ImGui::GetMainViewport()->ID);
if (ImGui::BeginMenu(window->title.c_str(), window->key)) {
window->cb();
lastMenuFrame = ImGui::GetFrameCount();
Expand Down Expand Up @@ -1158,6 +1157,12 @@ void UI::HUD() {
}

void UI::Draw() {
if (options["ui_viewports"].value) {
ImGui::GetIO().ConfigFlags |= ImGuiConfigFlags_ViewportsEnable;
} else {
ImGui::GetIO().ConfigFlags &= ~ImGuiConfigFlags_ViewportsEnable;
}

doWarp = false;

ImGuiIO &io = ImGui::GetIO();
Expand Down Expand Up @@ -1456,6 +1461,12 @@ void UI::LoadINI() {
}
windowScale = toml::find_or<int>(opts, "scale", 4);

/*if (options["ui_viewports"].value) {
ImGui::GetIO().ConfigFlags |= ImGuiConfigFlags_ViewportsEnable;
} else {
ImGui::GetIO().ConfigFlags &= ~ImGuiConfigFlags_ViewportsEnable;
}*/

SaveINI();
}

Expand Down
8 changes: 6 additions & 2 deletions ui.h
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,9 @@ class UI {
"Blocks keyboard input from game\n"
"when typing or menus are open."}},
{"input_mouse",
{true, "Right click to teleport",
"Right click or drag yourself around!"}},
{true, "Enable mouse controls",
"Left click to place tile, middle click to pick tile,\nright click to "
"teleport!"}},
{"map_auto",
{false, "Constantly update minimap",
"This can be choppy if map window is left open.\n"
Expand Down Expand Up @@ -142,6 +143,9 @@ class UI {
"These are really helpful, why are you disabling them!?"}},
{"ui_visible",
{true, "Show UI", "Hide/show all MAXWELL windows.", "toggle_ui"}},
{"ui_viewports",
{false, "Multi-viewports",
"Allow dragging UI windows outside the game window."}},
};
bool doWarp = false;
bool inMenu = false;
Expand Down

0 comments on commit f2e4c7c

Please sign in to comment.